Format Preserving Encryption for 32 or 64 bit plaintext values I am looking for a Format Preserving Encryption implementation to apply to either a 32-bit or a 64-bit integer.  It looks like AES/FFX mode is just what I need in terms of established security properties.  However, it looks like it is patented, and it seems like there might be something equally solid in the public domain for the special case of 32 or 64 bit data, ideally with C source code.  I have seen SkipJack or 3DES for the 64-bit case, but I would prefer longer key sizes, as these will be statically configured.

The application is to compartmentalize/anonymize information in a database.  I have different kinds of information about users that is not terribly privacy invasive as long as it is kept separate from other kinds of information that is also not invasive on it's own.  However, there may be rare cases when I need to connect this data together.  So, I was thinking each database would identify users with its own ID, and the key to connect them could be stored separately.  The actual application is a little more complicated, but that's the general idea.
I'm not aware of any implementations, but I'm also not aware of any patents on this algorithm.

Furthermore, that algorithm can quite directly be made tweakable,

as that paper describes on pages 10-13.