plan9port/man/man3/rc4.3
Russ Cox 977b25a76a tmac: introduce real manual reference macro instead of overloading IR
The overloading of IR emits magic \X'...' sequences that turn into HTML manual links.
But not all such IR invocations should be manual links;
those had to be written to avoid the IR macro before.
Worse, the \X'...' ending the IR causes troff to emit only a single space after a period.

Defining a new IM macro for manual references fixes both problems.

Fixes #441.
2020-08-13 23:43:43 -04:00

55 lines
1.1 KiB
Groff

.TH RC4 3
.SH NAME
setupRC4state, 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
.B
void setupRC4state(RC4state *s, uchar *seed, int slen)
.PP
.B
void rc4(RC4state *s, uchar *data, int dlen)
.PP
.B
void rc4skip(RC4state *s, int nbytes)
.PP
.B
void rc4back(RC4state *s, int nbytes)
.SH DESCRIPTION
.PP
This is an algorithm alleged to be Rivest's RC4 encryption function. It is
a pseudo-random number generator with a 256 byte state and a long
cycle. The input buffer is XOR'd with the output of the
generator both to encrypt and to decrypt. The seed, entered
using
.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 rc4back
to cover retransmitted data.
The
.I RC4state
structure keeps track of the algorithm.
.SH SOURCE
.B \*9/src/libsec
.SH SEE ALSO
.IM mp (3) ,
.IM aes (3) ,
.IM blowfish (3) ,
.IM des (3) ,
.IM dsa (3) ,
.IM elgamal (3) ,
.IM rsa (3) ,
.IM sechash (3) ,
.IM prime (3) ,
.IM rand (3)