Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
.TH BLOWFISH 2
2
.SH NAME
3
setupBFstate, bfCBCencrypt, bfCBCdecrypt, bfECBencrypt, bfECBdecrypt  - blowfish encryption
4
.SH SYNOPSIS
5
.B #include <u.h>
6
.br
7
.B #include <libc.h>
8
.br
9
.B #include <mp.h>
10
.br
11
.B #include <libsec.h>
12
.PP
13
.B
14
void setupBFstate(BFstate *s, uchar key[], int keybytes, 
15
.B
16
			 uchar *ivec)
17
.PP
18
.B
19
void bfCBCencrypt(uchar *data, int len, BFstate *s)
20
.PP
21
.B
22
void bfCBCdecrypt(uchar *data, int len, BFstate *s)
23
.PP
24
.B
25
void bfECBencrypt(uchar *data, int len, BFstate *s)
26
.PP
27
.B
28
void bfECBdecrypt(uchar *data, int len, BFstate *s)
29
.SH DESCRIPTION
30
.PP
31
Blowfish is Bruce Schneier's symmetric block cipher.  It supports
32
variable length keys from 32 to 448 bits and has a block size of 64
33
bits.  Both CBC and ECB modes are supported.
34
.PP
35
setupBFstate takes a BFstate structure, a key of at most 56 bytes, the
36
length of the key in bytes, and an initialization vector of 8 bytes
37
(set to all zeroes if argument is nil).  The encryption and decryption
38
functions take a BFstate structure, a data buffer, and a length, which
39
must be a multiple of eight bytes as padding is currently unsupported.
40
.SH SOURCE
41
.B /sys/src/libsec
42
.SH SEE ALSO
43
.IR mp (2),
44
.IR aes (2),
45
.IR des (2),
46
.IR dsa (2),
47
.IR elgamal (2),
48
.IR rc4 (2),
49
.IR rsa (2),
50
.IR sechash (2),
51
.IR prime (2),
52
.IR rand (2)