Blowfish_PP(3)

πŸ“¦
version 1.12 Β· 2 versions
, in fedora 43

πŸ’– Blowfish_PP πŸ’–

okay so this is a page from the User Contributed Perl Documentation section (that's the manual name, bestie, it's giving "community-made and proud of it") β€” and it's all about Crypt::Blowfish_PP, the Blowfish encryption algorithm implemented purely in Perl. no C, no XS, no compiled anything. just vibes and math. ✨


🌸 NAME 🌸

Crypt::Blowfish_PP β€” Blowfish encryption algorithm implemented purely in Perl

literally what it says on the tin, no cap.


✨ SYNOPSIS ✨

"use Crypt::Blowfish_PP";

$blowfish=new Crypt::Blowfish_PP($key);

$ciphertextBlock=$blowfish->encrypt($plaintextBlock);

$plaintextBlock=$blowfish->decrypt($ciphertextBlock);

πŸ¦‹ DESCRIPTION πŸ¦‹

so the Crypt::Blowfish_PP module is here to let you, the user, use the Blowfish encryption algorithm in perl. 🐑 and the implementation is entirely Object Oriented β€” like, fully β€” because there is quite a lot of context inherent in making blowfish as fast as it is. that's not extra, that's load-bearing context, fr fr.

the key can be anywhere between 64 and 448 bits (that's 8 and 56 bytes), and you should pass it as a packed string. πŸ”‘ the transformation itself is a 16-round Feistel Network, and it operates on a 64 bit block. periodt.

Object methods for the Crypt::Blowfish_PP module:

πŸ‘‘ new(key)

the new() method initialises a blowfish object with the key that you pass it. πŸ’… this is the slow part of doing a blowfish encryption or decryption β€” no shade, it's just built different β€” because it initialises the 18 p-boxes and the 1024 s-boxes that are used for the algorithm. it will return undef if the key is not of a valid length. 😭 so like, check your key length, bestie.

πŸ”₯ encrypt(block)

the encrypt() method uses the initialised blowfish object to encrypt 8 bytes of data of the string passed to it. it returns the encrypted block. slay.

🌈 decrypt(block)

the decrypt() method uses the initialised blowfish object to decrypt 8 bytes of data of the string passed to it. it returns the decrypted block. iconic.


πŸ’€ COMMENTS πŸ’€

this is probably crap software, but hey, its for general use. I'm happy to patch it with other people's code... :)

(that's the author's own words, I'm not being mean, I'm being accurate. not me reading the manpage's self-roast πŸ’€)

if you want speed, then see the Crypt::Blowfish module. that's the fast one. this one is the pure Perl one. iykyk.


🫢 AUTHOR 🫢

Matthew Byng-Maddick <"mbm@colondot.net">


πŸŽ€ SEE ALSO πŸŽ€

http://www.counterpane.com/, Crypt::CBC


and that's the whole page, bestie 🧚 go forth and encrypt responsibly β€” this was perl v5.42.0, dated 2025-07-25, served up fresh from the Blowfish_PP(3) manpage. mwah πŸ’–

πŸ“¦ where this page comes from