Andrew Warren wrote: > > For a quick check: enciphering an all zero's data block using an > > all zero's key gives a 0xed285da1 0x455b33c1 cipher block. > > Hmm... My code returns 0x66750736 0x5CF66BDD. > > There's a bug in either your code or mine (or in both)... Later > today, when Dr. Shepherd gives me his results, I'll know > whether mine is correct. I couldn't wait so I took the 'C' reference implementation I've cited some days ago (at http://vader.brad.ac.uk/tea/tea.shtml) and compiled it on a powerPC UNIX machine I have. Then I ran the encipher routine on "all zero" plaintext and key using different number of rounds. Following there are some results: rounds ciphertext 01 0x9e3779b9 0xdbe8d32f 06 0xa5b716e2 0x42a412de 08 0xed285da1 0x455b33c1 <-- rounds I originally implemented 16 0xa889f798 0x182d8083 24 0x2ab23274 0xf046037b 32 0x41ea3a0a 0x94baa940 My PIC routines give the same results (whew...) so I can imagine my code should be correct. > > BTW: if there is someone willing to have my code I can post it here > > (it is a good practice?) or I can send individual copy. > > Programs as large as these shouldn't be sent to the PICLIST. > After my code is verified by Dr. Shepherd, I'll post it on my > web page. Ok, I agree. I don't have a web page at this moment so, if someone wants to take a look at my routines (I'll be very happy to hear some critics), send me a note and I will send back the code. Be warned that the code is not finished yet. I have to speed up things because I currently use some math routines that are quite slow (they are very generalized in that they use FSR/INDF for accessing the data). Also if someone improves the routines I will be glad to hear some feedback. Ciao Marco ---- Marco DI LEO email: m.dileo@sistinf.it Sistemi Informativi S.p.A. tel: +39 6 50292 300 V. Elio Vittorini, 129 fax: +39 6 5015991 I-00144 Roma Italy