Home GnuPG
Diffusion GnuPG afe85582ddc2

agent: Fix import of OpenPGP EdDSA keys.
afe85582ddc2Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

agent: Fix import of OpenPGP EdDSA keys.

* agent/cvt-openpgp.c (get_keygrip): Special case EdDSA.
(convert_secret_key): Ditto.
(convert_transfer_key): Ditto.
(apply_protection): Handle opaque MPIs.
(do_unprotect): Check FLAG_OPAQUE instead of FLAG_USER1 before
unpacking an opaque mpi.

The key transfer protocol between gpg and gpg-agent uses gcrypt
algorithm numbers which merge all ECC algorithms into one. Thus it is
not possible to use the algorithm number to determine the EdDSA
algorithm. We need to known that because Libgcrypt requires the
"eddsa" flag with the curve "Ed25519" to actually use the Ed25519
signature specification.

The last fix is for correctness; the first case won't be used anyway.

Details

Provenance
wernerAuthored on Sep 2 2014, 11:22 AM
Parents
rG4054d86abcb7: gpg: Fix export of ecc secret keys by adjusting check ordering.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rGafe85582ddc2: agent: Fix import of OpenPGP EdDSA keys. (authored by Werner Koch <wk@gnupg.org>).Sep 2 2014, 11:22 AM