gpg: Finish experimental support for Ed25519.
authorWerner Koch <wk@gnupg.org>
Wed, 7 May 2014 11:16:32 +0000 (13:16 +0200)
committerWerner Koch <wk@gnupg.org>
Wed, 7 May 2014 11:27:43 +0000 (13:27 +0200)
commit8fee6c1ce6d116fe7909dbe1184d95bc91305484
treee803fc492044c704a55b32700c491627f5f93f89
parentbdb9c2b314400da9155b8a924e22e486793dda89
gpg: Finish experimental support for Ed25519.

* agent/cvt-openpgp.c (try_do_unprotect_arg_s): Add field "curve".
(get_keygrip): Add and use arg CURVE.
(convert_secret_key): Ditto.
(convert_transfer_key): Ditto.
(get_npkey_nskey): New.
(prepare_unprotect): Replace gcrypt functions by
get_npkey_nskey.  Allow opaque MPIs.
(do_unprotect): Use CURVE instead of parameters.
(convert_from_openpgp_main): Ditto.
(convert_to_openpgp):  Simplify.
* g10/import.c (one_mpi_from_pkey): Remove.
(transfer_secret_keys): Rewrite to use the curve instead of the
parameters.
* g10/parse-packet.c (parse_key): Mark protected MPIs with USER1 flag.

* common/openpgp-oid.c (openpgp_curve_to_oid): Allow the use of
 "NIST P-256" et al.
* g10/keygen.c (ask_curve): Add arg ALGO.
(generate_keypair): Rewrite the ECC key logic.

* tests/openpgp/ecc.test: Provide the "ecc" passphrase.
agent/cvt-openpgp.c
agent/keyformat.txt
common/openpgp-oid.c
g10/import.c
g10/keygen.c
g10/parse-packet.c
tests/openpgp/ecc.test