mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
51 lines
996 B
Groff
51 lines
996 B
Groff
.TH AES 3
|
|
.SH NAME
|
|
setupAESstate, aesCBCencrypt, aesCBCdecrypt - advanced encryption standard (rijndael)
|
|
.SH SYNOPSIS
|
|
.B #include <u.h>
|
|
.br
|
|
.B #include <libc.h>
|
|
.br
|
|
.B #include <mp.h>
|
|
.br
|
|
.B #include <libsec.h>
|
|
.PP
|
|
.B
|
|
void setupAESstate(AESstate *s, uchar key[], int keybytes, uchar *ivec)
|
|
.PP
|
|
.B
|
|
void aesCBCencrypt(uchar*, int, AESstate*)
|
|
.PP
|
|
.B
|
|
void aesCBCdecrypt(uchar*, int, AESstate*)
|
|
.PP
|
|
.SH DESCRIPTION
|
|
.PP
|
|
DES is being replaced by Rijndael, also known as AES, as the preferred
|
|
block ciper.
|
|
.IR setupAESstate ,
|
|
.IR aesCBCencrypt ,
|
|
and
|
|
.I aesCBCdecrypt
|
|
implement cipher block chaining encryption.
|
|
.I Keybytes
|
|
should be 16, 24, or 32.
|
|
The initialization vector
|
|
.I ivec
|
|
of
|
|
.I AESbsize
|
|
bytes should random enough to be unlikely to be reused but does not need to be
|
|
cryptographically strongly unpredictable.
|
|
.SH SOURCE
|
|
.B \*9/src/libsec
|
|
.SH SEE ALSO
|
|
.IR mp (3),
|
|
.IR blowfish (3),
|
|
.IR des (3),
|
|
.IR dsa (3),
|
|
.IR elgamal (3),
|
|
.IR rc4 (3),
|
|
.IR rsa (3),
|
|
.IR sechash (3),
|
|
.IR prime (3),
|
|
.IR rand (3)
|