Present python implementation
Revision as of 22:31, 15 October 2008 by <bdi>PhilippeTeuwen</bdi> (talk | contribs)
This is a development done by Christophe Oosterlynck under my supervision during his thesis work & internship at NXP.
The code is available here
what should be working (only tested with 1 or 2 test vectors yet):
- calculating round keys
- to have the same results as the reference C implementation, salting the roundkeys should only XOR 5 bits with roundkey when using 128bits key (line 95 in code) but should XOR with no 5bits limit when using 80bits key (line 76 in code). But the standard describes that it should be limited to 5 bits for both key generators...
- encrypting a block
- decrypting a block
- should support rounds up to 65534 (tested with 32, 64, 128 and 65534 rounds)
- decryption testvectors have errors: the sbox on decryption behaves like the inverse of the p-box... every S-Box value is incorrect in the testvectors.
Example:
- decryption testvectors have errors: the sbox on decryption behaves like the inverse of the p-box... every S-Box value is incorrect in the testvectors.
Round 1 Subkey: 6dab31744f41d700 Text after... ...Key-Xor: 38d2f04c34635345 .....P-Box: 45ef82118f2845a3 .....S-Box: 38d2f04c34635345