MirBSD manpage: blf_cbc_decrypt(3), blf_cbc_encrypt(3), blf_dec(3), blf_ecb_decrypt(3), blf_ecb_encrypt(3), blf_enc(3), blf_key(3), blowfish(3)

BLOWFISH(3)                BSD Programmer's Manual                 BLOWFISH(3)

NAME

     blf_key, blf_enc, blf_dec - Blowfish encryption

SYNOPSIS

     #include <blf.h>

     void
     blf_key(blf_ctx *state, const u_int8_t *key, u_int16_t keylen);

     void
     blf_enc(blf_ctx *state, u_int32_t *data, u_int16_t datalen);

     void
     blf_dec(blf_ctx *state, u_int32_t *data, u_int16_t datalen);

     void
     blf_ecb_encrypt(blf_ctx *state, u_int8_t *data, u_int32_t datalen);

     void
     blf_ecb_decrypt(blf_ctx *state, u_int8_t *data, u_int32_t datalen);

     void
     blf_cbc_encrypt(blf_ctx *state, u_int8_t *iv, u_int8_t *data,
             u_int32_t datalen);

     void
     blf_cbc_decrypt(blf_ctx *state, u_int8_t *iv, u_int8_t *data,
             u_int32_t datalen);

DESCRIPTION

     Blowfish is a fast unpatented block cipher designed by Bruce Schneier. It
     basically consists of a 16-round Feistel network. The block size is 64
     bits and the maximum key size is 448 bits.

     The blf_key() function initializes the 4 8-bit S-boxes and the 18 Subkeys
     with the hexadecimal digits of Pi. The key is used for further randomiza-
     tion. The first argument to blf_enc() is the initialized state derived
     from blf_key(). The stream of 32-bit words is encrypted in Electronic
     Codebook Mode (ECB) and datalen must be even. blf_dec() is used for de-
     crypting Blowfish encrypted blocks.

     The functions blf_ecb_encrypt() and blf_ecb_decrypt() are used for en-
     crypting and decrypting octet streams in ECB mode. The functions
     blf_cbc_encrypt() and blf_cbc_decrypt() are used for encrypting and de-
     crypting octet streams in Cipherblock Chaining Mode (CBC).

     The functions Blowfish_initstate(), Blowfish_expand0state(),
     Blowfish_expandstate(), Blowfish_encipher() and Blowfish_decipher() are
     used for customization of the Blowfish cipher, e.g., for the blowfish
     password hashing function.

SEE ALSO

     passwd(1), crypt(3), passwd(5)

AUTHORS

     Niels Provos <provos@physnet.uni-hamburg.de>

MirBSD #10-current            February 13, 1997                              1

Generated on 2022-12-24 01:00:14 by $MirOS: src/scripts/roff2htm,v 1.113 2022/12/21 23:14:31 tg Exp $ — This product includes material provided by mirabilos.

These manual pages and other documentation are copyrighted by their respective writers; their sources are available at the project’s CVSweb, AnonCVS and other mirrors. The rest is Copyright © 2002–2022 MirBSD.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report — diffs preferred.

Kontakt / Impressum & Datenschutzerklärung