Crypt::DES_EDE3(3pm)
π Crypt::DES_EDE3 π
okay bestie, so this is a page from the User Contributed Perl Documentation and it's literally all about Crypt::DES_EDE3, which lives in section 3pm of the manual (that's the Perl module section, iykyk). pull up a chair, grab a strawberry, we're doing crypto β¨
πΈ NAME πΈ
Crypt::DES_EDE3 β Triple-DES EDE encryption/decryption. that's it, that's the name, and it ate π
β¨ SYNOPSIS β¨
here's the whole vibe in three lines, no cap:
use Crypt::DES_EDE3;
my $ede3 = Crypt::DES_EDE3->new($key);
$ede3->encrypt($block);
like... that's the entire relationship. use it, make it, encrypt with it π¦
π DESCRIPTION π
so Crypt::DES_EDE3 implements DES-EDE3 encryption. and what even is that? it's triple-DES encryption, where:
- an encrypt operation is encrypt-decrypt-encrypt π₯
- a decrypt operation is decrypt-encrypt-decrypt π
this implementation is lowkey a delegator β it uses Crypt::DES to do its dirty DES work, and just wraps around that module. the wrapping is: setting up the individual DES ciphers, initializing the keys, and performing the encryption/decryption steps. that's the whole job. main character of a wrapper, honestly.
DES-EDE3 encryption requires a key size of 24 bytes. remember that number. it matters. periodt.
bestie, real talk: you're probably best off not using this module directly, because theencryptanddecryptmethods expect 8-octet blocks. like, just 8. that's a tiny little block. you might want to use this module in conjunction withCrypt::CBC, for example. that combo would be DES-EDE3-CBC, aka triple-DES in outer CBC mode. much more civilized π
π USAGE π
$ede3 = Crypt::DES_EDE3->new($key)
creates a new Crypt::DES_EDE3 object β and ngl, it's really a collection of three DES ciphers π§ β and initializes each cipher with part of $key.
$key should be at least 24 bytes. and if it's longer than 24 bytes? the extra bytes will be ignored. not deleted, not punished, just... ignored π
returns the new object. slay.
$ede3->encrypt($block)
encrypts an 8-byte block of data $block using the three DES ciphers in an encrypt-decrypt-encrypt operation. that's the EDE, bestie, it's literally in the name π
returns the encrypted block.
$ede3->decrypt($block)
decrypts an 8-byte block of data $block using the three DES ciphers in a decrypt-encrypt-decrypt operation. the mirror image. the reverse uno card πͺ
returns the decrypted block.
$ede3->blocksize
returns the block size, which is 8.
tiny block, big energy β
$ede3->keysize
returns the key size, which is 24.
that's 24 bytes of pure security vibes π
π LICENSE π
Crypt::DES_EDE3 is free software; you may redistribute it and/or modify it under the same terms as Perl itself. so like, go off, but respect the terms π«Ά
π AUTHOR & COPYRIGHTS π
Crypt::DES_EDE3 is Copyright 2001 Benjamin Trott, ben@rhumba.pair.com.
All rights reserved.
and that's the whole page, bestie π no notes, iconic behavior from a triple-DES wrapper fr fr.
this page ships with perl v5.40.0 and it's dated 2024-11-16 β so when you're out here reading Crypt::DES_EDE3(3pm), just know you're reading a certified classic from the User Contributed Perl Documentation. bye babe, encrypt responsibly πβ¨
π¦ where this page comes from
- debian trixie: libcrypt-des-ede3-perl 0.03-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcrypt-des-ede3-perl 0.03-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcrypt-des-ede3-perl 0.03-1 Β· 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