Accepted Code - protea.p Documentation
TEA (the Tiny Encryption Algorithm) is a Feistel cipher with XOR and addition as the non-linear mixing functions.

protea.p and protea.i implement TEA in the Progress 4GL. They are meant to be used for encrypting small, important pieces of data, such as credit card numbers.
Due to the relative slowness of the Progress 4GL (compared to a similar program in assembly or C/C++) these algorithms don't really perform well on large pieces of data.

(In other words, you could use PROTEA to encrypt whole files...but it would be slow.)
This version of the Tiny Encryption Algorithm was implemented in the Progress 4GL by Brian Tawney (btawney@cornerstar.com). It should be portable across all operating systems, but encryption may result in different values on low-endian architectures vs. high-endian architectures.
The three key functions are encipher, decipher and set_mix. To use these in a program, include {protea.i}.

Syntax:
[success] = set_mix([mix])
[encoded text] = encipher([plain text],[key])
[plain text] = decipher([encoded text],[key])

The set_mix function sets the mix variable, if possible. It returns true if a valid mix value was passed in, otherwise it returns false. The mix variable is the number of iterations over which to encrypt the data. This number may be from 1 to 32, and is set to 32 by default. The bigger the number, the slower the encryption process but the better the encryption.

[Download protea.tar.gz]
[Return to Accepted Code Section]
[Return to Main Download Page]


 
  [Home]     [Search]     [Download]     [FAQ]     [Mission]     [Contact Us]     [Legal Notice]     [Traduisent / Übersetzen / Traducen]     
Last modified on: Monday, 12-Jan-2004 16:19:22 UTC