ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

1
Date Submitted Mon. Jun. 9th, 2008 3:54 AM
Revision 1
Helper jamesmcm
Tags Encryption | Ruby
Comments 0 comments
A quick implementation of an encrypter which can't be cracked by frequency analysis.
11
Date Submitted Fri. Feb. 17th, 2006 4:49 PM
Revision 1
Beginner RRSands
Tags CSharp | Encryption | Security
Comments 0 comments
From RSA Security's website:
"RC4 is a stream cipher designed by Rivest for RSA Data Security (now RSA Security). It is a variable key-size stream cipher with byte-oriented operations. The algorithm is based on the use of a random permutation. Analysis shows that the period of the cipher is overwhelmingly likely to be greater than 10^100. Eight to sixteen machine operations are required per output byte, and the cipher can be expected to run very quickly in software. Independent analysts have scrutinized the algorithm and it is considered secure."

This implementation encodes the byte stream to be encrypted "in-place".

Example:
Byte[] Key = new Byte[5] { 12, 34, 22, 12, 32 };
Byte[] B = new Byte[10] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
// Examine B array before and after this next call.
RC4(ref B, Key);
// Examine B array before and after this next call.
RC4(ref B, Key);