aboutsummaryrefslogtreecommitdiff
path: root/man/man3/blowfish.3
blob: 95d77507282c25d4ef61688951b47db7ae714a9a (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
52
.TH BLOWFISH 3
.SH NAME
setupBFstate, bfCBCencrypt, bfCBCdecrypt, bfECBencrypt, bfECBdecrypt  - blowfish 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 setupBFstate(BFstate *s, uchar key[], int keybytes, 
.B
			 uchar *ivec)
.PP
.B
void bfCBCencrypt(uchar *data, int len, BFstate *s)
.PP
.B
void bfCBCdecrypt(uchar *data, int len, BFstate *s)
.PP
.B
void bfECBencrypt(uchar *data, int len, BFstate *s)
.PP
.B
void bfECBdecrypt(uchar *data, int len, BFstate *s)
.SH DESCRIPTION
.PP
Blowfish is Bruce Schneier's symmetric block cipher.  It supports
variable length keys from 32 to 448 bits and has a block size of 64
bits.  Both CBC and ECB modes are supported.
.PP
setupBFstate takes a BFstate structure, a key of at most 56 bytes, the
length of the key in bytes, and an initialization vector of 8 bytes
(set to all zeroes if argument is nil).  The encryption and decryption
functions take a BFstate structure, a data buffer, and a length, which
must be a multiple of eight bytes as padding is currently unsupported.
.SH SOURCE
.B \*9/src/libsec
.SH SEE ALSO
.MR mp (3) ,
.MR aes (3) ,
.MR des (3) ,
.MR dsa (3) ,
.MR elgamal (3) ,
.MR rc4 (3) ,
.MR rsa (3) ,
.MR sechash (3) ,
.MR prime (3) ,
.MR rand (3)