Crypt:...owfish(3pm)
π Crypt::Eksblowfish::Blowfish(3pm) β like, the Blowfish block cipher, bestie π‘
okay so this whole page lives in the perl manual, section 3pm, and it's about Crypt::Eksblowfish::Blowfish β a Blowfish block cipher running on an Eksblowfish engine. yes the name is a mouthful. we move.
β¨ NAME β¨
Crypt::Eksblowfish::Blowfish β the Blowfish block cipher, powered by the Eksblowfish engine. it's giving "fancy engine, classic cipher."
πΈ SYNOPSIS πΈ
use Crypt::Eksblowfish::Blowfish;
$block_size = Crypt::Eksblowfish::Blowfish->blocksize;
$key_size = Crypt::Eksblowfish::Blowfish->keysize;
$cipher = Crypt::Eksblowfish::Blowfish->new($key);
$block_size = $cipher->blocksize;
$ciphertext = $cipher->encrypt($plaintext);
$plaintext = $cipher->decrypt($ciphertext);
$p_array = $cipher->p_array;
$s_boxes = $cipher->s_boxes;
if($cipher->is_weak) { ...
like, that's the whole vibe in nine lines. everything below is just explaining what you already felt. π
π¦ DESCRIPTION π¦
so an object of this type is literally a keyed-up instance of the Blowfish block cipher, sitting there, ready to encrypt and decrypt. main character behavior, honestly.
Blowfish itself? a symmetric cipher algorithm designed by Bruce Schneier in 1993 β¨. it works on 64-bit blocks, and it takes a variable-length key all the way from 32 bits (4 octets) up to 448 bits (56 octets), in increments of 8 bits (1 octet). so many sizes. so much range. we love options.
now the tea on this specific implementation β β it uses an encryption engine that was originally built to support Eksblowfish, which is a variant of Blowfish modified to make keying particularly expensive (yes, on purpose, it's a whole thing). peep Crypt::Eksblowfish for that variant. this class, though? this class implements the original Blowfish. no cap. π‘
π CLASS METHODS π
Crypt::Eksblowfish::Blowfish->blocksizeβ returns8, which is the Blowfish block size of 8 octets. and the cute part? you can call this method on either the class or an instance. flexible queen. π«ΆCrypt::Eksblowfish::Blowfish->keysizeβ returns0, which is saying "the key size is variable, bestie." this specific situation gets handled specially byCrypt::CBC. iconique and slightly chaotic.
π CONSTRUCTOR π
Crypt::Eksblowfish::Blowfish->new(KEY)β does key setup on a brand-new instance of the Blowfish algorithm and hands you back the keyed state.KEYcan be any length from 4 octets to 56 octets inclusive. the range is the range, we don't make the rules.
π¨ okay important aside: you may occasionally run into some alleged "Blowfish key" that falls outside that length range, and this constructor will straight up reject it. the lore is that Blowfish can internally process a key of any octet length up to 72 octets, and some implementations just don't enforce the official length restrictions. so if you need compatibility with those, a key of out-of-range length can be processed by Crypt::Eksblowfish::Uklblowfish. iykyk. π
π METHODS π
$cipher->blocksizeβ returns8, the Blowfish block size of 8 octets. same energy as the class method: callable on either the class or an instance. we stay consistent. β$cipher->encrypt(PLAINTEXT)βPLAINTEXTmust be exactly eight octets. like, exactly. the block gets encrypted, and the ciphertext comes back to you. π¦$cipher->decrypt(CIPHERTEXT)βCIPHERTEXTmust be exactly eight octets. same deal, reversed. the block gets decrypted, and the plaintext is returned. π₯$cipher->p_arrayand$cipher->s_boxesβ these two extract the subkeys from the keyed cipher. ngl, this is not required for ordinary operation at all β it's the little backstage moment. see the superclassCrypt::Eksblowfish::Subkeyedfor the details. π$cipher->is_weakβ checks whether the cipher has been keyed with a weak key. you may desire to avoid using weak keys (very fair, bestie), and again, the superclassCrypt::Eksblowfish::Subkeyedhas the details. π
π SEE ALSO π
Crypt::EksblowfishCrypt::Eksblowfish::SubkeyedCrypt::Eksblowfish::Uklblowfish- <http://www.schneier.com/blowfish.html>
like the whole friend group. go say hi. π«Ά
β AUTHOR β
the Eksblowfish guts were originally by Solar Designer (solar at openwall.com). the modifications and the Perl interface are by Andrew Main (Zefram) <zefram@fysh.org>. legends, both. π
π COPYRIGHT π
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Andrew Main (Zefram) <zefram@fysh.org>
the original Eksblowfish code β the one in the form of crypt(), from which this module is derived β is in the public domain. you can find it at <http://www.openwall.com/crypt/>. free as a bird, fr fr. ποΈ
π LICENSE π
this module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. periodt.
and that's the page, bestie π β that was the Crypt::Eksblowfish::Blowfish manual from perl v5.42.3, dated 2026-08-19, straight out of the User Contributed Perl Documentation. go forth and encrypt your little 8-octet heart out. mwah π
β¨
π¦ where this page comes from
- ubuntu stonking: libcrypt-eksblowfish-perl 0.009-3build6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms