CC: | cpan [...] stupidfool.org |
Subject: | Symkey decrypt failed: Invalid secret key ID (when using GPG encrypted data ) |
Date: | Sat, 22 Sep 2012 17:58:29 -0500 |
To: | bugs-crypt-openpgp [...] rt.cpan.org |
From: | Caleb Cushing <xenoterracide [...] gmail.com> |
I'm not actually sure this is a bug, but if not perhaps you can
explain why and how to fix it.
http://stackoverflow.com/questions/12540226/cryptopenpgp-symkey-decrypt-failed-invalid-secret-key-id
For duplication purposes here's the text.
I am having a problem where Crypt::OpenPGP is unable to decrypt a
message encoded by GPG. It seems that I am not the first to have this
problem. But no solution was found on that thread.
my $pgp = load_class('Crypt::OpenPGP')->new;
$pgp->handle(
Data => $encrypted,
) or confess $self->_pgp->errstr;
Crypt::OpenPGP prompts correctly for the key passphrase, finding the
key successfully, and I'v tested to make sure the passphrase works
with GPG. But when attempting to decrypt the message with
Crypt::OpenPGP I get the error.
Symkey decrypt failed: Invalid secret key ID
according to the thread the following have been tested
Encrypt with gpg and decrypt with gpg.
Works fine, as expected
Encrypt with perl using Crypt::OpenPGP and decrypt with gpg.
Works fine.
Encrypt with perl using Crypt::OpenPGP and decrypt with perl using
Crypt::OpenPGP
Works fine.
Encrypt with gpg and decrypt with perl using Crypt::OpenPGP
Failure with "Symkey decrypt failed: Invalid secret key ID" message.
This is the situation described above
which seems to reflect my own observation though I've not tested a few
of these. Does anyone know the cause or even better a fix?
--
Caleb Cushing
http://xenoterracide.com