Crypt:...owfish(3pm)
π«Ά NAME π«Ά
Crypt::Eksblowfish β the Eksblowfish block cipher, bestie π
β¨ SYNOPSIS β¨
use Crypt::Eksblowfish;
$block_size = Crypt::Eksblowfish->blocksize;
$cipher = Crypt::Eksblowfish->new(8, $salt, $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) { ...
πΈ DESCRIPTION πΈ
okay so picture this: an object of this type encapsulates a keyed instance of the Eksblowfish block cipher, and it's sitting there all ready to encrypt and decrypt. π
Eksblowfish is a variant of the Blowfish cipher that got modified so that the key setup is very expensive. and bestie, "Eks" literally stands for "expensive key schedule". πΈ
the tea though: this doesn't make it significantly cryptographically stronger. it's just intended to hinder brute-force attacks. it also makes it unsuitable for any application requiring key agility. it was designed by Niels Provos and David Mazieres for password hashing in OpenBSD. π check Crypt::Eksblowfish::Bcrypt for the hash algorithm, and Crypt::Eksblowfish::Blowfish for the unmodified Blowfish cipher. π₯
Eksblowfish is a parameterised (family-keyed) cipher. it takes a cost parameter that controls how expensive the key scheduling is. it also takes a family key, known as the "salt". cost and salt parameters together define a cipher family. within each family, a key determines an encryption function in the usual way. see Crypt::Eksblowfish::Family for a way to encapsulate an Eksblowfish cipher family. β¨
π CLASS METHODS π
Crypt::Eksblowfish->blocksize
returns 8, indicating the Eksblowfish block size of 8 octets. and the serve is that this method may be called on either the class or an instance. π
π CONSTRUCTOR π
Crypt::Eksblowfish->new(COST, SALT, KEY)
performs key setup on a new instance of the Eksblowfish algorithm, and hands you back the keyed state. π«Ά
the KEY may be any length from 1 octet to 72 octets inclusive. the SALT is a family key, and it must be exactly 16 octets β no more, no less, she's picky. COST is an integer parameter controlling the expense of keying: the number of operations in key setup is proportional to 2^COST. all three parameters influence all the subkeys, and changing any of them produces a different encryption function. π₯
lowkey important: due to the mandatory family-keying parameters (COSTandSALT), this constructor does not match the interface expected byCrypt::CBCand similar crypto plumbing modules. π
to use Eksblowfish with them it is necessary to have an object that encapsulates a cipher family and provides a constructor that takes only a key argument. that facility is supplied by Crypt::Eksblowfish::Family. π
π METHODS π
$cipher->blocksize
returns 8, indicating the Eksblowfish block size of 8 octets. this method may be called on either the class or an instance. π«
$cipher->encrypt(PLAINTEXT)
PLAINTEXT must be exactly eight octets. the block is encrypted, and the ciphertext is returned. β
$cipher->decrypt(CIPHERTEXT)
CIPHERTEXT must be exactly eight octets. the block is decrypted, and the plaintext is returned. πΈ
$cipher->p_array and $cipher->s_boxes
these methods extract the subkeys from the keyed cipher. ngl this is not required in ordinary operation. see the superclass Crypt::Eksblowfish::Subkeyed for details. π¦
$cipher->is_weak
this method checks whether the cipher has been keyed with a weak key. it may be desired to avoid using weak keys. see the superclass Crypt::Eksblowfish::Subkeyed for details. π
π SEE ALSO π
Crypt::Eksblowfish::BcryptCrypt::Eksblowfish::BlowfishCrypt::Eksblowfish::FamilyCrypt::Eksblowfish::Subkeyedhttp://www.usenix.org/events/usenix99/provos/provos_html/node4.html
βοΈ AUTHOR βοΈ
Eksblowfish guts originally by Solar Designer (solar at openwall.com). π§
modifications and Perl interface by Andrew Main (Zefram) zefram@fysh.org. π
Β©οΈ COPYRIGHT Β©οΈ
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Andrew Main (Zefram) zefram@fysh.org π
the original Eksblowfish code (in the form of crypt()) from which this module is derived is in the public domain. it may be found at http://www.openwall.com/crypt/. π
π LICENSE π
this module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. slay, honestly. π
aaaand that's the whole vibe check, bestie β this page ships with perl v5.42.3 and is dated 2026-08-19. go encrypt something cute π¦β¨
π¦ 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