Skip to content

[Solved] Exception in thread "main" java.io.IOException: unknown PGP public key algorithm encountered #1

@damienlancry

Description

@damienlancry

hello! thanks for making this repo. I was writing an issue because I was struggling to get the code working but as I was writing this, I finally managed to get it running on my own. It might nonetheless be useful to someone running into the same issue.

Long story short, generate the public and private keys using:

gpg --full-generate-key

then when prompted:

Please select what kind of key you want:
   (1) RSA and RSA
   (2) DSA and Elgamal
   (3) DSA (sign only)
   (4) RSA (sign only)
   (9) ECC (sign and encrypt) *default*
  (10) ECC (sign only)

Select 1 or 2 or 4, but do not select 3, 9, or 10. The default choice being 9, it does not work with the default.
Otherwise, you will run into this error (when using 9 or 10,):

java.io.IOException: unknown PGP public key algorithm encountered

Or this error (when using 3):

java.lang.IllegalArgumentException: Can't find public key in the key ring.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions