As quoted on wikipedia, RC4 is a stream cipher designed by Professor Ronald Rivest from MIT. This block cipher employs simple bytewise permutation over 256 bytes state array. This characteristic makes RC4 easy to implement in programmable device such microcontroller.
AVR is a powerful microcontroller that cope all requirements needed for RC4 implementation, from indirect memory addressing for array operation, addition and so on. The lookup process of RC4 is depicted below.

The previous platform of RC4 implementation that I made was PIC18F4550, which gave good performance, but AVR is better. AVR has more specific single cycled instruction that made it faster and superior than PIC18F4550 on this case.
In order to validate cipher result, I tested my code to encrypt plain text “Plaintext” with cipherkey “Key” and it generated the same hex value which was “BBF316E8D940AF0AD3″. The test vector example was taken from RC4 page on wikipedia. Take a look those three pictures below.
Plain Text

Cipher Key

Cipher Text

RELATED STUFF
Download :
Source Code | v1.0
Reference:
RC4
Ronald Rivest




Damn man!! you’re such talented cryptography artist!!!!
Keep on Crazy dude!!!
-a guy who always support you-
Comment by Takhta Pandu Padmanegara — 14 January 2009 @ 7:57 pm
@padmanegara : thank you my bro
Comment by edipermadi — 15 January 2009 @ 9:26 am