Crypt-OpenPGP
view release on metacpan or search on metacpan
* Vipul Ved Prakash, from whose Convert::ASCII::Armour I borrowed
some regexen for unarmouring data, and who has helped out enormously
with testing against various PGP releases, sending patches, etc.
* Developers of CPAN modules everywhere. Or at least, the modules
upon which I'm relying. :) A list:
Ilya Zakharevich - Math::Pari
Gisle Aas - MIME::Base64, Digest::MD5, Digest::SHA1
Dave Paris - Crypt::DES, Crypt::IDEA (Systemics), Crypt::Blowfish
Abhijit Menon-Sen - Crypt::Twofish
Rafael R. Sevilla - Crypt::Rijndael
Christian H. Geuer-Pollman - Crypt::RIPEMD160
Vipul Ved Prakash - Crypt::RSA
Paul Marquess - Compress::Zlib
Bob Mathews - Crypt::CAST5_PP
* Gary Howland's original pure-Perl PGP code (part of Cryptix) was
useful when I was planning the structure of the code, in
implementing the CRC24 algorithm, and for the basis of the (now
information, either specified through the constructor, or set
in a config file. Reads from existing PGP/GnuPG config files.
- Added --compat arg to bin/pgplet for demonstration of usage of
Compat flag to constructor, which then gets propagated down to
methods, selects keyrings, etc.
- Made keyring selection based on compatibility mode, if given.
- Automatically read in appropriate config file if Compat flag
given.
- Added tests for encrypting/decrypting block of text to t/06-cipher.t.
- Added --sdk option to Makefile.PL to bypass interactive prompts.
- Removed Crypt::DES_EDE3 from this distribution, moved into its own
distribution.
0.16 2001-08-15
- Took stupid extraneous files out of lib. Ick.
0.15 2001-08-15
- Added bin/pgplet as an example of Crypt::OpenPGP usage.
- Added PassphraseCallback parameter to Crypt::OpenPGP::decrypt
and Crypt::OpenPGP::sign; this callback will be invoked when a
passphrase to unlock the secret key is not provided, but is needed.
"ExtUtils::MakeMaker" : "0"
}
},
"runtime" : {
"requires" : {
"Alt::Crypt::RSA::BigInt" : "0",
"Bytes::Random::Secure" : "0",
"Compress::Zlib" : "0",
"Crypt::Blowfish" : "0",
"Crypt::CAST5_PP" : "0",
"Crypt::DES_EDE3" : "0",
"Crypt::DSA" : "1.17",
"Crypt::IDEA" : "0",
"Crypt::RIPEMD160" : "0.05",
"Crypt::Rijndael" : "0",
"Crypt::Twofish" : "0",
"Data::Buffer" : "0.04",
"Digest::MD5" : "0",
"Digest::SHA" : "0",
"File::HomeDir" : "0",
"LWP::UserAgent" : "0",
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: Crypt-OpenPGP
requires:
Alt::Crypt::RSA::BigInt: '0'
Bytes::Random::Secure: '0'
Compress::Zlib: '0'
Crypt::Blowfish: '0'
Crypt::CAST5_PP: '0'
Crypt::DES_EDE3: '0'
Crypt::DSA: '1.17'
Crypt::IDEA: '0'
Crypt::RIPEMD160: '0.05'
Crypt::Rijndael: '0'
Crypt::Twofish: '0'
Data::Buffer: '0.04'
Digest::MD5: '0'
Digest::SHA: '0'
File::HomeDir: '0'
LWP::UserAgent: '0'
Makefile.PL view on Meta::CPAN
"bin/pgplet"
],
"LICENSE" => "perl",
"NAME" => "Crypt::OpenPGP",
"PREREQ_PM" => {
"Alt::Crypt::RSA::BigInt" => 0,
"Bytes::Random::Secure" => 0,
"Compress::Zlib" => 0,
"Crypt::Blowfish" => 0,
"Crypt::CAST5_PP" => 0,
"Crypt::DES_EDE3" => 0,
"Crypt::DSA" => "1.17",
"Crypt::IDEA" => 0,
"Crypt::RIPEMD160" => "0.05",
"Crypt::Rijndael" => 0,
"Crypt::Twofish" => 0,
"Data::Buffer" => "0.04",
"Digest::MD5" => 0,
"Digest::SHA" => 0,
"File::HomeDir" => 0,
"LWP::UserAgent" => 0,
Makefile.PL view on Meta::CPAN
}
);
my %FallbackPrereqs = (
"Alt::Crypt::RSA::BigInt" => 0,
"Bytes::Random::Secure" => 0,
"Compress::Zlib" => 0,
"Crypt::Blowfish" => 0,
"Crypt::CAST5_PP" => 0,
"Crypt::DES_EDE3" => 0,
"Crypt::DSA" => "1.17",
"Crypt::IDEA" => 0,
"Crypt::RIPEMD160" => "0.05",
"Crypt::Rijndael" => 0,
"Crypt::Twofish" => 0,
"Data::Buffer" => "0.04",
"Digest::MD5" => 0,
"Digest::SHA" => 0,
"File::HomeDir" => 0,
"LWP::UserAgent" => 0,
Bytes::Random::Secure = 0
; see https://github.com/btrott/Crypt-OpenPGP/pull/10
Alt::Crypt::RSA::BigInt = 0
; PGP2 compat.
Crypt::IDEA = 0
Digest::MD5 = 0
; PGP5 compat.
Crypt::DES_EDE3 = 0
Digest::SHA = 0
; GnuPG compat.
Crypt::CAST5_PP = 0
Crypt::RIPEMD160 = 0.05
Crypt::Rijndael = 0
; Other ciphers.
Crypt::Blowfish = 0
Crypt::Twofish = 0
lib/Crypt/OpenPGP/Cipher.pm view on Meta::CPAN
sub crypt_class { 'Crypt::Blowfish' }
sub keysize { 16 }
sub blocksize { 8 }
package Crypt::OpenPGP::Cipher::DES3;
use strict;
use warnings;
use base qw( Crypt::OpenPGP::Cipher );
sub crypt_class { 'Crypt::DES_EDE3' }
sub keysize { 24 }
sub blocksize { 8 }
package Crypt::OpenPGP::Cipher::CAST5;
use strict;
use warnings;
use base qw( Crypt::OpenPGP::Cipher );
sub crypt_class { ['Crypt::CAST5_PP', 'Crypt::CAST5'] }
t/03-3des.t view on Meta::CPAN
use strict;
use Test::More;
eval "use Crypt::OpenPGP::CFB; use Crypt::DES_EDE3";
if ( $@ ) {
plan skip_all => 'test requires DES-EDE3 installed';
}
plan tests => 5;
my $KEY = pack "H64", ( "0123456789ABCDEF" x 4 );
my( $des1, $des2 );
$des1 = Crypt::DES_EDE3->new( $KEY );
isa_ok $des1, 'Crypt::DES_EDE3';
is $des1->keysize, 24, 'keysize is 24 bytes';
$des2 = Crypt::DES_EDE3->new( $KEY );
isa_ok $des2, 'Crypt::DES_EDE3';
my( $enc, $dec );
my $check_bytes = _checkbytes();
$enc = $des1->encrypt( $check_bytes );
ok $enc, 'ciphertext is defined';
$dec = $des2->decrypt( $enc );
is $dec, $check_bytes, 'decrypted matches plaintext';
sub _checkbytes {
my( $check1, $check2 ) = ( chr int rand 255, chr int rand 255 );
( run in 0.366 second using v1.01-cache-2.11-cpan-9a3d99fc6dc )