aboutsummaryrefslogtreecommitdiff
path: root/man/man3/aes.3
blob: 6b23c86175ff2ff33b13e940c1ba29ec249e9d3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.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 /sys/src/libsec
.SH SEE ALSO
.IR mp (2),
.IR blowfish (2),
.IR des (2),
.IR dsa (2),
.IR elgamal (2),
.IR rc4 (2),
.IR rsa (2),
.IR sechash (2),
.IR prime (2),
.IR rand (2)