You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Bryan McGuire (JIRA)" <ji...@apache.org> on 2012/07/28 05:53:33 UTC

[jira] [Created] (CAMEL-5475) Can't unmarshal pgp messages encrypted with ElGamal.

Bryan McGuire created CAMEL-5475:
------------------------------------

             Summary: Can't unmarshal pgp messages encrypted with ElGamal.
                 Key: CAMEL-5475
                 URL: https://issues.apache.org/jira/browse/CAMEL-5475
             Project: Camel
          Issue Type: Bug
          Components:  camel-crypto
    Affects Versions: 2.10.0, 2.11.0, Future
         Environment: All environments
            Reporter: Bryan McGuire


Current strategy for finding the private key is to iterate the secret keychain and matching on the configured email address.  This is incorrect; the secret key chain should be searched by the key id found in the public key encrypted message. What happens now is the DSA signing key is matched instead of the ElGamal decryption key, and this throws java.security.InvalidKeyException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-5475) Can't unmarshal pgp messages encrypted with ElGamal.

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425618#comment-13425618 ] 

Willem Jiang commented on CAMEL-5475:
-------------------------------------

@Bryan, 
Can you provide a test patch which shows the issue of looking up the ElGamal keys?

                
> Can't unmarshal pgp messages encrypted with ElGamal.
> ----------------------------------------------------
>
>                 Key: CAMEL-5475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5475
>             Project: Camel
>          Issue Type: Bug
>          Components:  camel-crypto
>    Affects Versions: 2.10.0, 2.11.0, Future
>         Environment: All environments
>            Reporter: Bryan McGuire
>            Assignee: Willem Jiang
>         Attachments: patch.txt
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Current strategy for finding the private key is to iterate the secret keychain and matching on the configured email address.  This is incorrect; the secret key chain should be searched by the key id found in the public key encrypted message. What happens now is the DSA signing key is matched instead of the ElGamal decryption key, and this throws java.security.InvalidKeyException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-5475) Can't unmarshal pgp messages encrypted with ElGamal.

Posted by "Bryan McGuire (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan McGuire updated CAMEL-5475:
---------------------------------

    Attachment: patch.txt

This patch is cleaner.
                
> Can't unmarshal pgp messages encrypted with ElGamal.
> ----------------------------------------------------
>
>                 Key: CAMEL-5475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5475
>             Project: Camel
>          Issue Type: Bug
>          Components:  camel-crypto
>    Affects Versions: 2.10.0, 2.11.0, Future
>         Environment: All environments
>            Reporter: Bryan McGuire
>         Attachments: patch.txt, patch.txt
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Current strategy for finding the private key is to iterate the secret keychain and matching on the configured email address.  This is incorrect; the secret key chain should be searched by the key id found in the public key encrypted message. What happens now is the DSA signing key is matched instead of the ElGamal decryption key, and this throws java.security.InvalidKeyException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-5475) Can't unmarshal pgp messages encrypted with ElGamal.

Posted by "Bryan McGuire (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan McGuire updated CAMEL-5475:
---------------------------------

    Estimated Complexity: Moderate  (was: Unknown)
      Remaining Estimate: 4h
       Original Estimate: 4h
    
> Can't unmarshal pgp messages encrypted with ElGamal.
> ----------------------------------------------------
>
>                 Key: CAMEL-5475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5475
>             Project: Camel
>          Issue Type: Bug
>          Components:  camel-crypto
>    Affects Versions: 2.10.0, 2.11.0, Future
>         Environment: All environments
>            Reporter: Bryan McGuire
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Current strategy for finding the private key is to iterate the secret keychain and matching on the configured email address.  This is incorrect; the secret key chain should be searched by the key id found in the public key encrypted message. What happens now is the DSA signing key is matched instead of the ElGamal decryption key, and this throws java.security.InvalidKeyException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CAMEL-5475) Can't unmarshal pgp messages encrypted with ElGamal.

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang reassigned CAMEL-5475:
-----------------------------------

    Assignee: Willem Jiang
    
