[botan-devel] Format Preserving Encryption - Using it with words and names
zx78 at live.com
Wed May 6 22:32:42 EDT 2015
I have several questions I was hoping someone could assist with,
1. Can you point me to the location of the source code for just the FPE module (including any dependencies)? I might try to use the C++ source in my .NET project
I found on GitHub this file, botan/src/cmd/fpe.cpp What are the other files I need to make a complete library for just the FPE module.
2. I want to use this FPE to encrypt strings like words and names. After experimenting with a C# port I found of the FPE module, I found it throws an exception if the string is too long. In my case I am converting the string to a base 52 number (where A = 0, B = 1, C = 2.....y = 50, z = 51) Then converting that to base 10 before encrypting. Then I convert the encrypted result back to base 52 to get the result as a string. Since the modulus is 52^N where N is the number of characters in my string, this value can grow quite large as N increases. Therefore I was wondering if you are imposing a restriction on this value and why?
What modification can you suggest to allow for longer strings? (Alternatively I was considering to break the plaintext string into fragments if it was too long and encrypt the fragments individually before putting them back together again)
Thanks for any help
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the botan-devel