3 setupBFstate, bfCBCencrypt, bfCBCdecrypt, bfECBencrypt, bfECBdecrypt - blowfish encryption
11 .B #include <libsec.h>
14 void setupBFstate(BFstate *s, uchar key[], int keybytes,
19 void bfCBCencrypt(uchar *data, int len, BFstate *s)
22 void bfCBCdecrypt(uchar *data, int len, BFstate *s)
25 void bfECBencrypt(uchar *data, int len, BFstate *s)
28 void bfECBdecrypt(uchar *data, int len, BFstate *s)
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.
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.
41 .B /usr/local/plan9/src/libsec