项目描述

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.

(This Description is auto-translated) Try to translate to Japanese Show Original Description

下载

Your rating
Review this project

2014-06-26 12:13
评论由 Danny

Rating:
(1 of 1 people found this review helpful)
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.
评列表