> Can't unmarshal pgp messages encrypted with ElGamal.
> ----------------------------------------------------
>
>                 Key: CAMEL-5475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5475
>             Project: Camel
>          Issue Type: Bug
>          Components:  camel-crypto
>    Affects Versions: 2.10.0, 2.11.0, Future
>         Environment: All environments
>            Reporter: Bryan McGuire
>            Assignee: Willem Jiang
>         Attachments: patch.txt
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Current strategy for finding the private key is to iterate the secret keychain and matching on the configured email address.  This is incorrect; the secret key chain should be searched by the key id found in the public key encrypted message. What happens now is the DSA signing key is matched instead of the ElGamal decryption key, and this throws java.security.InvalidKeyException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-5475) Can't unmarshal pgp messages encrypted with ElGamal.

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang resolved CAMEL-5475.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.10.1
                   2.9.3
    
> Can't unmarshal pgp messages encrypted with ElGamal.
> ----------------------------------------------------
>
>                 Key: CAMEL-5475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5475
>             Project: Camel
>          Issue Type: Bug
>          Components:  camel-crypto
>    Affects Versions: 2.10.0
>         Environment: All environments
>            Reporter: Bryan McGuire
>            Assignee: Willem Jiang
>             Fix For: 2.9.3, 2.10.1, 2.11.0
>
>         Attachments: patch.txt
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Current strategy for finding the private key is to iterate the secret keychain and matching on the configured email address.  This is incorrect; the secret key chain should be searched by the key id found in the public key encrypted message. What happens now is the DSA signing key is matched instead of the ElGamal decryption key, and this throws java.security.InvalidKeyException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-5475) Can't unmarshal pgp messages encrypted with ElGamal.

Posted by "Bryan McGuire (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan McGuire updated CAMEL-5475:
---------------------------------

    Attachment: patch.txt

The attached patch fixes the problem.  It passes all existing tests, and also includes tests I've added for ElGamal keys.
                
> Can't unmarshal pgp messages encrypted with ElGamal.
> ----------------------------------------------------
>
>                 Key: CAMEL-5475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5475
>             Project: Camel
>          Issue Type: Bug
>          Components:  camel-crypto
>    Affects Versions: 2.10.0, 2.11.0, Future
>         Environment: All environments
>            Reporter: Bryan McGuire
>         Attachments: patch.txt
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Current strategy for finding the private key is to iterate the secret keychain and matching on the configured email address.  This is incorrect; the secret key chain should be searched by the key id found in the public key encrypted message. What happens now is the DSA signing key is matched instead of the ElGamal decryption key, and this throws java.security.InvalidKeyException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-5475) Can't unmarshal pgp messages encrypted with ElGamal.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-5475:
-------------------------------

    Affects Version/s:     (was: 2.11.0)
                           (was: Future)
        Fix Version/s: 2.11.0
    
> Can't unmarshal pgp messages encrypted with ElGamal.
> ----------------------------------------------------
>
>                 Key: CAMEL-5475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5475
>             Project: Camel
>          Issue Type: Bug
>          Components:  camel-crypto
>    Affects Versions: 2.10.0
>         Environment: All environments
>            Reporter: Bryan McGuire
>            Assignee: Willem Jiang
>             Fix For: 2.11.0
>
>         Attachments: patch.txt
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Current strategy for finding the private key is to iterate the secret keychain and matching on the configured email address.  This is incorrect; the secret key chain should be searched by the key id found in the public key encrypted message. What happens now is the DSA signing key is matched instead of the ElGamal decryption key, and this throws java.security.InvalidKeyException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-5475) Can't unmarshal pgp messages encrypted with ElGamal.

Posted by "Bryan McGuire (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13426329#comment-13426329 ] 

Bryan McGuire commented on CAMEL-5475:
--------------------------------------

@Willem
The RSA keys used for the existing tests just need to be swapped out for ElGamal keys.

delete pubring.gpg and secring.gpg from  components/camel-crypto/src/test/resources/org/apache/camel/component/crypto/

Then with gnupg, regenerate the rings as ElGamal:
gpg --homedir components/camel-crypto/src/test/resources/org/apache/camel/component/crypto/ --gen-key

