understanding the alphabet
rbtrtr opened this issue · 4 comments
I read the doc and came accross the following part which is not entirely clear to me.
Also, all elements in a plaintext string share the same radix.
Thus, an identification number that consists of a letter followed by 6 digits (e.g. A123456)
cannot be correctly encrypted by FPE while preserving this convention.
I understand this as follows:
- When I use this alphabet
radix 36: alphanumeric 0..9, a-z
and want to encryptA123456
, than it cannot be correctly encrypted by FPE - With this alphabet it is only possible to encrypt a string a-z or 0-9 like
ABCDEFG
or123456
Did I understand it correctly?
Yes, your understanding is correct. You could encrypt A123456 with an alphanumeric alphabet, but it would produce results which would not preserve the leading character & 5 digit convention, results such as 78F89T.
Okay thank you, and the length stays the same and two different inputs can still not lead to the same result?
Yes, the length stays the same. Where two different inputs to map to the same encrypted value, then it couldn't be successfully decrypted for one of them, so no, that can't happen per the NIST spec.
Perfect, just wanted to make sure. Thanks a lot for your immediate response!