Bouncy Castle PGP Decryption Issue

后端 未结 2 2011
一整个雨季
一整个雨季 2021-02-18 21:37

I\'ve had a application using Bouncy Castle for PGP decryption which has run without any issues for the past 8 months or so, and the past 2 days all of a sudden an issue has com

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-18 22:18

    Looks like another party is encrypting to other/different keys. Probably your keyring contains RSA key as well, but BouncyCastle uses only the first (???). Using gpg, you can check the contents of your encrypted file by issuing gpg --list-packets YourEncryptedFile.pgp

    After that apply the same command to 'good' file, and to your keyrings, and compare key identifiers to which file is encrypted. Since you are using DSA keys, file should be encrypted to ElGamal subkey.

提交回复
热议问题