BLOWFISH(3)
πΈ 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 πβ¨
π¦ where this page comes from
- alpine 3.24: plan9port-doc 0_git20260208-r0 Β· LPL-1.02
- arch rolling: plan9port 20261021-2 Β· custom
- nixos 26.05: plan9port 0-unstable-2025-11-10
- nixos 26.05: plan9port-wayland 0-unstable-2025-11-26
- nixpkgs unstable: plan9port 0-unstable-2025-11-10
- nixpkgs unstable: plan9port-wayland 0-unstable-2025-11-26
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms