|
For the latest news and information visit The GNU Crypto project |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgnu.crypto.prng.BasePRNG
gnu.crypto.prng.ARCFour
public class ARCFour
RC4 is a stream cipher developed by Ron Rivest. Until 1994 RC4 was a trade secret of RSA Data Security, Inc., when it was released anonymously to a mailing list. This version is a descendent of that code, and since there is no proof that the leaked version was in fact RC4 and because "RC4" is a trademark, it is called "ARCFOUR", short for "Allegedly RC4".
This class only implements the keystream of ARCFOUR. To use this as a stream cipher, one would say:
out = in ^ arcfour.nextByte();
This operation works for encryption and decryption.
References:
Field Summary | |
---|---|
static String |
ARCFOUR_KEY_MATERIAL
The attributes property name for the key bytes. |
static int |
ARCFOUR_SBOX_SIZE
The size of the internal S-box. |
Fields inherited from class gnu.crypto.prng.BasePRNG |
---|
buffer, initialised, name, ndx |
Constructor Summary | |
---|---|
ARCFour()
Default 0-arguments constructor. |
Method Summary | |
---|---|
void |
fillBlock()
|
void |
setup(Map attributes)
|
Methods inherited from class gnu.crypto.prng.BasePRNG |
---|
addRandomByte, addRandomBytes, addRandomBytes, clone, init, isInitialised, name, nextByte, nextBytes, nextBytes |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ARCFOUR_KEY_MATERIAL
public static final int ARCFOUR_SBOX_SIZE
Constructor Detail |
---|
public ARCFour()
Method Detail |
---|
public void setup(Map attributes)
setup
in class BasePRNG
public void fillBlock() throws LimitReachedException
fillBlock
in class BasePRNG
LimitReachedException
|
For the latest news and information visit The GNU Crypto project |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |