> > I know nothing about the RSA algorithm RSA doesn't encrypt, it's a public key algorithm, you would use the derived key to init the DES or TEA or RC4 or whatever cipher system, and then use the cipher system to do the encryption. I happened to have this 'white-email' floating around for Diffie-Hellman, which is similar to RSA: --- The hosts agree on two numbers, n and g. n is a large prime number (typically 512 bits), such that (n/2)-1 is also prime. g should be primitive mod n and is usually quite small (4-8 bits). These numbers can be hardcoded. Host A chooses a random integer x (twice as long as n), calculates X=g^x mod n, and sends X to host B. Host B also chooses a random integer y (twice as long as n), calculates Y=g^y mod n, and sends Y to host A. Host A calculates k = Y^x mod n, and host B calculates k = X^y mod n. The results are identical. Derivation of k is extremely difficult for an observer who knows only n, g, X, and Y. Finally, the hosts use k to initialize their respective cipher systems to identical states. --- > On the page is this example in PERL > > print pack"C*",split/\D+/,`echo"16iII*o\U@{$/=$z;[(pop,pop,unpack"H*", > <>)]}\EsMsKsN0[lN*1lK[d2%Sa2/d0 M0