Crypt::...::Anubis(3)
π Crypt::Cipher::Anubis β the perl manpage, but make it bestie π
okay so this is the page for Crypt::Cipher::Anubis, straight out of the User Contributed Perl Documentation crew π«Ά β and no, the manual name isn't a typo-scream, that's literally how it's filed, Crypt::...::Anubis(3). slay.
β¨ NAME β¨
Crypt::Cipher::Anubis β it's the Symmetric cipher Anubis, and its key size is 128-320 bits. that's the whole vibe. π₯
πΈ SYNOPSIS πΈ
okay so here's how you actually use it, two ways, pick your fighter:
### example 1
use Crypt::Mode::CBC;
my $key = '...'; # length must be a valid key size for this cipher
my $iv = '...'; # 16 bytes
my $cbc = Crypt::Mode::CBC->new('Anubis');
my $ciphertext = $cbc->encrypt("secret data", $key, $iv);
### example 2 (slower)
use Crypt::CBC;
use Crypt::Cipher::Anubis;
my $key = '...'; # length must be a valid key size for this cipher
my $iv = '...'; # 16 bytes
my $cbc = Crypt::CBC->new( -cipher=>'Cipher::Anubis', -key=>$key, -iv=>$iv );
my $ciphertext = $cbc->encrypt("secret data");
note the ### example 2 (slower) β that one's literally labeled slower by the module itself, not me being shady π iykyk.
π¦ DESCRIPTION π¦
so this module implements the Anubis cipher, and its interface is compatible with Crypt::CBC. matching energies, no drama. π
β οΈ the big note, do not skip this one bestie: This module only implements single-block encryption and decryption. For general data, use a block mode such asCrypt::Mode::CBC,Crypt::Mode::CTR, orCrypt::CBC(which is slower). don't rawdog your real data through one block, fr fr π
π METHODS π
unless it says otherwise, just assume $c is an existing cipher object you made with "new", like this:
my $c = Crypt::Cipher::Anubis->new($key);
π new
my $c = Crypt::Cipher::Anubis->new($key);
#or
my $c = Crypt::Cipher::Anubis->new($key, $rounds);
# $key .... [binary string] key of an accepted length (see keysize, min_keysize, max_keysize)
# $rounds . [integer] optional, number of rounds (if supported by the cipher; croaks on invalid value)
so $key is a binary string and it's gotta be an accepted length β check keysize, min_keysize, max_keysize for the deets. π and $rounds is optional, an integer, the number of rounds β if the cipher supports it. give it a bad value and it croaks, so likeβ¦ be normal about it π
π encrypt
encrypts exactly one block of plaintext. periodt. the length of $plaintext must equal "blocksize" β otherwise it croaks. an empty string is accepted and returned unchanged (iconic, no notes).
my $ciphertext = $c->encrypt($plaintext);
returns the encrypted block as a binary string (raw bytes). β¨
π decrypt
the reverse bestie: decrypts exactly one block of ciphertext. the length of $ciphertext must equal "blocksize" β otherwise it croaks. an empty string is accepted and returned unchanged.
my $plaintext = $c->decrypt($ciphertext);
returns the decrypted block as a binary string (raw bytes). π
β keysize
literally just an alias for "max_keysize". that's it, that's the method.
$c->keysize;
#or
Crypt::Cipher::Anubis->keysize;
#or
Crypt::Cipher::Anubis::keysize;
π blocksize
returns the cipher block size (in bytes).
$c->blocksize;
#or
Crypt::Cipher::Anubis->blocksize;
#or
Crypt::Cipher::Anubis::blocksize;
πΈ max_keysize
returns the maximum key size (in bytes).
$c->max_keysize;
#or
Crypt::Cipher::Anubis->max_keysize;
#or
Crypt::Cipher::Anubis::max_keysize;
π§ min_keysize
returns the minimum key size (in bytes).
$c->min_keysize;
#or
Crypt::Cipher::Anubis->min_keysize;
#or
Crypt::Cipher::Anubis::min_keysize;
π«Ά default_rounds
returns the cipher's default round count. the factory setting. the no-thoughts-just-vibes number of rounds. π
$c->default_rounds;
#or
Crypt::Cipher::Anubis->default_rounds;
#or
Crypt::Cipher::Anubis::default_rounds;
π₯ SEE ALSO π₯
- CryptX, Crypt::Cipher β go read these next bestie π
- https://en.wikipedia.org/wiki/Anubis_(cipher) β the wiki lore if you want the full backstory π¦
and that's the page!! π this whole thing is perl v5.42.0, dated 2026-05-11 β so when you cite it in the group chat, cite it right: perl v5.42.0, 2026-05-11, Crypt::...::Anubis(3). mwah πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-CryptX 0.89.0-bp160.1.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-CryptX 0.89.0-bp160.1.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-CryptX 0.89.0-bp160.1.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-CryptX 0.89.0-bp160.1.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms