paulmillr / micro-key-producer

Produces secure keys and passwords. Supports SSH, PGP, BLS, OTP and many other formats
MIT License
34 stars 9 forks source link

attempting to use ed25519-keygen to load a key created with gnupg #4

Closed jcolson closed 1 year ago

jcolson commented 1 year ago

https://gist.github.com/jcolson/5bfa8650482cc0e31788b1d42b20fb0b

I'm attempting to use your library to load a gpg key created with gnupg (I noticed in one of your test cases you where doing something similar, but it was with a key that was generated deterministically with your tool, I assume.) Is there something that could be changed in order to successfully load a gpg key not created using ed25519-keygen/pgp ?

paulmillr commented 1 year ago

(I noticed in one of your test cases you where doing something similar, but it was with a key that was generated deterministically with your tool, I assume.)

No, it is key generated by GnuPG, we check that we generate exact same output as GPG in this test case.

Is there something that could be changed in order to successfully load a gpg key not created using ed25519-keygen/pgp ?

That's strange key:

Please note, that we only implement subset of PGP spec which required to generate keys, so not all GPG messages will be sucessfully decoded.

In any case, that should work now. We've added third checksum type.