Crypt::...er::SEED(3)
π NAME π
Crypt::Cipher::SEED β the symmetric cipher SEED, bestie! key size: 128 bits β¨
(it lives in the Perl world too β that's the Crypt::...er::SEED(3) energy you saw up top, don't worry about it π
)
π¦ SYNOPSIS π¦
ok 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('SEED');
my $ciphertext = $cbc->encrypt("secret data", $key, $iv);
### example 2 (slower)
use Crypt::CBC;
use Crypt::Cipher::SEED;
my $key = '...'; # length must be a valid key size for this cipher
my $iv = '...'; # 16 bytes
my $cbc = Crypt::CBC->new( -cipher=>'Cipher::SEED', -key=>$key, -iv=>$iv );
my $ciphertext = $cbc->encrypt("secret data");
no cap, example 2 is literally slower β that's the whole note π«Ά
πΈ DESCRIPTION πΈ
so this module implements the SEED cipher, and its interface is compatible with Crypt::CBC β iconic behavior, honestly π
β οΈ note, and this one matters: this module only implements single-block encryption and decryption. like, one block. that's it. for general data you need a block mode β use something likeCrypt::Mode::CBC,Crypt::Mode::CTR, orCrypt::CBC(which is slower). don't come for me, that's just what it says π
π METHODS π
unless noted otherwise, assume $c is an existing cipher object you made via new, like:
my $c = Crypt::Cipher::SEED->new($key);
β¨ new
makes you a fresh cipher object, slay:
my $c = Crypt::Cipher::SEED->new($key);
#or
my $c = Crypt::Cipher::SEED->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 of an accepted length β check keysize, min_keysize, max_keysize for what's valid, iykyk. and $rounds is an optional integer for the number of rounds (if the cipher supports it β and it croaks on an invalid value, so behave π).
π encrypt
encrypts exactly one block of plaintext. the length of $plaintext must equal blocksize, and it croaks otherwise β respect the boundary bestie π. an empty string is accepted and returned unchanged, which is giving "no thoughts, head empty" and honestly valid.
my $ciphertext = $c->encrypt($plaintext);
returns the encrypted block as a binary string (raw bytes). raw. bytes. periodt π
π decrypt
decrypts exactly one block of ciphertext. same deal β the length of $ciphertext must equal blocksize, croaks otherwise. and yeah, an empty string is accepted and returned unchanged here too π
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 the whole vibe:
$c->keysize;
#or
Crypt::Cipher::SEED->keysize;
#or
Crypt::Cipher::SEED::keysize;
three ways to call it, all iconic, pick whichever π«Ά
β blocksize
returns the cipher block size (in bytes):
$c->blocksize;
#or
Crypt::Cipher::SEED->blocksize;
#or
Crypt::Cipher::SEED::blocksize;
π₯ max_keysize
returns the maximum key size (in bytes):
$c->max_keysize;
#or
Crypt::Cipher::SEED->max_keysize;
#or
Crypt::Cipher::SEED::max_keysize;
πΈ min_keysize
returns the minimum key size (in bytes):
$c->min_keysize;
#or
Crypt::Cipher::SEED->min_keysize;
#or
Crypt::Cipher::SEED::min_keysize;
π§ default_rounds
returns the cipher's default round count:
$c->default_rounds;
#or
Crypt::Cipher::SEED->default_rounds;
#or
Crypt::Cipher::SEED::default_rounds;
π SEE ALSO π
CryptX,Crypt::Cipherβ the squad π- <https://en.wikipedia.org/wiki/SEED> β the lore, go read it π¦
so yeah, that's the whole page bestie, go encrypt something single-block and be normal about it π β¨
sign-off moment: this lil gem ships with perl v5.42.0, dated 2026-05-11, and it's the Crypt::...er::SEED(3) page you've been reading the whole time π mwah, bye π«Ά
π¦ 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