plan9port/man/man3/blowfish.3
Russ Cox 977b25a76a tmac: introduce real manual reference macro instead of overloading IR
The overloading of IR emits magic \X'...' sequences that turn into HTML manual links.
But not all such IR invocations should be manual links;
those had to be written to avoid the IR macro before.
Worse, the \X'...' ending the IR causes troff to emit only a single space after a period.

Defining a new IM macro for manual references fixes both problems.

Fixes #441.
2020-08-13 23:43:43 -04:00

52 lines
1.3 KiB
Groff

.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
.IM mp (3) ,
.IM aes (3) ,
.IM des (3) ,
.IM dsa (3) ,
.IM elgamal (3) ,
.IM rc4 (3) ,
.IM rsa (3) ,
.IM sechash (3) ,
.IM prime (3) ,
.IM rand (3)