Andy, I'm happy to say that my TEA crypto implementation _never_ had the bug claimed here on the PICLIST. If you get the past list messages (look for 14th-15th of May) you will see how the debate between me and Andy Warren about the correctness of my code was closed when I pointed out that the errors Andy was getting were originated from a misconfiguration of his MPASM. He was simulating using a 16C84 (36 byte of RAM) but the "original TEA" code uses _37_ bytes... Switching to the prescribed 16F84 showed the correctness of the implementation. I have also a TEA-N code that is safer, faster, uses even less RAM and can run on the 16C84. For everyone willing to check the code, on my page there is a file containing the test vectors to verify the TEA and TEA-N implementations. Those vectors were computed using the reference implementation (given on the paper introducing the algorithms) compiled on a PowerPC UNIX platform. I'm sorry for my bad net-english but I hope you get the meaning... Ciao Marco P.S. If someone is interested I've almost finished my pseudo random number routines. The problem was the choice of an algorithm that is secure (unpredictable) and fit in the PIC limited resources (there are lot of methods that use some array of 17000 32-bit numbers but I guess the 16F84 is not enough!) Andy Kunz wrote: > > >Sorry, I don't have any DES code but if you need a fast (quite faster > >than any DES implementation) and secure (128 bit key, no known attack to > >the algorithm) you can get my TEA code at my page: > >http://members.tripod.com/~mdileo/ > >You can find there the routine for the original TEA and for the security > >improved TEA-N code. > > Marco, did you ever get the bugs out of your implementation? > > Andy (#5) > > ================================================================== > Andy Kunz - Statistical Research, Inc. - Westfield, New Jersey USA > ==================================================================