BLOWFISH(3)

πŸ“¦ version 0_git20260208, in alpine 3.24, arch rolling, nixos 26.05, nixpkgs unstable

🌸 BLOWFISH(3) β€” Library Functions Manual 🌸

okay so bestie, welcome to the Blowfish page from the Library Functions Manual. This is the whole group chat: setupBFstate, bfCBCencrypt, bfCBCdecrypt, bfECBencrypt, and bfECBdecrypt, all here for blowfish encryption. πŸ’…βœ¨

πŸ’– NAME πŸ’–

  • setupBFstate, bfCBCencrypt, bfCBCdecrypt, bfECBencrypt, bfECBdecrypt β€” blowfish encryption

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <u.h>
#include <libc.h>
#include <mp.h>
#include <libsec.h>

void setupBFstate(BFstate *s, uchar key[], int keybytes,
uchar *ivec)

void bfCBCencrypt(uchar *data, int len, BFstate *s)

void bfCBCdecrypt(uchar *data, int len, BFstate *s)

void bfECBencrypt(uchar *data, int len, BFstate *s)

void bfECBdecrypt(uchar *data, int len, BFstate *s)

πŸ’– DESCRIPTION πŸ’–

okay so Blowfish is Bruce Schneier's symmetric block cipher, and it's giving iconic range: variable length keys from 32 to 448 bits, and a block size of 64 bits. Both CBC and ECB modes are supported. no cap. 🫢

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 β€” and if that ivec argument is nil, it gets set to all zeroes. 🌸

The encryption and decryption functions take a BFstate structure, a data buffer, and a length. And bestie, that length must be a multiple of eight bytes, because padding is currently unsupported. 😭 That's the vibe check: no padding, no exceptions. πŸ’€

🌈 SOURCE 🌈

  • /src/libsec

πŸŽ€ SEE ALSO πŸŽ€


πŸ’– That's the whole page, bestie β€” BLOWFISH(3) from the Library Functions Manual, sourced from /src/libsec. No date or version line in this footer, just iconic crypto energy. mwah πŸ’‹βœ¨