Description du projet

This is a simple ANSI-C implementation of Triple-DES (as described in NIST Special Publication 800-67.) This implementation also includes an 8-bit version that can be used in microcontrollers with memory constraints.

Télécharger

Évaluation
Votre évaluation
Votre avis sur ce projet

2014-06-26 12:13
Évaluation de Danny

Évaluation :
(1$ de 1 personnes ont trouvé cet avis utile)
Hi very nice 8bit implementation of 3DES, not optimized but you made it simple so people can follow the code along with the spec and learn.
Pros
Very simple, well written, works perfectly, easy to follow.
Cons
Bug in easy-triple-des_0.0.1 version, you probably already found but just say just in case, at beginning of tdes_encrypt() there is simple mistake, when trying to align input to 8 bytes,padding 0's at end if ((n%8)!=0) { for (cnt=n; cnt<8*(n/8)+8; cnt++) { *(in+cnt)=0x00; } } It assumes the "in" variable can take the extra bytes but the below is used in the example unsigned char plain_text[32]={0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x1A, 0x1B}; Cheers Also should do CBC, it is more common, all you need to do is have an 8 byte input vector, initialized to 0, xored against the 8 byte chunk of the input before each 8 byte encrypt. vector also receives output 8 bytes on each cycle where you do the output printf. Also the extern params are not actually reserved an address/defined.
Liste des Évaluations