it will ask questions as gpg is an interactive program:
For type of key
Pick DSA/ElGamal
For bit length, 1024 is fine
Pick 0 to make the key never expire
confirm yes if asked
For Real Name, use "Super"
For email, use "sdude@nowhere.net"
For passphrase, use "sdude"
Confirm with O for Okay

run the unit test and watch for some failures.
apply the patches I submitted to PGPDataFormat and PGPDataFormatUtil and watch all tests pass.

svn revert the keys, and watch it pass again with the old keys.
                
> Can't unmarshal pgp messages encrypted with ElGamal.
> ----------------------------------------------------
>
>                 Key: CAMEL-5475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5475
>             Project: Camel
>          Issue Type: Bug
>          Components:  camel-crypto
>    Affects Versions: 2.10.0, 2.11.0, Future
>         Environment: All environments
>            Reporter: Bryan McGuire
>            Assignee: Willem Jiang
>         Attachments: patch.txt
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Current strategy for finding the private key is to iterate the secret keychain and matching on the configured email address.  This is incorrect; the secret key chain should be searched by the key id found in the public key encrypted message. What happens now is the DSA signing key is matched instead of the ElGamal decryption key, and this throws java.security.InvalidKeyException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-5475) Can't unmarshal pgp messages encrypted with ElGamal.

Posted by "Bryan McGuire (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan McGuire updated CAMEL-5475:
---------------------------------

    Attachment:     (was: patch.txt)
    
> Can't unmarshal pgp messages encrypted with ElGamal.
> ----------------------------------------------------
>
>                 Key: CAMEL-5475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5475
>             Project: Camel
>          Issue Type: Bug
>          Components:  camel-crypto
>    Affects Versions: 2.10.0, 2.11.0, Future
>         Environment: All environments
>            Reporter: Bryan McGuire
>         Attachments: patch.txt
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Current strategy for finding the private key is to iterate the secret keychain and matching on the configured email address.  This is incorrect; the secret key chain should be searched by the key id found in the public key encrypted message. What happens now is the DSA signing key is matched instead of the ElGamal decryption key, and this throws java.security.InvalidKeyException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-5475) Can't unmarshal pgp messages encrypted with ElGamal.

Posted by "Bryan McGuire (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan McGuire updated CAMEL-5475:
---------------------------------

    Attachment: patch.txt

My clean-ups on the previously uploaded patch introduced a possible bug where the encrypted stream wouldn't be rewound after finding the private key, but before the decryption.

This is my final answer. This is diffed against the 2.10.0 version, but these files don't seem to be updated in versions later than 2.10.0. 
                
> Can't unmarshal pgp messages encrypted with ElGamal.
> ----------------------------------------------------
>
>                 Key: CAMEL-5475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5475
>             Project: Camel
>          Issue Type: Bug
>          Components:  camel-crypto
>    Affects Versions: 2.10.0, 2.11.0, Future
>         Environment: All environments
>            Reporter: Bryan McGuire
>         Attachments: patch.txt, patch.txt, patch.txt
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Current strategy for finding the private key is to iterate the secret keychain and matching on the configured email address.  This is incorrect; the secret key chain should be searched by the key id found in the public key encrypted message. What happens now is the DSA signing key is matched instead of the ElGamal decryption key, and this throws java.security.InvalidKeyException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-5475) Can't unmarshal pgp messages encrypted with ElGamal.

Posted by "Bryan McGuire (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan McGuire updated CAMEL-5475:
---------------------------------

    Patch Info: Patch Available
    
> Can't unmarshal pgp messages encrypted with ElGamal.
> ----------------------------------------------------
>
>                 Key: CAMEL-5475
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5475
>             Project: Camel
>          Issue Type: Bug
>          Components:  camel-crypto
>    Affects Versions: 2.10.0, 2.11.0, Future
>         Environment: All environments
>            Reporter: Bryan McGuire
>         Attachments: patch.txt
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Current strategy for finding the private key is to iterate the secret keychain and matching on the configured email address.  This is incorrect; the secret key chain should be searched by the key id found in the public key encrypted message. What happens now is the DSA signing key is matched instead of the ElGamal decryption key, and this throws java.security.InvalidKeyException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira