55 lines · 1.1 KB · Text
RawDownload
.TH RC4 2.SH NAMEsetupRC4state, rc4, rc4skip, rc4back  - alleged rc4 encryption.SH SYNOPSIS.B #include <u.h>.br.B #include <libc.h>.br.B #include <mp.h>.br.B #include <libsec.h>.PP.Bvoid	setupRC4state(RC4state *s, uchar *seed, int slen).PP.Bvoid	rc4(RC4state *s, uchar *data, int dlen).PP.Bvoid	rc4skip(RC4state *s, int nbytes).PP.Bvoid	rc4back(RC4state *s, int nbytes).SH DESCRIPTION.PPThis is an algorithm alleged to be Rivest's RC4 encryption function.  It isa pseudo-random number generator with a 256 byte state and a longcycle.  The input buffer is XOR'd with the output of thegenerator both to encrypt and to decrypt.  The seed, enteredusing.IR setupRC4state ,can be any length.  The generator can be run forward using.IR rc4 ,skip over bytes using.I rc4skip to account lost transmissions,or run backwards using.I rc4backto cover retransmitted data.The.I RC4statestructure keeps track of the algorithm..SH SOURCE.B /sys/src/libsec.SH SEE ALSO.IR mp (2),.IR aes (2),.IR blowfish (2),.IR des (2),.IR dsa (2),.IR elgamal (2),.IR rsa (2),.IR sechash (2),.IR prime (2),.IR rand (2)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t