3 setupRC4state, rc4, rc4skip, rc4back - alleged rc4 encryption
11 .B #include <libsec.h>
14 void setupRC4state(RC4state *s, uchar *seed, int slen)
17 void rc4(RC4state *s, uchar *data, int dlen)
20 void rc4skip(RC4state *s, int nbytes)
23 void rc4back(RC4state *s, int nbytes)
26 This is an algorithm alleged to be Rivest's RC4 encryption function. It is
27 a pseudo-random number generator with a 256 byte state and a long
28 cycle. The input buffer is XOR'd with the output of the
29 generator both to encrypt and to decrypt. The seed, entered
32 can be any length. The generator can be run forward using
36 to account lost transmissions,
37 or run backwards using
39 to cover retransmitted data.
42 structure keeps track of the algorithm.