The Same problem occurs in Crypt::OpenPGP::SKSessionKey
it attempts to concat:
$key->{sym_alg} . $sym_key
When I believe the required line is
$key->{s2k_ciph} . $sym_key
as $key->{sym_alg} is not set anywhere, and not passed by any calling code.
I injected the following code block into 'init' to get a useable
backtrace of the problem
if ( not exists $key->{sym_alg} ){
require Carp;
Carp::confess("No sym_alg");
}
And the (Hand Augmented) backtrace was as follows:
No sym_alg at
/usr/lib64/perl5/vendor_perl/5.10.1/Crypt/OpenPGP/SKSessionKey.pm line 24
Crypt::OpenPGP::SKSessionKey::init( @1 ) called at
/usr/lib64/perl5/vendor_perl/5.10.1/Crypt/OpenPGP/SKSessionKey.pm line 15
Crypt::OpenPGP::SKSessionKey::new( @2 ) called at
/usr/lib64/perl5/vendor_perl/5.10.1/Crypt/OpenPGP.pm line 527
Crypt::OpenPGP::encrypt( @3 ) called at
/tmp/portage/dev-perl-DBIx-Class-EncodedColumn-0.00003/work/DBIx-Class-EncodedColumn-0.00003/blib/lib/DBIx/Class/EncodedColumn/Crypt/OpenPGP.pm
line 88
DBIx::Class::EncodedColumn::Crypt::OpenPGP::__ANON__( @4 ) called at
/tmp/portage/dev-perl-DBIx-Class-EncodedColumn-0.00003/work/DBIx-Class-EncodedColumn-0.00003/blib/lib/DBIx/Class/EncodedColumn.pm
line 59
DBIx::Class::EncodedColumn::new( @5 ) called at
/usr/lib64/perl5/vendor_perl/5.10.1/DBIx/Class/ResultSet.pm line 2010
DBIx::Class::ResultSet::new_result( @6 ) called at
/usr/lib64/perl5/vendor_perl/5.10.1/DBIx/Class/ResultSet.pm line 2287
DBIx::Class::ResultSet::create( @7 ) called at t/02digest.t line 14
Vars:
1: 'Crypt::OpenPGP::SKSessionKey=HASH(0x1e1c5c0)',
1: 'Passphrase' => 'Secret Words',
1: 'SymKey' =>
'?q\x{9}^\x{83}\x{e2}#>\x{b3}\x{10}(\x{a0}2\x{e4}G\x{d}\x{e6}De\x{ba}\x{82}\x{e9}\x{af}E',
1: 'Cipher' => 2,
1: 'S2k' => 'Crypt::OpenPGP::S2k::Salt_Iter=HASH(0x1db6b88)', ...
2: 'Crypt::OpenPGP::SKSessionKey',
2: 'Passphrase' => 'Secret Words',
2: 'SymKey' =>
'?q\x{9}^\x{83}\x{e2}#>\x{b3}\x{10}(\x{a0}2\x{e4}G\x{d}\x{e6}De\x{ba}\x{82}\x{e9}\x{af}E',
2: 'Cipher' => 2,
2: 'S2k' => 'Crypt::OpenPGP::S2k::Salt_Iter=HASH(0x1db6b88)', ...
3: 'Crypt::OpenPGP=HASH(0x15b2df8)',
3: 'Data' => 'Test Encrypted Column with Passphrase',
3: 'Passphrase' => 'Secret Words',
3: 'Armour' => 1
4: 'Test Encrypted Column with Passphrase'
5: 'DigestTest::Schema::Test', 'HASH(0x1d6f940)'
6: 'DBIx::Class::ResultSet=HASH(0x1baf2e0)', 'HASH(0x1d53ff0)'
7: 'DBIx::Class::ResultSet=HASH(0x1baf2e0)', 'HASH(0x1d53ff0)'