Talk:Data Encryption Standard: Difference between revisions

m
Line 9:
I built the C version for an embedded processor. When I ran it there, the decrypted values didn't match the encrypted ones. Also, the third encryption/decryption didn't produce all the expected output.
 
The culprit is that the code as it stands at this writing doesn't check for malloc() returning zero, and this is exactly what was happening. So instead, some of the lowest addresses in data memory got corrupted.
 
(In this development toolchain, unless the programmer explicitly specifies a value for the heap size, only a tiny heap actually gets allocated.)
Anonymous user