How to use the Tiny Encryption Algorithm to Encrypt and Decrypt
The following C code can be used to enipher and decipher a 64-bit packet. The C code should run on most machines.The encipher and decipher routines can be made shorter or faster but this version is meant act as a template for the algorithm. "This type of algorithm can replace DES in software and is short enough
to
SOURCE CODE DESCRIPTION
INPUT 64 - Bit Data: 128 - Bit Key:
SOURCE CODE Encipher Routine
Decipher Routine
SAMPLE INPUT/OUTPUT v[0] = 0x11111111 k[0] = 0x23DD7; >> called encipher routine << v[0] = 0xFB5319C8 >> called decipher routine<< v[0] = 0x11111111
|