TEA (Tiny Encryption Algorithm)

Computer security has always been very important, now we are going to talk about TEA (Tiny Encryption Algorithm), developed by David Wheeler and Roger Needham at the Comuter Laboratory of Cambridge University.
One of his uses is on irc-hispano.org (Spanish main IRC servers) to encrypth the users IP to preserve users identity. It's very simple and easy to understand.
Here it'is the tow main functions source code: encipher and decipher

 void encipher(const unsigned long *const v,unsigned long *const w,    const unsigned long * const k) {    register unsigned long       y=v,z=v,sum=0,delta=0x9E3779B9,     a=k,b=k,c=k,d=k,n=32;    while(n-->0)       {       sum += delta;       y += (z << 4)+a ^ z+sum ^ (z >> 5)+b;       z += (y << 4)+c ^ y+sum ^ (y >> 5)+d;       }    w=y; w=z; } void decipher(const unsigned long *const v,unsigned long *const w,    const unsigned long * const k) {    register unsigned long       y=v,z=v,sum=0xC6EF3720,     delta=0x9E3779B9,a=k,b=k,     c=k,d=k,n=32;    /* sum = delta<<5, in general sum = delta * n */    while(n-->0)       {       z -= (y << 4)+c ^ y+sum ^ (y >> 5)+d;       y -= (z << 4)+a ^ z+sum ^ (z >> 5)+b;       sum -= delta;       }        w=y; w=z; } Takes 64 bits of data in v and v.
Returns 64 bits of data in w and w.
Takes 128 bits of key in k - k.

encipher procedure

v is the data to encrypted (input), w is the encrypted data (output), k is the secret key (like a  password).

decipher procedure

v is the data to decipher (input), w is the deciphered data (output), the source data, k is the secret key.

n is the number of iterations

On irc-hispano.org, a brute force attack could be performed by a malicius individual by trying to guess the key.
Knowing your own IP and your encrypted IP given to you once inside the irc-hispano, you could try it.
The needed computing time to try on all the 128 bits key is too much for a home computer (today) but an organized distributed attack using about 50 home computers could have a chance to do it on a acceptable time.

 This is a good algorithm to use on irc servers it's fast and portable   by Necro_ by DrDoom www.sorgonet.com