0NG / Format-Preserving-Encryption

FPE Implementation in C [Preparing for improvement]
MIT License
45 stars 30 forks source link

encrypt a number, but cipher is not a int #5

Closed n0pn0pn0p closed 4 years ago

n0pn0pn0p commented 4 years ago

hello, i run the example on ubuntu,like this: ./example EF4359D8D580AA4F7F036D6F04FC6A12 323030323130 11 13588888888 key: ef 43 59 d8 d5 80 aa 4f 7f 03 6d 6f 04 fc 6a 12 tweak: 32 30 30 32 31 30 after map: 1 3 5 8 8 8 8 8 8 8 8

========== FF1 ========== ciphertext(numeral string): 5 9 10 4 10 4 9 3 1 6 1 ciphertext: 59a4a493161

plaintext: 1 3 5 8 8 8 8 8 8 8 8

========== FF3 ========== ciphertext(numeral string): 9 9 9 1 8 0 4 1 3 10 6 ciphertext: 999180413a6

plaintext: 1 3 5 8 8 8 8 8 8 8 8 why i got a a in cipher? i just want cipher is a int. I use https://github.com/capitalone/fpe, but no this problem.

n0pn0pn0p commented 4 years ago

sorry, i've set a wrong radix