You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2014/01/05 04:25:50 UTC

[jira] [Assigned] (CAMEL-7106) PGP decryption sometimes can't find the secret key

     [ https://issues.apache.org/jira/browse/CAMEL-7106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang reassigned CAMEL-7106:
-----------------------------------

    Assignee: Willem Jiang

> PGP decryption sometimes can't find the secret key
> --------------------------------------------------
>
>                 Key: CAMEL-7106
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7106
>             Project: Camel
>          Issue Type: Bug
>          Components:  camel-crypto
>    Affects Versions: 2.12.2
>            Reporter: Mark Riordan
>            Assignee: Willem Jiang
>              Labels: patch
>         Attachments: CAMEL-7106.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Camel Crypto fails to decrypt PGP files encrypted by GnuPG and other programs, when the secret key used to encrypt the symmetric key is not the first on the keyring (using Bouncy Castle's definition of a keyring). The error message is "Provided input is encrypted with unknown pair of keys."  Since the encryption key in files from other PGP programs normally is a subkey and is not the first one in the keyring (which is typically the master key), this means that decryption fails in many cases.
> The fix is a one-liner to PGPDataFormatUtil.findPrivateKeyWithKeyId(), to use a BC method that searches for the secret key rather than assume it's the first one on the secret keyring.  I will attach a patch.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)