view release on metacpan or search on metacpan
- Merge PR#1 from @jeremy-church to add extra cipher support
- Add DES support
- Add AES 128/192/256 support
- Add IDEA support
- Add SEED Support
- Add Camellia 128/192/256 support
- Add tests and test files for additional ciphers and alternate cipher modules (if available)
- Add supporting function(s)/method(s) for additional ciphers
- Add tests to verify OpenSSL can read files encrypted by Convert::PEM (if available)
- Change key bytes_to_key in Convert::PEM::CBC to match openssl algorithm
- Make some modifications to accommodate SEED and IDEA (realy old) cipher modules
- Make ASN optional
- Add DER support and documentation
- Add other access methods to documentation
- Additional encode/decode testing with DER
[Detailed Changes]
- c4128fd no need to use eval for blocksize call
- 0cdf983 Remove execution attributes on test files
- aa16478 Move the pem and der files to a sub directory
Changes
LICENSE
MANIFEST
META.json
META.yml
Makefile.PL
README
SIGNATURE
dist.ini
lib/Convert/PEM.pm
lib/Convert/PEM/CBC.pm
t/00-compile.t
t/01-readwrite.t
t/02-encode.t
t/03-ede3.t
t/04-explode.t
t/05-des.t
t/06-aes.t
t/07-3des.t
t/08-idea.t
t/09-seed.t
-----END DH PARAMETERS-----
The string beginning "MB4C..." is the Base64-encoded, ASN.1-encoded
"object."
An encrypted file would have headers describing the type of encryption
used, and the initialization vector:
-----BEGIN DH PARAMETERS-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,C814158661DC1449
AFAZFbnQNrGjZJ/ZemdVSoZa3HWujxZuvBHzHNoesxeyqqidFvnydA==
-----END DH PARAMETERS-----
The two headers ("Proc-Type" and "DEK-Info") indicate information about
the type of encryption used, and the string starting with "AFAZ..." is
the Base64-encoded, encrypted, ASN.1-encoded contents of this "object."
The initialization vector ("C814158661DC1449") is chosen randomly.
May be used in lieu of Content. If specified, will override Content.
* Password
A password used to encrypt the contents of the PEM file. This is an
optional argument; if not provided the contents will be unencrypted.
* Cipher
The Cipher to use if a password is provided. This is an optional
argument; if not provided, the default of DES-EDE3-CBC will be used
or the cipher configured is $Convert::PEM::DefaultCipher. See below
for a list of supported ciphers.
$obj = $pem->read(%args)
Reads, decodes, and, optionally, decrypts a PEM file, returning the
object as decoded by *Convert::ASN1* (or binary blob if ASN.1
description was not provided). This is implemented as a wrapper around
*decode*, with the bonus of reading the PEM file from disk for you.
If an error occurs while reading the file or decrypting/decoding the
$Convert::PEM::DefaultCipher *or* $OBJ->DefaultCipher(*[NEW_CIPHER]*)
Used to configure a default cipher when writing to the disk. When using
the method form " $OBJ-"DefaultCipher([NEW_CIPHER]) >, if NEW_CIPHER is
not specified, will return the current setting. If the specified cipher
is not recognized/valid, an error will be raised.
To list supported ciphers, use "Convert::PEM::list_ciphers". Here is a
list of supported Ciphers:
* DES-CBC
* DES-EDE3-CBC
* AES-128-CBC
* AES-192-CBC
* AES-256-CBC
* CAMELLIA-128-CBC
* CAMELLIA-192-CBC
* CAMELLIA-256-CBC
* IDEA-CBC
* SEED-CBC
Convert::PEM->has_cipher(*$cipher_name*)
Will see if the cipher is supported and is configured with an encryption
module.
Convert::PEM->has_cipher_module(*$cipher_name*)
Will see if the cipher is supported and if the configured encryption
module is usable. If it is not usable, will return "undef". If it is
usable, will return the name of the cipher module.
*cipher_name* is not provided, will return a list of modules names
configured as an array in array context or as a colon separated list in
scalar context.
Here is a list of the cipher modules used by default.
* Crypt::DES
* Crypt::DES_EDE3
* Crypt::Rijndael - "AES-128-CBC, AES-192-CBC and AES-256-CBC"
* Crypt::Camellia - "CAMELLIA-128-CBC, CAMELLIA-192-CBC and
CAMELLIA-256-CBC"
* Crypt::IDEA
* Crypt::SEED
ERROR HANDLING
If an error occurs in any of the above methods, the method will return
"undef". You should then call the method *errstr* to determine the
source of the error:
SHA256 3067c15645c76e56649893cc6d428ea6a625b707a218df9d39f44b1a529c057d Changes
SHA256 a6baf35c651ea8b931bfb6c0542d59bf42835eb55f997ee31081886d8b5e2244 LICENSE
SHA256 9f7af0b6c828b50a4d09f3e90a9723b0f22bb81f88a0a3bc0020773b0ea6df82 MANIFEST
SHA256 54312777cc744a170fa6d7967c0befd66ae0303579bd0e15c8f964e6a93f7663 META.json
SHA256 5f0a1327fcf80c9f07fdcde985f0fba6df456ff6d163054e234d7ab9df99a308 META.yml
SHA256 539ee249316cf9e2c99a85b46303e6ce6b299c6f12f199288cbc701802658abb Makefile.PL
SHA256 52bf7bd189b41b3cd33c02daf92bf89b52a3a656b592a5832022fafc98d889b3 README
SHA256 19d56026573c7c74b9b21866e5cfcdaa40f9b3f5ef0771949424661013f6dd41 dist.ini
SHA256 0178cc76ba367c726bc9031f6d5fcf7e55a2a19e8c90ca76da20d068d152535e lib/Convert/PEM.pm
SHA256 2538d282eb8ce0bcdd65fd161feb3805b7fd02d416fdeb959ec0b7e66eeadb58 lib/Convert/PEM/CBC.pm
SHA256 7bccdccfcf97374ba5669237bced4efc9f7b7fb24ddb10a76b3f284e5eeaefd4 t/00-compile.t
SHA256 1c086554d12bbd7df18671a9e7d45af499a33576c4cac0d891bccd12e7c02f0e t/01-readwrite.t
SHA256 54977ffdd2048bef5008d7d4430c9f2a91bc2e006eb2e65291fec4363f612e79 t/02-encode.t
SHA256 ff9b80fa2c9d6dc25349851f81c94ac31b691c1a7855c47261ab46a4730069c5 t/03-ede3.t
SHA256 f5520c318f9d4fc6a8b2dc581214433aae377eae82ca76727848b06093b01252 t/04-explode.t
SHA256 ae3ac8f462cf5219087b0eb1fc732c314008e66136ba415c05cb69dec8e005aa t/05-des.t
SHA256 a19f351465fb9b9b2fc27c9cd69cde4c49e565acd2b3093f463c6b579ccac52e t/06-aes.t
SHA256 6d56fb629ae45061a0d39c9b1a13095ff8e3b03f19f71c963365eb35c38b5c0c t/07-3des.t
SHA256 93e686a7e0805bc995c8a1d1693312192244a80b4a4a93fd6283e7647fb6d74a t/08-idea.t
SHA256 d0ba9ed404f29524768facb7ae9d193cc6f8ae4e8bef2e20b82ebb9bfd221918 t/09-seed.t
lib/Convert/PEM.pm view on Meta::CPAN
package Convert::PEM;
use strict;
use 5.008_001;
use base qw( Class::ErrorHandler );
use MIME::Base64;
use Digest::MD5 qw( md5 );
use Convert::ASN1;
use Carp qw( croak );
use Convert::PEM::CBC;
use Crypt::PRNG qw( random_bytes );
use vars qw( $VERSION $DefaultCipher );
our $VERSION = '0.13'; # VERSION
our $DefaultCipher = 'DES-EDE3-CBC';
sub new {
my $class = shift;
my $pem = bless { }, $class;
$pem->init(@_);
}
sub init {
my $pem = shift;
my %param = @_;
lib/Convert/PEM.pm view on Meta::CPAN
$content =~ s!(.{1,64})!$1\n!g;
my $headers = join '',
map { "$_->[0]: $_->[1]\n" }
@{ $param{Headers} };
$headers .= "\n" if $headers;
"$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, },
'CAMELLIA-256-CBC' => {c => 'Crypt::Camellia', ks=>32, bs=>16, },
'IDEA-CBC' => {c => 'Crypt::IDEA', ks=>16, bs=>8, },
'SEED-CBC' => {c => 'Crypt::SEED', ks=>16, bs=>16, },
);
#### cipher module support and configuration
sub list_ciphers { return wantarray ? sort keys %CTYPES : join(':', sort keys %CTYPES); }
sub list_cipher_modules {
# expect a cipher name, if found, return the module name used for encryption/decryption
my $pem = ref($_[0]) || $_[0] eq __PACKAGE__ ? shift : '';
if (defined $_[0]) {
my $cn = has_cipher(shift) || return undef;
lib/Convert/PEM.pm view on Meta::CPAN
}
sub has_cipher {
# expect a cipher name, return the cipher name if found
my $pem = ref($_[0]) || $_[0] eq __PACKAGE__ ? shift : '';
my $cn = uc(+shift);
return $cn if exists $CTYPES{$cn} && exists $CTYPES{$cn}->{c};
# try to figure out what cipher is meant in an overkill fashion
$cn =~ s/(DES.*3|3DES|EDE)|(DES)|([a-zA-Z]+)(?:-?(\d+)(?:-?(\w+))?)/
if ($1) {
'DES-EDE3-CBC'
} elsif ($2) {
'DES-CBC'
}
else {
$3.($4 ? "-".$4 : "").($5 ? "-$5" : "")
}
/e;
my @c = sort grep { $_ =~ m/$cn/ } keys %CTYPES;
# return undef unless @c;
$c[0];
}
lib/Convert/PEM.pm view on Meta::CPAN
#### cipher functions
sub decrypt {
my $pem = shift;
my %param = @_;
my $passphrase = $param{Password} || "";
my ($ctype, $iv) = split /,/, $param{Info};
my $cmod = $CTYPES{$ctype} or
return $pem->error("Unrecognized cipher: '$ctype'");
$iv = pack "H*", $iv;
eval "use $cmod->{c}; 1;" || croak "Failed loading cipher module '$cmod->{c}'";
my $key = Convert::PEM::CBC::bytes_to_key($passphrase,$iv,\&md5,$cmod->{ks});
my $cm = $cmod->{c}; $cm =~ s/^Crypt::(?=IDEA$)//; # fix IDEA
my $cbc = Convert::PEM::CBC->new(
Cipher => $cm->new($key),
IV => $iv );
my $buf = $cbc->decrypt($param{Ciphertext}) or
return $pem->error("Decryption failed: " . $cbc->errstr);
$buf;
}
sub encrypt {
my $pem = shift;
my %param = @_;
$param{Password} or return $param{Plaintext};
$param{Cipher} = $DefaultCipher if !$param{Cipher};
my $ctype = $pem->has_cipher( $param{Cipher} );
my $cmod = $CTYPES{$ctype} or
return $pem->error("Unrecognized cipher: '$ctype'");
eval "use $cmod->{c}; 1;" || croak "Error loading cypher module '$cmod->{c}'";
## allow custom IV for encryption
my $iv = $pem->_getiv(%param, bs => $cmod->{bs}) or return;
my $key = Convert::PEM::CBC::bytes_to_key( $param{Password}, $iv, \&md5, $cmod->{ks} );
my $cm = $cmod->{c}; $cm =~ s/^Crypt::(?=IDEA$)//; # fix IDEA
my $cbc = Convert::PEM::CBC->new(
IV => $iv,
Cipher => $cm->new($key) );
$iv = uc join '', unpack "H*", $cbc->iv;
my $buf = $cbc->encrypt($param{Plaintext}) or
return $pem->error("Encryption failed: " . $cbc->errstr);
($buf, "$ctype,$iv");
}
sub _getiv {
my $pem = shift;
lib/Convert/PEM.pm view on Meta::CPAN
-----END DH PARAMETERS-----
The string beginning C<MB4C...> is the Base64-encoded, ASN.1-encoded
"object."
An encrypted file would have headers describing the type of
encryption used, and the initialization vector:
-----BEGIN DH PARAMETERS-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,C814158661DC1449
AFAZFbnQNrGjZJ/ZemdVSoZa3HWujxZuvBHzHNoesxeyqqidFvnydA==
-----END DH PARAMETERS-----
The two headers (C<Proc-Type> and C<DEK-Info>) indicate information
about the type of encryption used, and the string starting with
C<AFAZ...> is the Base64-encoded, encrypted, ASN.1-encoded
contents of this "object."
The initialization vector (C<C814158661DC1449>) is chosen randomly.
lib/Convert/PEM.pm view on Meta::CPAN
May be used in lieu of Content. If specified, will override Content.
=item * Password
A password used to encrypt the contents of the PEM file. This is an
optional argument; if not provided the contents will be unencrypted.
=item * Cipher
The Cipher to use if a password is provided. This is an optional
argument; if not provided, the default of B<DES-EDE3-CBC> will be used
or the cipher configured is B<$Convert::PEM::DefaultCipher>. See below
for a list of supported ciphers.
=back
=head2 $obj = $pem->read(%args)
Reads, decodes, and, optionally, decrypts a PEM file, returning
the object as decoded by I<Convert::ASN1> (or binary blob if ASN.1
description was not provided). This is implemented as a wrapper
lib/Convert/PEM.pm view on Meta::CPAN
Used to configure a default cipher when writing to the disk. When using
the method form C< $OBJ->DefaultCipher([NEW_CIPHER]) >, if NEW_CIPHER
is not specified, will return the current setting. If the specified
cipher is not recognized/valid, an error will be raised.
To list supported ciphers, use C<Convert::PEM::list_ciphers>. Here is a
list of supported Ciphers:
=over 4
=item * DES-CBC
=item * DES-EDE3-CBC
=item * AES-128-CBC
=item * AES-192-CBC
=item * AES-256-CBC
=item * CAMELLIA-128-CBC
=item * CAMELLIA-192-CBC
=item * CAMELLIA-256-CBC
=item * IDEA-CBC
=item * SEED-CBC
=back
=head2 Convert::PEM->has_cipher(I<$cipher_name>)
Will see if the cipher is supported and is configured with an encryption
module.
=head2 Convert::PEM->has_cipher_module(I<$cipher_name>)
lib/Convert/PEM.pm view on Meta::CPAN
scalar context.
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>
=item * Crypt::L<IDEA>
=item * L<Crypt::SEED>
=back
=head1 ERROR HANDLING
If an error occurs in any of the above methods, the method will return
lib/Convert/PEM/CBC.pm view on Meta::CPAN
package Convert::PEM::CBC;
use strict;
our $VERSION = '0.13'; # VERSION
use Carp qw( croak );
use Digest::MD5 qw( md5 );
use base qw( Class::ErrorHandler );
use Crypt::PRNG qw( random_bytes );
sub new {
lib/Convert/PEM/CBC.pm view on Meta::CPAN
$ckey .= $md->($ckey, $key, substr($salt,0,8));
}
substr $ckey, 0, $ks;
}
1;
__END__
=head1 NAME
Convert::PEM::CBC - Cipher Block Chaining Mode implementation
=head1 SYNOPSIS
use Convert::PEM::CBC;
my $cbc = Convert::PEM::CBC->new(
Cipher => 'Crypt::DES_EDE3',
Passphrase => 'foo'
);
my $plaintext = 'foo bar baz';
$cbc->encrypt($plaintext);
=head1 DESCRIPTION
I<Convert::PEM::CBC> implements the CBC (Cipher Block Chaining)
mode for encryption/decryption ciphers; the CBC is designed for
compatibility with OpenSSL and may not be compatible with other
implementations (such as SSH).
=head1 USAGE
=head2 $cbc = Convert::PEM::CBC->new(%args)
Creates a new I<Convert::PEM::CBC> object and initializes it.
Returns the new object.
I<%args> can contain:
=over 4
=item * Cipher
Either the name of an encryption cipher class (eg. I<Crypt::DES>),
or an object already blessed into such a class. The class must
lib/Convert/PEM/CBC.pm view on Meta::CPAN
this is passed directly to the cipher itself, the length of the
key must be equal to or greater than the keysize for the I<Cipher>.
As with the I<Passphrase> argument, if you give the I<Cipher>
argument an already-constructed cipher object, this argument is
ignored. If the I<Cipher> argument is a cipher class, either this
argument or I<Passphrase> must be provided.
=item * IV
The initialization vector for CBC mode.
This argument is optional; if not provided, a random IV will be
generated. Obviously, if you're decrypting data, you should provide
this argument, because your IV should match the IV used to encrypt
the data.
=back
=head2 $cbc->encrypt($plaintext)
Encrypts the plaintext I<$plaintext> using the underlying cipher
implementation in CBC mode, and returns the ciphertext.
If any errors occur, returns I<undef>, and you should check the
I<errstr> method to find out what went wrong.
=head2 $cbc->decrypt($ciphertext)
Decrypts the ciphertext I<$ciphertext> using the underlying
cipher implementation in CBC mode, and returns the plaintext.
If any errors occur, returns I<undef>, and you should check the
I<errstr> method to find out what went wrong.
=head2 $cbc->iv
Returns the current initialization vector. One use for this might be
to grab the initial value of the IV if it's created randomly (ie.
you haven't provided an I<IV> argument to I<new>):
my $cbc = Convert::PEM::CBC->new( Cipher => $cipher );
my $iv = $cbc->iv; ## Generated randomly in 'new'.
I<Convert::PEM> uses this to write the IV to the PEM file when
encrypting, so that it can be known when trying to decrypt the
file.
=head2 $cbc->errstr
Returns the value of the last error that occurred. This should only
be considered meaningful when you've received I<undef> from one of
t/03-ede3.t view on Meta::CPAN
use strict;
use Test::More tests => 6;
use Convert::PEM::CBC;
my $KEY = pack "H64", ("0123456789ABCDEF" x 4);
my $IV = "\0" x 8;
my($cbc1, $cbc2);
$cbc1 = Convert::PEM::CBC->new(
Cipher => 'Crypt::DES_EDE3',
Key => $KEY,
IV => $IV,
);
isa_ok $cbc1, 'Convert::PEM::CBC';
$cbc2 = Convert::PEM::CBC->new(
Cipher => 'Crypt::DES_EDE3',
Key => $KEY,
IV => $IV,
);
isa_ok $cbc2, 'Convert::PEM::CBC';
my($enc, $dec);
$enc = $cbc1->encrypt( _checkbytes() );
ok defined $enc, 'got something from encrypt';
$dec = $cbc2->decrypt($enc);
ok defined $dec, 'got something from decrypt';
is vec($dec, 0, 8), vec($dec, 2, 8), 'input1 matches output1';
is vec($dec, 1, 8), vec($dec, 3, 8), 'input2 matches output2';
use Convert::PEM;
require "./t/func.pl";
my $pem = get_rsa();
# choose some modules to test
my @modules = ("Crypt::DES");
my @tests = (
{ name => "DES-CBC", rx => "t/data/rsakey-des.pem",
tx => "t/data/rsakey-des.wr.pem", hash => "45f605c6186eaea0730958b0e3da52e4", },
{ name => "DES-CBC", rx => "t/data/rsakey2-des.pem",
tx => "t/data/rsakey2-des.wr.pem", hash => "9b334c60a2c0c2a543ac742ebf1f8ccd", },
);
run_tests($pem,\@modules,\@tests);
use strict;
use Test::More;
use Test::Exception;
use Convert::PEM;
require "./t/func.pl";
my $pem = get_rsa();
# choose some modules to test
# my @modules = grep { $_ ne "" } map { $pem->set_cipher_module("AES-128-CBC", $_) } ("Crypt::Cipher::AES", "Crypt::OpenSSL::AES");
my @modules = ("Crypt::Cipher::AES", "Crypt::OpenSSL::AES","Crypt::Rijndael","Crypt::Rijndael_PP");
my @tests = (
{ name => "AES-128-CBC", rx => "t/data/rsakey-aes128.pem",
tx => "t/data/rsakey-aes128.wr.pem", hash => "45f605c6186eaea0730958b0e3da52e4", },
{ name => "AES-192-CBC", rx => "t/data/rsakey-aes192.pem",
tx => "t/data/rsakey-aes192.wr.pem", hash => "45f605c6186eaea0730958b0e3da52e4", },
{ name => "AES-256-CBC", rx => "t/data/rsakey-aes256.pem",
tx => "t/data/rsakey-aes256.wr.pem", hash => "45f605c6186eaea0730958b0e3da52e4", },
{ name => "AES-128-CBC", rx => "t/data/rsakey2-aes128.pem",
tx => "t/data/rsakey2-aes128.wr.pem", hash => "9b334c60a2c0c2a543ac742ebf1f8ccd", },
{ name => "AES-192-CBC", rx => "t/data/rsakey2-aes192.pem",
tx => "t/data/rsakey2-aes192.wr.pem", hash => "9b334c60a2c0c2a543ac742ebf1f8ccd", },
{ name => "AES-256-CBC", rx => "t/data/rsakey2-aes256.pem",
tx => "t/data/rsakey2-aes256.wr.pem", hash => "9b334c60a2c0c2a543ac742ebf1f8ccd", },
);
run_tests($pem,\@modules,\@tests);
t/07-3des.t view on Meta::CPAN
use Convert::PEM;
require "./t/func.pl";
my $pem = get_rsa();
# choose some modules to test
my @modules = ("Crypt::DES_EDE3");
my @tests = (
{ name => "DES-EDE3-CBC", rx => "t/data/rsakey-3des.pem",
tx => "t/data/rsakey-3des.wr.pem", hash => "45f605c6186eaea0730958b0e3da52e4", },
{ name => "DES-EDE3-CBC", rx => "t/data/rsakey2-3des.pem",
tx => "t/data/rsakey2-3des.wr.pem", hash => "9b334c60a2c0c2a543ac742ebf1f8ccd", },
);
run_tests($pem,\@modules,\@tests);
t/08-idea.t view on Meta::CPAN
# choose some modules to test
my @modules = ("Crypt::IDEA");
if (!@modules) {
plan skip_all => "because tests require at least 1 IDEA cipher module to be installed" if !@modules;
exit;
}
my @tests = (
{ name => "IDEA-CBC", rx => "t/data/rsakey-idea.pem", tx => "t/data/rsakey-idea.wr.pem", hash => "45f605c6186eaea0730958b0e3da52e4", },
{ name => "IDEA-CBC", rx => "t/data/rsakey2-idea.pem", tx => "t/data/rsakey2-idea.wr.pem", hash => "9b334c60a2c0c2a543ac742ebf1f8ccd", },
);
run_tests($pem,\@modules,\@tests);
t/09-seed.t view on Meta::CPAN
use Convert::PEM;
require "./t/func.pl";
my $pem = get_rsa();
# choose some modules to test
my @modules = ("Crypt::SEED");
my @tests = (
{ name => "SEED-CBC", rx => "t/data/rsakey-seed.pem",
tx => "t/data/rsakey-seed.wr.pem", hash => "45f605c6186eaea0730958b0e3da52e4", },
{ name => "SEED-CBC", rx => "t/data/rsakey2-seed.pem",
tx => "t/data/rsakey2-seed.wr.pem", hash => "9b334c60a2c0c2a543ac742ebf1f8ccd", },
);
run_tests($pem,\@modules,\@tests);
t/10-camellia.t view on Meta::CPAN
use Convert::PEM;
require "./t/func.pl";
my $pem = get_rsa();
# choose some modules to test
my @modules = ("Crypt::Camellia","Crypt::Camellia_PP");
my @tests = (
{ name => "CAMELLIA-128-CBC", rx => "t/data/rsakey-camellia128.pem",
tx => "t/data/rsakey-camellia128.wr.pem", hash => "45f605c6186eaea0730958b0e3da52e4", },
{ name => "CAMELLIA-192-CBC", rx => "t/data/rsakey-camellia192.pem",
tx => "t/data/rsakey-camellia192.wr.pem", hash => "45f605c6186eaea0730958b0e3da52e4", },
{ name => "CAMELLIA-256-CBC", rx => "t/data/rsakey-camellia256.pem",
tx => "t/data/rsakey-camellia256.wr.pem", hash => "45f605c6186eaea0730958b0e3da52e4", },
{ name => "CAMELLIA-128-CBC", rx => "t/data/rsakey2-camellia128.pem",
tx => "t/data/rsakey2-camellia128.wr.pem", hash => "9b334c60a2c0c2a543ac742ebf1f8ccd", },
{ name => "CAMELLIA-192-CBC", rx => "t/data/rsakey2-camellia192.pem",
tx => "t/data/rsakey2-camellia192.wr.pem", hash => "9b334c60a2c0c2a543ac742ebf1f8ccd", },
{ name => "CAMELLIA-256-CBC", rx => "t/data/rsakey2-camellia256.pem",
tx => "t/data/rsakey2-camellia256.wr.pem", hash => "9b334c60a2c0c2a543ac742ebf1f8ccd", },
);
run_tests($pem,\@modules,\@tests);
t/20-opt-ciphers.t view on Meta::CPAN
use strict;
use Test::More;
use Test::Exception;
use Convert::PEM;
plan tests => 18;
my $expected = join ':', sort qw(DES-CBC DES-EDE3-CBC AES-128-CBC AES-192-CBC AES-256-CBC CAMELLIA-128-CBC CAMELLIA-192-CBC CAMELLIA-256-CBC IDEA-CBC SEED-CBC);
my @ciphers;
my $ciphers;
# object oriented
ok (Convert::PEM->has_cipher('idea') eq 'IDEA-CBC', "IDEA-CBC cipher recognized via OO interface");
ok (Convert::PEM->has_cipher('aes') eq 'AES-128-CBC', "AES-128-CBC cipher recognized via OO interface");
ok (Convert::PEM->has_cipher('aes128') eq 'AES-128-CBC', "AES-128-CBC cipher recognized via OO interface");
ok (Convert::PEM->has_cipher('aes192') eq 'AES-192-CBC', "AES-192-CBC cipher recognized via OO interface");
ok (Convert::PEM->has_cipher('aes256') eq 'AES-256-CBC', "AES-256-CBC cipher recognized via OO interface");
ok (Convert::PEM->has_cipher('des') eq 'DES-CBC', "DES-CBC cipher recognized via OO interface");
ok (Convert::PEM->has_cipher('3des') eq 'DES-EDE3-CBC',"DES-EDE3-CBC cipher recognized via OO interface");
lives_ok { @ciphers = Convert::PEM->list_ciphers } "retrieve list of supported ciphers as array";
ok @ciphers >= 1, "list of ciphers contains one or more items";
lives_ok { $ciphers = Convert::PEM->list_ciphers } "retrieve list of supported ciphers as scalar";
ok $ciphers eq $expected, "list of ciphers contains items";
note("ciphers: $ciphers");
note("retrieved ciphers:".$/." ".join("$/ ",@ciphers));
# directly access functions
ok (Convert::PEM::has_cipher('idea') eq 'IDEA-CBC', "IDEA-CBC cipher recognized via functional interface");
ok (Convert::PEM::has_cipher('aes') eq 'AES-128-CBC', "AES-128-CBC cipher recognized via functional interface");
ok (Convert::PEM::has_cipher('aes128') eq 'AES-128-CBC', "AES-128-CBC cipher recognized via functional interface");
ok (Convert::PEM::has_cipher('aes192') eq 'AES-192-CBC', "AES-192-CBC cipher recognized via functional interface");
ok (Convert::PEM::has_cipher('aes256') eq 'AES-256-CBC', "AES-256-CBC cipher recognized via functional interface");
ok (Convert::PEM::has_cipher('des') eq 'DES-CBC', "DES-CBC cipher recognized via functional interface");
ok (Convert::PEM::has_cipher('3des') eq 'DES-EDE3-CBC', "DES-EDE3-CBC cipher recognized via functional interface");
t/data/rsakey-3des.pem view on Meta::CPAN
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,4C831C9C0CC1D0E0
wCa15rzWptaFA2X86YIeNJ19O2xQT25ep3pys6Xj471NLRLYhzYySi1NOTzb1K12
AttmROTw2+7EkH0Y/k5IRch4bmkof6U0+6hlTnhH5Tuq72FYGkNjJhGVv+NcqJ/8
frDPOFs4v3qnlwgjma29CIGozXUn5Xd63Oa6/m571keuRe5+9hGRF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ip+mvBAkRPpty9R9
t/data/rsakey-aes128.pem view on Meta::CPAN
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,71282050E523FE25A5BF6ED8E5F6A0DB
tS5PQ1lWjjCkhDpeRqYCeFHUQ/l8eRn4mQTnCnDShBDFqRHGCibkeQ9jXa+bpSbb
ZXTBVfPkRTFRQSz/ONPIT4FVxnH9MZfysRhsP9I8jmX5CBxJlSubaSSdB2IWZNPo
O71v1LLDyHKnvu40gyfmJ0fB4yyE0jknBgTugwAV7aU/Ic9K5C8flX8t3biXc1DR
xQWqiFfyOHXIySbUUgNcci0KG7XmngkOLLlKNqEs8r0kXxCnjEYnlR2x0jU+jDlw
/6blefiK72ZtrRi26p/FADmP6CBTgRZdDbtvsH45UK3wjo1/5Lia0+KWmmfH7m2v
2dgJr7Cv6nszzccNmMsK+Vvl1Cl3uaT5VBwrA+os1nNFi4LwQlA9GJq1GPLrHSrF
fGsLhdF52EulimeC4CcJT5nei6XR79sqT+yiG3LBDjuNZZpW2Ra8bw6K3yblCCfN
/zHt7gedEeG0z3zS+sbT5OU2s9mpSqAf25ao/2c7EL+Nxj+HpM6Bda+cwcCgt9bl
+T2mJyCzCIeLsaR4JtcMAkHBEFAVOiq1c/cHR1klXN/+Cw5OcFaPIb/Rg2Qm1/u7
t/data/rsakey-aes192.pem view on Meta::CPAN
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-192-CBC,134B238662C8F9D2D72484131C111290
/doUnq+ZDfNJwA00Q0iNIGLQadNO4QQ8zrhWZbdlh11YwnBMef3A329Ov+su/V/X
dsXPkDaTpXwci1/s7Bh7JlhtKg9RqcoG4LSNB8DO2O6wFkEwZLxsbKIv7cH+wHge
WpLG5+ahIf6ABn3WYe908u1onc6O8TUsG/TMy3nonWkNkekTysFnkYDVsxRivOUM
Q9ck5qhgWIrPW0wYjmHzTS/r2bgvfjL2GlhZLWbrdtsrhmC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-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-CBC,D7E8A1186D902144
7qseM7QsE1jdjVM2bjmwaJTjOPGA19/iEAQDHgXLLKwEzHcj1Y704aw7qxWgavy7
SBN8zE2OMHQDZmugfQocO1bGqeZihmlWIZUnk+PUgiyJDKZP4gMq+7y3hfvOi+42
uhJ6EvJe/LrRkbfQX1lb4obZ70VC3xZM95fV4M7395p5mi6Gk3YBjtv5vBaRZvLE
PqT6xSUuMHeDQr3E8IUY7pre2cUCR4EEE7vedXcj7NWhLHP/iD3Zn+wouwyPk1Nm
YSt5r2b8oMprHLEUg5wMxtjhLizrAxoRdwmUUW2tygNcZcDakzWIvggq4wHYpS2h
+1am6NSo4T9o19pklUWUOspOSu4SOEdb6YcyNCDtPea/NwuFswX3I1nKg6NeEalm
7+jk9+vherWz4njGeP4CV+wSLwYQqvD4rZkXiAEZaxdcdscH6wuaDN3Qtw5lKr3/
VTqkvgyc1m9EqFeTSQldKLYZn6VHWZ61UzLWTDEp+KgISrF8jf8ol3x9gIoBrUkg
dbvQuKyCrOHqvmXRqPVYm4B63Bzp/PRx6KrWPjOiCJRzMO57wOewza42wJTJTAhL
t/data/rsakey-camellia128.pem view on Meta::CPAN
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: CAMELLIA-128-CBC,3619262B309A496F1B42FBED5381C764
YTq1Wx2lVqHn2Mwl4bseR9YC9hHJfvY4BYRTkKyc06w1yojjP920p93bfe8saIzg
KxBcYusvFjTH/jPA2bw6wRSYWjD3ZqfqVWh39QqLCW4fPYrvpA8XeMyvk4SyYlqs
9h8D21CjRGO4oOyQRQVR0dGKnwNa8dvvAVdkKwwts3pt0niIGAmbGeR9NJnGYd2n
jPNKv3GmhMqkcVVAKC3UKN6P4NPindcYPS1nenerW62QyXn2GXXDK4QDgOiQ5jcq
0AliDM4KBa61a+h1Lt4k5h42Bbs4mlFmGp4Y+v/KBybf/Tpr448DeYOtVHZraL8i
ETi/Pn8SK6Khq5U/nrpXKi+UrMirg3vc/m6R014JkAYE7YPbkgjfwGHPMYhd2qoU
ETaya6mmNXfpcKWY+QGGoYFtu6Cgs27f9OwhT+iVfHrCT4NAN7RSw9lWObioqne0
42byDWmBjzQls8jwxC6fgmWP2/nM1ncVTV6YltmxVEudmHAdAPz0hIzP0BzTCBMJ
JtsMVhPRDoFa8a+fZwaP1bTBFS0sKjHOj9StJcJmJgzULK64P9uZc4Gl9ecezhDy
t/data/rsakey-camellia192.pem view on Meta::CPAN
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: CAMELLIA-192-CBC,3F5C8A2CF361867FE8A1D041D448C433
Mop1yn6zWnB1rgOva13j8cH32xNVjzI3xc+zZFUKNQf5laljcNyaissnNhmvgw7D
YA8YszBTnolrr4KnQL/ndMIMo+V2DnAHWWaEyc77kISxJ8aAuJYyWRbAB6Cz8t5C
w85iDvgX1mopoi3jtyptMmON4lTtLizq0LmAoIGwFO/qcgWz9itzSfRdMQ1+0yV6
h9JLaDFBb3IDZDjgB94fyPvtL/lH6HLozLgfNg6DF/Ld3oOIJ++hGZBaOIRrVrxh
AVyNi6MnraBkiq1sbTMrBwu4NSU4IwY5TVbRYAMM0kLRgedWX4XNTawWWQuo56cN
zdPhXPrmfwLrmBEz9h9W02KnLIzGTVAm7nODEtvV2Bnz0dtYqcFyH9Pddv1FgJP1
asPNEjZOZIf26ktEpQkhNF3wkiVznQUMJQVQycCy9g7fG1e2BykFfLyxpWn+dIta
Bg5yflmdRPhl8KL00y1wez8380WXerZKX6I0Mwctn72yOjueV0KU+daDdbQRgu+a
fP5LtjKwHtkvkAviVoBvm1lh60TlEOtTWP90NAP9uORGtd5mQ/dOkLNCYpZ7+NKb
t/data/rsakey-camellia256.pem view on Meta::CPAN
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: CAMELLIA-256-CBC,A16D6AA410454116292D3D76E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EeteUe4+6my
swnwtOJsQgstMWQqPpnYs3XPBz2PLAPCnB4L8FiAzShlekYvMHiCrvhhKZFnRcJU
OZFkAeQA0f59+Rc2WcMMGMRWW5p1nvSTVFqbvJHXaolCIJP+yaaawo0yfHIW1QW7
v5mHJFxqMQ6w02eAUrb33W2YtkErAD0idFk9gwGMa/mb+TbBcF7CnBHI9U//Cfd2
t/data/rsakey-des3.pem view on Meta::CPAN
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,19C06E97767EEB97
B8KT80sBr065/uJS9oF834xClcIRDInUmPKHZ1oQ+n4J/jWAzzn3Q4oSImFD+MVA
JsCfOBvGo+nljJYvfUuQlye4JfjVJJfDDahuL7gj+rITAqeGNx+fHoc+7PIfPmwb
yWKp1lRXnZHbYJtb+WrL0JXoicwhtpymJ5vwtB0aj+VbiI169ygQfNCpVjKm3UWc
cMEDiAfYOc+vcqgTFQ3J4EX4F/ZYtG7NvNZOwWg369glWi/WU9dprzIxlfSC2ybH
3Rsq/+bLkiV7ZlVXxSqy3goaogHqrui3nu4ciQEIhcMJOb2dX4ncIvxF0dT2RqcH
Y7+qSabhLFQdZpYLkSm1m7df+1KqxNOpl60ir2icSqD6DxIgO+RAlfkZNHkJ/5dd
6+7GumIEQ5VBlPry/6pm+FvsjVfeP3sgqnDMJgsfgO3+DunyexpT7dqRbD006Mbw
MNK8scephQNrXe3PF1YwuDQMC9bSm78ReGMqgNP1H+jQrLwFuBt58aP2Kq4pfE2B
L5BWpDPGEc7Mr+NH9YWTvLoKK9h8402vFi3RD6izLUV01LeFsuVqoODN9X70pZJK
t/data/rsakey-idea.pem view on Meta::CPAN
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: IDEA-CBC,D7E8A1186D902144
7qseM7QsE1jdjVM2bjmwaJTjOPGA19/iEAQDHgXLLKwEzHcj1Y704aw7qxWgavy7
SBN8zE2OMHQDZmugfQocO1bGqeZihmlWIZUnk+PUgiyJDKZP4gMq+7y3hfvOi+42
uhJ6EvJe/LrRkbfQX1lb4obZ70VC3xZM95fV4M7395p5mi6Gk3YBjtv5vBaRZvLE
PqT6xSUuMHeDQr3E8IUY7pre2cUCR4EEE7vedXcj7NWhLHP/iD3Zn+wouwyPk1Nm
YSt5r2b8oMprHLEUg5wMxtjhLizrAxoRdwmUUW2tygNcZcDakzWIvggq4wHYpS2h
+1am6NSo4T9o19pklUWUOspOSu4SOEdb6YcyNCDtPea/NwuFswX3I1nKg6NeEalm
7+jk9+vherWz4njGeP4CV+wSLwYQqvD4rZkXiAEZaxdcdscH6wuaDN3Qtw5lKr3/
VTqkvgyc1m9EqFeTSQldKLYZn6VHWZ61UzLWTDEp+KgISrF8jf8ol3x9gIoBrUkg
dbvQuKyCrOHqvmXRqPVYm4B63Bzp/PRx6KrWPjOiCJRzMO57wOewza42wJTJTAhL
t/data/rsakey-seed.pem view on Meta::CPAN
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: SEED-CBC,D3B7CAE28077F556863FD5A5FFFE3B2C
xlCHrHmsMXarlKmuPP18VVF2yU0o6xHwwfZwPZ08uA5SXEnGPgjtMuFsFhiAaM80
37eich9MfpFHv3OXimENBjLaprGMJnnsWNWiMiHP5f/ht+408nJmE0JJE1V1JlJn
2Z2410+HUCEoP8g03ukfVfCZ930Fites7B1mNBvJ1eCm2XloI5XLS5pkgF9tYaft
jRktLhP7U30abPMjC/fnqvPER+ZknBWn8BUspRnvbEservEFPC6ZzHK5NtKD5f8o
iGAnz6qMm6VidNUxG3ocSyubj2UcyPO3LXtCHHlbQ86yPwjdyloMg0A6HmusuvLt
esgzJG7/gnY2wYoq4m/zHNwYtVUmiDKgLhnj5kO01AIa4dLLuWgRRdo26cf6zKSc
230IL5tvWx3/8MOP7DRPmZz63OLMbWN/k4jWdhQS6w29Oe4VKpeS0dPt0nTinfOC
7AgIHBhE1bmxpi1fxaVR43tzyZSihc9cjZDtBgq7SPp76Cy7Ewl9PNUgPeR+kNDf
UWRRsRvCOpPrwiupdw0IRE13HHdZ+MOmAL+f/VfgrZCH0SRLPL54yJ6bIQpjIl/F
t/data/rsakey2-3des.pem view on Meta::CPAN
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,A7CD92C133E248D0
xOAOWqcMrLWo2RO5F6hxv1POdf+KOfNDYoyunvA6dtfZdda43HCPe+1T6rFznQMk
Dfmp4nfjWCmhwD7afxWkYN+cI9shgbSXarMruJDJDNQHqk31ICzi9hPPGZZVhyMs
uesxSE4JLooDZCGaF5lxMY2Figsp+EMTU4CupG67zLR7lpMLIKf/vubglZnRSS1C
6I9VskR5nH0+QXDlYWVVa277PtDEvzWwRRMXwCPMaHSM2usOCNXrpA==
-----END RSA PRIVATE KEY-----
t/data/rsakey2-aes128.pem view on Meta::CPAN
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,5C170F7438243763B7A2D61771350418
lSLHUdqwvLhdCyyseQvneM7UoHAhrTp8JcmW+MjDIZbkLS6i1XNtwTTCpBjOUWRA
teSfCFd0EHOKDNFBcL5uO0u5FjZJnir7FfLYOD1BWzIwVgG7OhCigdkyyC1D4CWP
1eXPOZzpNntYK8Tz+x43xLmokCNQsEYemxZTacBca8P6iVNnkIkQpO7BYua+mDwE
YFzISJOhsFMbMCikZIHt+/E/sq3WvQC0tYo1t0h53Z55FJiP579jKcjljp8ZXpk1
-----END RSA PRIVATE KEY-----
t/data/rsakey2-aes192.pem view on Meta::CPAN
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-192-CBC,EE4CD737ABD7392E94361F2A502CAF57
uei8t3E6eUeAJxreYhFrFJc0roexvAUEGcAOYeIGee2cdnnyyXuMcOo02DM36MRs
2YH9juQ2kwH29uKwZ3//JYOoUOSa/cGZTYBjzCKJiP2+rhqOWwKgl5UdPR8YMTHS
WNnjFtCJuGaXXKJ6YiN+cQqHlPNUfL8rEKeNjqfaE3smDiKw0PH4R4O44OA3mEBE
1FhTDaB5LmR8gVTnQgyj3LstodDTaEXyix7Sdr6Fe8IqvPqYQcXEm2Uhz8yui5qq
-----END RSA PRIVATE KEY-----