TEA - Tiny Encryption Algorithm
This code was written mainly to test the simplicity of the TEA (Tiny Encryption Algorithm). The encryption code itself was adapted to C++ from the JavaScript written by Chris Veness.
The TEA encrypts blocks of 64 bit data with a 128 bit key over several iterations. After only 6 iterations a change of one bit in the original block affects as much as 32 bits in the result. It has been found to be quite secure, especially this third version which has been improved to counter the vulnerabilities found in the first ones.
Feel free to use and learn from this code.
Download executable with source code
Interesting links
The TEA encryption algorithm was invented by David Wheeler & Roger Needham at Cambridge University Computer Lab: Original algorithm (1994), Improved algorithm (1997), and Final algorithm (1998).
Chris Veness, Movable Type Ltd, wrote this original JavaScript code