view release on metacpan or search on metacpan
lib/Acme/DependOnEverything.pm view on Meta::CPAN
use Crypt::Cracklib;
use Crypt::Cryptoki;
use Crypt::Ctr;
use Crypt::Curve;
use Crypt::CVS;
use Crypt::DES;
use Crypt::DES_EDE;
use Crypt::DES_EEE;
use Crypt::DES_PP;
use Crypt::DH;
use Crypt::DH::GMP;
use Crypt::Diceware;
use Crypt::Dining;
use Crypt::Discordian;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/MSN/Protocol.pm view on Meta::CPAN
my $encrypted_data =
Crypt::CBC->new(-literal_key => 1,
-key => $key3,
-iv => $iv,
-header => 'none',
-cipher => 'Crypt::DES_EDE3'
)->encrypt($p_nonce);
# 7. Fill in the struct
my $struct = pack 'I7 A8 A20 A72', 28, 1, 0x6603, 0x8004, 8, 20, 72,
$iv,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/AppSamurai/Session/Serialize/CryptBase64.pm view on Meta::CPAN
# find_crypt() could just as easily do it here, but making the
# extenal code calling this module define it seems more appropriate.
die "No session SerializeCipher defined! Configure one of: " . join(',', @allowedciphers);
# Check passed in cipher against list of supported ciphers.
# (No, I will not allow you to use Crypt::DES. So sorry.)
} elsif (!exists($allowedcl{$session->{args}->{SerializeCipher}})) {
die "Bad session SerializeCipher defined: \"" . $session->{args}->{SerializeCipher} . "\". CryptBase64 requires one of: " . join(',', @allowedciphers);
}
# Only allow a specific set of
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthCookieLDAP.pm view on Meta::CPAN
use English qw(-no_match_vars);
use Digest::MD5 qw(md5_hex);
use Crypt::CBC;
use Crypt::DES;
use Net::LDAP;
use constant CIPHER_TYPES => qw(DES IDEA Blowfish Blowfish_PP);
use constant LOG_LEVELS => {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Authen/NTLM/HTTP.pm view on Meta::CPAN
use base qw/Authen::NTLM::HTTP::Base/;
@EXPORT = qw ();
@EXPORT_OK = qw ();
$VERSION = '0.33';
# Stolen from Crypt::DES.
sub usage {
my ($package, $filename, $line, $subr) = caller (1);
$Carp::CarpLevel = 2;
croak "Usage: $subr (@_)";
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Authen/Passphrase/LANManager.pm view on Meta::CPAN
=head1 SEE ALSO
L<Authen::Passphrase>,
L<Authen::Passphrase::LANManagerHalf>,
L<Crypt::DES>
=head1 AUTHOR
Andrew Main (Zefram) <zefram@fysh.org>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Authen/Perl/NTLM.pm view on Meta::CPAN
use strict;
use POSIX;
use Carp;
$Authen::Perl::NTLM::PurePerl = undef; # a flag to see if we load pure perl
# DES and MD4 modules
eval "require Crypt::DES && require Digest::MD4";
if ($@) {
eval "require Crypt::DES_PP && require Digest::Perl::MD4";
if ($@) {
die "Required DES and/or MD4 module doesn't exist!\n";
}
else {
$Authen::Perl::NTLM::PurePerl = 1;
lib/Authen/Perl/NTLM.pm view on Meta::CPAN
else {
$Authen::Perl::NTLM::PurePerl = 0;
}
if ($Authen::Perl::NTLM::PurePerl == 1) {
require Crypt::DES_PP;
Crypt::DES_PP->import;
require Digest::Perl::MD4;
import Digest::Perl::MD4 qw(md4);
}
else {
require Crypt::DES;
Crypt::DES->import;
require Digest::MD4;
import Digest::MD4;
}
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
lib/Authen/Perl/NTLM.pm view on Meta::CPAN
@ISA = qw (Exporter DynaLoader);
@EXPORT = qw ();
@EXPORT_OK = qw (nt_hash lm_hash calc_resp);
$VERSION = '0.12';
# Stolen from Crypt::DES.
sub usage {
my ($package, $filename, $line, $subr) = caller (1);
$Carp::CarpLevel = 2;
croak "Usage: $subr (@_)";
}
lib/Authen/Perl/NTLM.pm view on Meta::CPAN
}
my $lm_pw = substr($passwd, 0, 14);
$lm_pw = uc($lm_pw); # change the password to upper case
my $key = convert_key(substr($lm_pw, 0, 7)) . convert_key(substr($lm_pw, 7, 7));
if ($Authen::Perl::NTLM::PurePerl) {
$cipher1 = Crypt::DES_PP->new(substr($key, 0, 8));
$cipher2 = Crypt::DES_PP->new(substr($key, 8, 8));
}
else {
$cipher1 = Crypt::DES->new(substr($key, 0, 8));
$cipher2 = Crypt::DES->new(substr($key, 8, 8));
}
return $cipher1->encrypt($magic) . $cipher2->encrypt($magic) . pack("H10", "0000000000");
}
##########################################################################
lib/Authen/Perl/NTLM.pm view on Meta::CPAN
my $cipher2;
my $cipher3;
usage("key must be 21-bytes long") unless length($key) == 21;
usage("nonce must be 8-bytes long") unless length($nonce) == 8;
if ($Authen::Perl::NTLM::PurePerl) {
$cipher1 = Crypt::DES_PP->new(convert_key(substr($key, 0, 7)));
$cipher2 = Crypt::DES_PP->new(convert_key(substr($key, 7, 7)));
$cipher3 = Crypt::DES_PP->new(convert_key(substr($key, 14, 7)));
}
else {
$cipher1 = Crypt::DES->new(convert_key(substr($key, 0, 7)));
$cipher2 = Crypt::DES->new(convert_key(substr($key, 7, 7)));
$cipher3 = Crypt::DES->new(convert_key(substr($key, 14, 7)));
}
return $cipher1->encrypt($nonce) . $cipher2->encrypt($nonce) . $cipher3->encrypt($nonce);
}
#########################################################################
lib/Authen/Perl/NTLM.pm view on Meta::CPAN
=head1 DEPENDENCIES
To use this module, please install the one of the following two sets of
DES and MD4 modules:
1) Crypt::DES module by Dave Paris (DPARIS) and Digest::MD4 module by
Mike McCauley (MIKEM) first. These two modules are implemented in C.
2) Crypt::DES_PP module by Guido Flohr (GUIDO) and Digest::Perl::MD4
module by Ted Anderson (OTAKA). These two modules are implemented
in Perl.
The first set of modules will be preferred by NTLM because they are
supposedly faster.
lib/Authen/Perl/NTLM.pm view on Meta::CPAN
is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.
=head1 SEE ALSO
Digest::MD4(3), Crypt::DES(3), perl(1), m4(1).
=cut
Local Variables:
mode: perl
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Authen/SASL/Perl/DIGEST_MD5.pm view on Meta::CPAN
{
name => '3des',
ssf => 112,
bs => 8,
ks => 16,
pkg => 'Crypt::DES3',
key => sub {
pack('B8' x 16,
map { $_ . '0' }
map { unpack('a7' x 16, $_); }
unpack('B*', substr($_[0], 0, 14)) );
lib/Authen/SASL/Perl/DIGEST_MD5.pm view on Meta::CPAN
{
name => 'des',
ssf => 56,
bs => 8,
ks => 16,
pkg => 'Crypt::DES',
key => sub {
pack('B8' x 8,
map { $_ . '0' }
map { unpack('a7' x 8, $_); }
unpack('B*',substr($_[0], 0, 7)) );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bundle/Combust/Extras.pm view on Meta::CPAN
Class::ErrorHandler
Math::BigInt
Crypt::DES
Crypt::DES_EDE3
Convert::ASN1
Convert::PEM
view all matches for this distribution
view release on metacpan or search on metacpan
Everything.pm view on Meta::CPAN
Crypt::Caesar
Crypt::CipherSaber
Crypt::DES
Crypt::DH
Crypt::DSA
view all matches for this distribution
view release on metacpan or search on metacpan
GD fails with 5.8.8 and 5.8.3
Class::DBI fails with 5.8.8
RPC::PlServer fails with 5.8.8 and 5.8.3 but only if Crypt::DES is
installed
OK, so nothing new.
2006-10-24 Andreas J. Koenig <andreas.koenig.gmwojprw@franz.ak.mind.de>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/GAPI.pm view on Meta::CPAN
Class::GAPI will always use the right-most namespace fragment as the option in the option => value pair. (This may
cause a namespace conflict from time to time, in those cases just use the third stage _init instead.) So for example:
package SpyGuppy ;
use Crypt::CBC ; # block handler
use Crypt::DES ; # Encryption Algorythm.
use Class::GAPI ;
our @ISA = qw(Class::GAPI) ;
our @Children = qw(Crypt::CBC Crypt::DES) ;
1 ;
and then do:
my $pet = SpyGuppy->new() ;
view all matches for this distribution
view release on metacpan or search on metacpan
}
},
"runtime" : {
"requires" : {
"Crypt::CBC" : "2.32",
"Crypt::DES" : "2.05",
"MIME::Base64" : "3.13",
"Moo" : "1.000007"
}
}
},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Convert/PEM.pm view on Meta::CPAN
"$head\n$headers$content$tail\n";
}
use vars qw( %CTYPES );
%CTYPES = (
'DES-CBC' => {c => 'Crypt::DES', ks=>8, bs=>8, },
'DES-EDE3-CBC' => {c => 'Crypt::DES_EDE3', ks=>24, bs=>8, },
'AES-128-CBC' => {c => 'Crypt::Rijndael', ks=>16, bs=>16, },
'AES-192-CBC' => {c => 'Crypt::Rijndael', ks=>24, bs=>16, },
'AES-256-CBC' => {c => 'Crypt::Rijndael', ks=>32, bs=>16, },
'CAMELLIA-128-CBC' => {c => 'Crypt::Camellia', ks=>16, bs=>16, },
'CAMELLIA-192-CBC' => {c => 'Crypt::Camellia', ks=>24, bs=>16, },
lib/Convert/PEM.pm view on Meta::CPAN
Here is a list of the cipher modules used by default.
=over 4
=item * L<Crypt::DES>
=item * L<Crypt::DES_EDE3>
=item * L<Crypt::Rijndael> - C<AES-128-CBC, AES-192-CBC and AES-256-CBC>
=item * L<Crypt::Camellia> - C<CAMELLIA-128-CBC, CAMELLIA-192-CBC and CAMELLIA-256-CBC>
view all matches for this distribution
view release on metacpan or search on metacpan
Blowfish.pm view on Meta::CPAN
valid to use for this.
=head1 SEE ALSO
Crypt::CBC,
Crypt::DES,
Crypt::IDEA
Bruce Schneier, I<Applied Cryptography>, 1995, Second Edition,
published by John Wiley & Sons, Inc.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Crypt/CBC.pm view on Meta::CPAN
The B<-cipher> option specifies which block cipher algorithm to use to
encode each section of the message. This argument is optional and
will default to the secure Crypt::Cipher::AES algorithm.
You may use any compatible block encryption
algorithm that you have installed. Currently, this includes
Crypt::Cipher::AES, Crypt::DES, Crypt::DES_EDE3, Crypt::IDEA, Crypt::Blowfish,
Crypt::CAST5 and Crypt::Rijndael. You may refer to them using their
full names ("Crypt::IDEA") or in abbreviated form ("IDEA").
Instead of passing the name of a cipher class, you may pass an
already-created block cipher object. This allows you to take advantage
lib/Crypt/CBC.pm view on Meta::CPAN
same terms as Perl itself.
=head1 SEE ALSO
perl(1), CryptX, Crypt::FileHandle, Crypt::Cipher::AES,
Crypt::Blowfish, Crypt::CAST5, Crypt::DES, Crypt::IDEA,
Crypt::Rijndael
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
that were capable to handle only these 3 ciphers.
You have to install C<Crypt::CBC> v. 1.22 or later to work with C<Blowfish>.
Sure IDEA:: functions will work only if you have Crypt::IDEA installed,
DES:: - if you have Crypt::DES, Blowfish:: - if you have Crypt::Blowfish
and Crypt::CBC is version 1.22 or above etc.
Here's the list of the ciphers that could be called via the
C<Crypt::CBCeasy> interface today (in fact the same modules
that are C<Crypt::CBC> compatible):
Cipher CPAN module
DES Crypt::DES
IDEA Crypt::IDEA
Blowfish Crypt::Blowfish
Twofish2 Crypt::Twofish2
DES_PP Crypt::DES_PP
Blowfish_PP Crypt::Blowfish_PP
Rijndael Crypt::Rijndael
TEA Crypt::TEA
Note that cipher names are case sensitive in the C<IMPORT-LIST>,
Crypt::CBC by Lincoln Stein, lstein@cshl.org
v.1.20 or later.
one or more of
Crypt::IDEA, Crypt::DES, Crypt::Blowfish, Crypt::Blowfish_PP,
Crypt::Twofish2, Crypt::DES_PP or other Crypt::CBC compatible modules.
=head1 CAVEATS
This module has been created and tested in a Win95/98/2000Pro environment
with Perl 5.004_02 and ActiveState ActivePerl build 618.
view all matches for this distribution
view release on metacpan or search on metacpan
# close O;
__DATA__
Crypt::Blowfish 21a7e2e12244d6b15f952f1c250a09cd3e09a88cc33be4e4ba8b5ca8ecd71d172aeff0b26c4d9431167c89391fb163198b438f4c349438584e3b20bef0797d51c40232d7a5918b69904005448f961654ef77bf45b4dd2321bf307c55ba2ffd462099647f1b7d232cd584a7f8968729c49fda43017e...
Crypt::DES 505cd1b2bbfec96fd119da6e89fa4b6dc6956ff3476993e5012e7358dc7a945778830acd05cfd71b0793e27bbb0f649460bc5b14594bf299cf5cf9c2719a939982bce3a2b6117a677d2af8d06c07843ceea2927af7628f4f316bb97be980e30d421f94d8d43effa421f89a411e73318f5d34aece6ae98a1...
Crypt::DES_EDE3 61e41bc3d080559b16378ad8e2dc3aec54b92ebe1f6fd958ecf305ece3db382f9f2a5eb0fc34bc458a54d2c00e5c2ebdc336a948fd7a56db2820d3ec516fd699c6b325baf4fa34a7f65c203380fc615a142ff271fee243d50c21a5880d11c86fd368c16bc01d67900f6d2d3210e0a85fa7724397fc...
Crypt::GOST 99ef4c414da74ca6f3a86e84d68c88e0481267602cbb57ddead963d6ec3e8b6f041a5a19ea160141a2d41ad1c3ca5c16e20fc2aef6dc856aad752df6228a2caa4a0503cc0b499c09493ed177b6a088636b5dc62c10d01523dcd69565434bbf90872b5e07189451f688883a415a68df1fb55a445344bdb8...
Crypt::NULL 200020751b6848215226066f0121402c583d53731ef88aef81a1ddfd81a1d6a3cda9ccbecded9bf29ebed9bccfaac3b7bd9dbd9deb84eacaa2c7abcfaac4e488e785e0826416731d3d41611d3d4b244a6a0d7f8bf194e6c6a7d5b0d2b7deaa868cac8cacdab5dbfb9def8aff9bfe90bc9cf400630b6c09...
Crypt::RC6 6b8af71a1183e7026dda6081edb34613830cb4601b7a4b0cc6fe7155fc50806d95ef63ed2c5a8257a18224750b09bab6ce029f7d1a4ff8bca7d645528f00d1f9df034a5cc653b638b8d0d2bf8b7eed978fc727ca30b37e0d9c9d9868bad5f00b0b700022735c6a6ab396923cb1a8645a3d83ff31019b762...
Crypt::Rijndael a068886fb1bca003bef095a6012a305315696b8cdf8740c7f22d912c30dfb9df534306b493a89f66383f5d157e2339ff68a1f88da82ad0a3564ae0084f8c9c237301c292c3b4adb15ea343da91d38320da78474b35765165a92f0dd36d8ee4ad23d0d0d8d3057d3f77957b6d37981b26c6829556a2...
Crypt::Serpent 6ae724ce753187389f1508b62c5a7e3ee7cc6075c6315cb2f6b97a1d7137f399550b2e91a72cfa62a93f442750f38499c72e61f1ef4fa6bed6a953b58148b902d363fbf6bebd8071b06c2ceeda4c965c2b3704952fbfa34c6ff7f206f2beef4e82315c0b07d2b8a3a58ad846645fd252edb54291934...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Crypt/Camellia.pm view on Meta::CPAN
encrypt()
decrypt()
=back
Like many Crypt:: modules like L<Crypt::Blowfish> and L<Crypt::DES>,
this module works as a backend of L<Crypt::CBC>.
=head1 FUNCTIONS
=over 2
lib/Crypt/Camellia.pm view on Meta::CPAN
=head1 SEE ALSO
L<Crypt::CBC>,
L<Crypt::Rijndael>,
L<Crypt::DES>,
L<Crypt::IDEA>
=head1 AUTHOR
Dan Kogai, E<lt>dankogai@dan.co.jpE<gt>
view all matches for this distribution
view release on metacpan or search on metacpan
# close O;
__DATA__
Crypt::Blowfish 2172c2a14c8657bd1e40396781a107d977efeaacde94c4c7982427ea94ba200d0409f0740f99861970b97e3dbe5a054bb2ad95b0281ad4a10147c1472af0fa2aedcdaa1754a9583dc67f0530f0ffe699c6b9669c2572f9225851b1f2cc8779a950b5894fd128d3a335350e17b44d2a2f4f0da1b603...
Crypt::DES 506b62d77816e16c7a5a043a37764fbe03422fb8b3a48bd12001b89bcefeb7542710cda652a30d9bbe7fb088427577803815f79b7e50d361383796c0acc51f18f0fd3cd75e5730b57d3bf883a380f1df793dfaad05cb42a57ccfdadbecd43002aeb1a65354056dfa775053d5559b3b764c422388a8c0473...
Crypt::DES_EDE3 61cf476098dfa557cf5977142fc212d556394bff24852b0c22640cb30d502bb6849c396d9c915ca4015b8b04aaa3065d8633f6f86e1fa5bee309c62082a3b82c7a2eede910e594b9b2e4f025a504d1e73a1d23b5efa2a740d041b94ddad34431e4f6fa4c4d2c9440251f1080681c85486638f4ec8f...
Crypt::GOST 99783e7267256edf0aebd5f278245c62d0e5a96fc771739aa960650d8fb93ce072431831a5eb25f7d77bca9a8a12f856a419b43eabdaccc9ad39886c0bf20fdbe92b4936f3040f5d606ccc7eeed1ac6a5e4e66a4b09cbdd27fdb32e3f5acf5bed7ecddea0a05782ec875e3bc8669e3d67fd98d42cd7364...
Crypt::NULL 202020556e732069737420696e20616c74656e206de672656e207c207c2077756e646572732076696c206765736569740a202020766f6e2068656c64656e206c6f626562e672656e207c207c20766f6e206772f47a657220617265626569742c0a202020766f6e206672657564656e2c2068f463686765...
Crypt::RC6 6b88c512974e284f9e2194b17a2755ea314c46d5cb61f22f19394e3d30785442c110e3d39ac513d4860b44fb8532a3fb6e1a6f4ec65bd49c21e4761debebbb07d5e62c54ee08113a9cd259b6a1f0a6a06514ff849ffb5278ff2a46bac8985d872dac545db27e5b9cdeea2174679cfbb1d1e6214ffc60127...
Crypt::Rijndael a0885b0575c33bd11f28bfbca7fa08bcf64f2fbbc7ed8a8ac557e623f3cba05be89edf05832f29db9ab50d93401df860b8212b73d714ec8c719408ecda82bae02e214601af83fe001b7f4acdbaf263fdbc055546cce4d07a5191b81a88e8d4abd295c74463ae1811e6d5e5b1d1885bda13c8b65c66...
Crypt::Serpent 6abec9aee40585007f9fc42cd2ad2559c2eeec387033a7bffca9f2fa8226e51f3909db900eadedb978e1fbc3f1d7d67ef49ff5c63c5dd456e80213b26d227b1a82fbcca05e0a7c223c72890aa71943323850e38ce565f591996eb0024b1e92532c1c3021bb8d7ace5e63cd13c8b6a3e5f7e54d26bc2...
view all matches for this distribution
view release on metacpan or search on metacpan
# All rights reserved.
#
# Modifications are Copyright (c) 2000, W3Works, LLC
# All Rights Reserved.
package Crypt::DES;
require Exporter;
require DynaLoader;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
# Other items we are prepared to export if requested
@EXPORT_OK = qw();
$VERSION = '2.07';
bootstrap Crypt::DES $VERSION;
use strict;
use Carp;
sub usage
my $type = shift;
my $self = {};
bless $self, $type;
$self->{'ks'} = Crypt::DES::expand_key(shift);
return $self;
}
sub encrypt
{
usage("encrypt data[8 bytes]") unless @_ == 2;
my ($self,$data) = @_;
return Crypt::DES::crypt($data, $data, $self->{'ks'}, 1);
}
sub decrypt
{
usage("decrypt data[8 bytes]") unless @_ == 2;
my ($self,$data) = @_;
return Crypt::DES::crypt($data, $data, $self->{'ks'}, 0);
}
1;
__END__
=head1 NAME
Crypt::DES - Perl DES encryption module
=head1 SYNOPSIS
use Crypt::DES;
=head1 DESCRIPTION
The module implements the Crypt::CBC interface,
Returns the size (in bytes) of the key. Optimal size is 8 bytes.
=item new
my $cipher = new Crypt::DES $key;
This creates a new Crypt::DES BlockCipher object, using $key,
where $key is a key of C<keysize()> bytes.
=item encrypt
my $cipher = new Crypt::DES $key;
my $ciphertext = $cipher->encrypt($plaintext);
This function encrypts $plaintext and returns the $ciphertext
where $plaintext and $ciphertext should be of C<blocksize()> bytes.
=item decrypt
my $cipher = new Crypt::DES $key;
my $plaintext = $cipher->decrypt($ciphertext);
This function decrypts $ciphertext and returns the $plaintext
where $plaintext and $ciphertext should be of C<blocksize()> bytes.
=back
=head1 EXAMPLE
my $key = pack("H16", "0123456789ABCDEF");
my $cipher = new Crypt::DES $key;
my $ciphertext = $cipher->encrypt("plaintex"); # NB - 8 bytes
print unpack("H16", $ciphertext), "\n";
=head1 NOTES
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Crypt/DES_EDE3.pm view on Meta::CPAN
# $Id: DES_EDE3.pm,v 1.2 2001/09/15 03:41:09 btrott Exp $
package Crypt::DES_EDE3;
use strict;
use Crypt::DES;
use vars qw( $VERSION );
our $VERSION = '0.03'; #VERSION
sub new {
lib/Crypt/DES_EDE3.pm view on Meta::CPAN
sub init {
my $ede3 = shift;
my($key) = @_;
for my $i (1..3) {
$ede3->{"des$i"} = Crypt::DES->new(substr $key, 8*($i-1), 8);
}
$ede3;
}
sub encrypt {
lib/Crypt/DES_EDE3.pm view on Meta::CPAN
1;
__END__
=head1 NAME
Crypt::DES_EDE3 - Triple-DES EDE encryption/decryption
=head1 SYNOPSIS
use Crypt::DES_EDE3;
my $ede3 = Crypt::DES_EDE3->new($key);
$ede3->encrypt($block);
=head1 DESCRIPTION
I<Crypt::DES_EDE3> implements DES-EDE3 encryption. This is triple-DES
encryption where an encrypt operation is encrypt-decrypt-encrypt, and
decrypt is decrypt-encrypt-decrypt. This implementation uses I<Crypt::DES>
to do its dirty DES work, and simply provides a wrapper around that
module: setting up the individual DES ciphers, initializing the keys,
and performing the encryption/decryption steps.
DES-EDE3 encryption requires a key size of 24 bytes.
lib/Crypt/DES_EDE3.pm view on Meta::CPAN
module in conjunction with I<Crypt::CBC>, for example. This would be
DES-EDE3-CBC, or triple-DES in outer CBC mode.
=head1 USAGE
=head2 $ede3 = Crypt::DES_EDE3->new($key)
Creates a new I<Crypt::DES_EDE3> object (really, a collection of three DES
ciphers), and initializes each cipher with part of I<$key>, which should be
at least 24 bytes. If it's longer than 24 bytes, the extra bytes will be
ignored.
Returns the new object.
lib/Crypt/DES_EDE3.pm view on Meta::CPAN
Returns the key size (24).
=head1 LICENSE
Crypt::DES_EDE3 is free software; you may redistribute it and/or modify
it under the same terms as Perl itself.
=head1 AUTHOR & COPYRIGHTS
Crypt::DES_EDE3 is Copyright 2001 Benjamin Trott, ben@rhumba.pair.com. All
rights reserved.
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Crypt/DES_EEE3.pm view on Meta::CPAN
package Crypt::DES_EEE3;
use strict;
use Crypt::DES;
use Crypt::DES_EDE3;
use vars qw( $VERSION @ISA );
$VERSION = '0.01';
@ISA= qw(Crypt::DES_EDE3);
sub encrypt {
my($ede3, $block) = @_;
$ede3->{des3}->encrypt(
$ede3->{des2}->encrypt(
lib/Crypt/DES_EEE3.pm view on Meta::CPAN
1;
__END__
=head1 NAME
Crypt::DES_EEE3 - Triple-DES EEE encryption/decryption
=head1 SYNOPSIS
use Crypt::DES_EEE3;
my $ede3 = Crypt::DES_EEE3->new($key);
$ede3->encrypt($block);
=head1 DESCRIPTION
I<Crypt::DES_EEE3> implements DES-EEE3 encryption. This is triple-DES
encryption where an encrypt operation is encrypt-encrypt-encrypt, and
decrypt is decrypt-decrypt-decrypt. This implementation uses I<Crypt::DES>
to do its dirty DES work, and simply provides a wrapper around that
module: setting up the individual DES ciphers, initializing the keys,
and performing the encryption/decryption steps.
DES-EEE3 encryption requires a key size of 24 bytes.
lib/Crypt/DES_EEE3.pm view on Meta::CPAN
module in conjunction with I<Crypt::CBC>, for example. This would be
DES-EEE3-CBC, or triple-DES in outer CBC mode.
=head1 USAGE
=head2 $ede3 = Crypt::DES_EEE3->new($key)
Creates a new I<Crypt::DES_EEE3> object (really, a collection of three DES
ciphers), and initializes each cipher with part of I<$key>, which should be
at least 24 bytes. If it's longer than 24 bytes, the extra bytes will be
ignored.
Returns the new object.
lib/Crypt/DES_EEE3.pm view on Meta::CPAN
Returns the key size (24).
=head1 LICENSE
Crypt::DES_EEE3 is free software; you may redistribute it and/or modify
it under the same terms as Perl itself.
=head1 AUTHOR & COPYRIGHTS
Copyright 2003 by Kang-min Liu <gugod@gugod.org>.
lib/Crypt/DES_EEE3.pm view on Meta::CPAN
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
See <http://www.perl.com/perl/misc/Artistic.html>
Thanks to the previous work of Crypt::DES_EDE3 by Benjamin Troot
<ben@rhumba.pair.com>
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Crypt/DES_PP.pm view on Meta::CPAN
# DES_PP.pm - Pure perl implementation of DES.
#
# The master file for the module is DES_PP.m4 which needs to be run through
# the m4. Please edit DES_PP.m4 if you need to modify!
package Crypt::DES_PP;
use strict;
use Carp;
use integer;
lib/Crypt/DES_PP.pm view on Meta::CPAN
@EXPORT_OK = qw ();
$VERSION = '1.00';
use constant BLKSIZE => 8;
# Stolen from Crypt::DES.
sub usage {
my ($package, $filename, $line, $subr) = caller (1);
$Carp::CarpLevel = 2;
croak "Usage: $subr (@_)";
}
lib/Crypt/DES_PP.pm view on Meta::CPAN
sub expand_key ($);
sub crypt ($$$);
sub new {
usage ("new Crypt::DES_PP key")
unless @_ == 2;
my ($package, $key) = @_;
bless { ks => Crypt::DES_PP::expand_key ($key) }, $package;
}
sub encrypt {
usage ("encrypt data[8 bytes]") unless @_ == 2;
my ($self,$data) = @_;
return Crypt::DES_PP::crypt ($data, $self->{ks}, 1);
}
sub decrypt {
usage("decrypt data[8 bytes]") unless @_ == 2;
my ($self,$data) = @_;
return Crypt::DES_PP::crypt ($data, $self->{ks}, 0);
}
use constant ITERATIONS => 16;
# These used to be a single reference to an array of array references.
lib/Crypt/DES_PP.pm view on Meta::CPAN
__END__
=head1 NAME
Crypt::DES_PP - Perl extension for DES encryption
=head1 SYNOPSIS
use Crypt::DES_PP;
$des = Crypt::DES_PP->new ($key);
$cipher = $des->encrypt ($plain);
$plain = $des->decrypt ($cipher);
$blocksize = $des->blocksize;
$keysize = $des->keysize;
=head1 DESCRIPTION
The Data Encryption Standard (DES), also known as Data Encryption
Algorithm (DEA) is a semi-strong encryption and decryption algorithm.
The module is 100 % compatible to Crypt::DES but is implemented
entirely in Perl. That means that you do not need a C compiler to
build and install this extension.
The module implements the Crypt::CBC interface. You are encouraged
to read the documentation for Crypt::CBC if you intend to use this
lib/Crypt/DES_PP.pm view on Meta::CPAN
the Free Software Foundation, Inc. It is covered by the GNU library
license version 2, see the file ``COPYING.LIB''.
=head1 SEE ALSO
Crypt::CBC(3), Crypt::DES(3), perl(1), m4(1).
=cut
Local Variables:
mode: perl
view all matches for this distribution
view release on metacpan or search on metacpan
"perl" : "5.006"
}
},
"test" : {
"requires" : {
"Crypt::DES_EDE3" : "0",
"Test::More" : "0"
}
}
},
"release_status" : "stable",
view all matches for this distribution
view release on metacpan or search on metacpan
# delete possibly existing cipher obj from a previous crypt process
# otherwise changes in the cipher would not be recognized by start()
$self->{_cipherobj} = '';
}
# some packages like Crypt::DES and Crypt::IDEA behave strange in the way
# that their methods do not belong to the Crypt::DES or Crypt::IDEA namespace
# but only DES or IDEA instead
unless ($module->can('blocksize')) { $module=$cipher }
die "Can't work because Crypt::$cipher doesn't report blocksize."
. " Are you sure $cipher is a valid cipher module?\n"
Christoph Appel (see ECB.pm for email address)
=head1 SEE ALSO
perl(1), Crypt::DES(3), Crypt::IDEA(3), Crypt::CBC(3)
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
my $ciphertext = $cipher->encrypt("plaintex"); # NB - 8 bytes
print unpack("H16", $ciphertext), "\n";
=head1 SEE ALSO
Crypt::CBD, Crypt::DES, Crypt::Blowfish
Bruce Schneier, I<Applied Cryptography>, 1995, Second Edition,
published by John Wiley & Sons, Inc.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Crypt/Keys/Private/RSA/SSH1.pm view on Meta::CPAN
use vars qw( %CIPHERS );
BEGIN {
%CIPHERS = (
1 => undef, ## IDEA: requires CFB
2 => sub { ## DES
require Crypt::DES;
Crypt::CBC->new(
Cipher => Crypt::DES->new(substr $_[0], 0, 8),
IV => chr(0)x8,
);
},
3 => sub { ## 3DES
Crypt::Keys::Private::RSA::SSH1::DES3->new($_[0]);
lib/Crypt/Keys/Private/RSA/SSH1.pm view on Meta::CPAN
package Crypt::Keys::Private::RSA::SSH1::DES3;
use strict;
use Crypt::CBC;
use Crypt::DES;
sub new {
my $class = shift;
my $cipher = bless {}, $class;
$cipher->init(@_) if @_;
lib/Crypt/Keys/Private/RSA/SSH1.pm view on Meta::CPAN
my $this_key = $i == 3 && length($key) <= 16 ?
substr $key, 0, 8 :
substr $key, 8*($i-1), 8;
$cipher->{"cbc$i"} = Crypt::CBC->new({
key => $this_key,
cipher => 'Crypt::DES',
regenerate_key => 0,
iv => chr(0)x8,
prepend_iv => 0,
});
}
view all matches for this distribution
view release on metacpan or search on metacpan
Kang-min Liu <gugod@gugod.org>.
=head1 SEE ALSO
perl(1), Crypt::DES(3), Crypt::IDEA(3), Crypt::CBC(3), Crypt::ECB(3)
=cut
view all matches for this distribution