Tweak algorithm and tweak data compatibility details
Tweak algorithms can only be used with FPE algorithms. For some tweak algorithms, it is mandatory to specify tweak data. The tables below outline the size limitations of tweak data with respect to FPE and tweak algorithms.
Note
For FF3 variants, tweak algorithm can't be NULL.
FPE/AES
Tweak Algorithm | Tweak |
---|---|
SHA1 | tweak data should be ≤ 256 characters. |
SHA256 | tweak data should be ≤ 256 characters. |
NONE | tweak data should be 16 characters HEX encoded string For example, 1234567890ABCDEF. |
NULL | tweak data is not applicable. |
FPE/FF1v2
Tweak Algorithm | Tweak |
---|---|
SHA1 | tweak data should be ≤ 256 characters. |
SHA256 | tweak data should be ≤ 256 characters. |
NONE | tweak data should be 16 characters HEX encoded string For example, 1234567890ABCDEF. |
NULL | tweak data is not applicable. |
FPE/FF3
Tweak Algorithm | Tweak |
---|---|
SHA1 | tweak data should be ≤ 256 characters. |
SHA256 | tweak data should be ≤ 256 characters |
NONE | tweak data should be 16 characters HEX encoded string For example, 1234567890ABCDEF. |
FPE/FF3-1
Tweak Algorithm | Tweak |
---|---|
SHA1 | tweak data should be ≤ 256 characters |
SHA256 | tweak data should be ≤ 256 characters. |
NONE | tweak data should be 14 characters HEX encoded string For example, 123456789BCDEF. |