Problem with FPE
is that you cannot tell if the field has been crypted or not. It is usually used for credit card numbers but the FPE
version of s credit card number if it is stolen even though it's not the original number it can still be a valid credit card number and be used by malicious people.
Is FPE
as strong as AES
the answer is yes and no. FPE
on a 3 character string would be a very poor encryption as opposed to if you use it on a 300 character string then it could surpass AES 256
. But that would be slower to generate than AES
. AES
almost have steady speed when encrypting and you can estimate the time it will take depending on the string length and the output will NOT be humanly readable/usuable.
example that are not run trough the encryption for real but just to illustrate the difference follows :
Name : Frank Stall
encrypted using FPE
Name : Steve Moore
Even though the name has been encrypted successfully it is still a valid value usable by people that want to steal identity (remember it's just to illustrate the difference). from the results you can visually tell the value is a name but yourself even if you know it you cannot tell if it's encrypted or not.
encrypted using AES
Name : WOa8+6KskFZ7IdNYgZ3+9BGDJrVfSVd61dDcX1JcVK8=
As you can see if you look at the result of a basic AES encryption the string length don't necessary match, the value is impossible to humanly guess what it is. How can you tell if it's not my birthday i just put there instead of the name.