Skip to content

feat(core): FF1 format-preserving encryption (NIST SP 800-38G) - #17

Merged
GoDeskio merged 1 commit into
mainfrom
feat/ff1-fpe
Nov 5, 2026
Merged

GoDeskio merged 1 commit into
mainfrom
feat/ff1-fpe

Conversation

@GoDeskio

Copy link
Copy Markdown
Owner

Backlog #9. Written from the NIST spec.

  • src/ff1.rs: FF1 with AES-128, AES-192 or AES-256, radix 2–65536, with alphabet-string helpers.
  • Enforces the Rev.1 minimum domain (10^6) and u128 bounds.
  • Tests: NIST samples 1, 2, 3 and 7 encrypt and decrypt correctly, plus misuse cases and card-number round trips with per-tenant tweaks.

FPE is deterministic and leaks length. Use a distinct tweak per column or tenant. cargo test and clippy are clean.

@GoDeskio
GoDeskio merged commit 5e6276e into main Nov 5, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant