Format Preserving Encryption (FPE) seems to have been invented principally to encrypt credit card numbers into something that looks like a credit card number. Effectively, FPE is a permutation over the domain of the input.
It seems like the main reason is legacy: a lot of databases where created with size and alphabet restrictions on the field of credit card numbers, other systems and applications were probably built to deal with similar restrictions in order to process or transport these credit card numbers. Since it was deemed (I'm guessing) too costly to improve things so that a ciphertext, an IV and an authentication tag could have been stored in there instead; instead rich banks threw money at the problem and cryptographers took the bait.
It seems like there are three ways to do it:
- Prefix. Your input domain is very small: write the permutation yourself (01 => 10, 00 => 11, etc.). If you don't have imagination, use AES to encrypt your input domain, and truncate. Hopefully it crea