Hi Andy. Please double check your statement. I just downloaded from my page the tea11.zip file and compiled tea.asm with the enclosed teatest.asm and math32.inc. After the call at TEAenc this is my mplab 3.40.00 watch window: Address Symbol Value 0C vy H'0A3AEA41' 10 vz H'40A9BA94' 14 ka H'00000000' 18 kb H'00000000' 1C kc H'00000000' 20 kd H'00000000' If you read the vy and vz variables using the LSB-first convention you can see my code produces the correct values (0x41ea3a0a 0x94baa940). I don't know wy you get the cited result. Have you used the test drive code I supply or did you write another (actually I don't believe this really matters)? I don't think the byte ordering is important since you say you encipher using an all zero text with an all zero key. The TEA-N version I post on my web page is checked against the reference implementation (you can find a link to it at my page: http://members.tripod.com/~mdileo/) for various values of the text and keys chosen to avoid problems related to palindrome keys. Please give me your feedback as you can. Ciao Marco Andrew Warren wrote: > > Marco DI LEO wrote: > > > For everyone interested in the Tiny Encryption Algorithm (TEA) I > > have a brand new code that implements the new TEA-N. > > Marco: > > I haven't yet checked your TEA-N code, but your "regular" TEA code > (identified as "version 1.1" on your web page) doesn't work. > > As you'll recall, the ciphertext produced from an all-zero plaintext > and an all-zero key should be: > > 0x41ea3a0a 0x94baa940 > > Your code produces: > > 0xF6750B0D 0xDE93A110 ---- 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