Data encryption
·Hi,
I was wondering if anyone has implemented any kind of data encryption using a Stamp.· I have managed to find source code for TEA in assembly language and C but to be honest I don't really understand it!
Any suggestions please![smile.gif](http://forums.parallax.com/images/smilies/smile.gif)
Cheers,
Helen
I was wondering if anyone has implemented any kind of data encryption using a Stamp.· I have managed to find source code for TEA in assembly language and C but to be honest I don't really understand it!
Any suggestions please
![smile.gif](http://forums.parallax.com/images/smilies/smile.gif)
Cheers,
Helen
Comments
The assembly code can be found at:
http://www.8052.com/codelib/tea.a51
and the C at
http://www.ftp.cl.cam.ac.uk/ftp/papers/djw-rmn/djw-rmn-tea.html
Thanks
Helen
·· What/where is the target data to be encrypted/decrypted?· A simple but powerful way of encrypting/decrypting data is to XOR each byte of data with the bytes of the password.· Once you run out of characters in the password, you loop it.· This way the password appears to be infinite and since the characters are handled one at a time, the result is that it's very difficult to decrypt.· For example...
@2#5^89!0)··· <---This is the PASSWORD
This is the DATA that I want to encrypt.· It's not very secure right now.
The idea would be:
T XOR @
h XOR 2
i XOR #
s XOR 5
(space) XOR ^
i XOR 8
s XOR 9
(space) XOR !
t XOR 0
h XOR )
e XOR @··· <--- Notice how when the password ends it loops...This adds to the security because the probability is that the looped password character that gets XORed with a different value (as is the case here) so you can't discern a pattern from that.
An interesting effect of using XOR is that the same password used to encrypt is also used to decrypt the data.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I'll give it a try.
Cheers, Helen
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Post Edited (Chris Savage (Parallax)) : 7/6/2006 7:34:32 PM GMT
In this case " This is the" would look like.....
You could do the same thing at the NIBble level by rotating a 4x4 or even at the WORD level rotating a 16x16.
Depending on a simple ODD or EVEN check you could rotate the DATA clockwise or counter clockwise.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.