tblowfish.3 - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       tblowfish.3 (1288B)
       ---
            1 .TH BLOWFISH 3
            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 \*9/src/libsec
           42 .SH SEE ALSO
           43 .MR mp (3) ,
           44 .MR aes (3) ,
           45 .MR des (3) ,
           46 .MR dsa (3) ,
           47 .MR elgamal (3) ,
           48 .MR rc4 (3) ,
           49 .MR rsa (3) ,
           50 .MR sechash (3) ,
           51 .MR prime (3) ,
           52 .MR rand (3)