diff options
author | Werner Koch <wk@gnupg.org> | 2013-10-15 09:08:31 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2013-10-15 09:08:31 +0200 |
commit | 537969fbbb1104b8305a7edb331b7666d54eff2c (patch) | |
tree | 2e70f17203462a2f7e14ec0d3da35532482670f9 /cipher/pubkey-util.c | |
parent | d3a605d7827b8a73ef844e9e5183590bd6b1389a (diff) | |
download | libgcrypt-537969fbbb1104b8305a7edb331b7666d54eff2c.tar.gz |
ecc: Support use of Ed25519 with ECDSA.
* src/cipher.h (PUBKEY_FLAG_ECDSA): New.
* cipher/pubkey-util.c (_gcry_pk_util_parse_flaglist): Add flag "ecdsa".
* cipher/ecc.c (verify_ecdsa, verify_eddsa): Remove some debug output.
(ecc_generate, ecc_sign, ecc_verify): Support Ed25519 with ECDSA.
* tests/keygen.c (check_ecc_keys): Create such a test key.
* tests/pubkey.c (fail, info, data_from_hex, extract_cmp_data): New.
Take from dsa-6979.c
(check_ed25519ecdsa_sample_key): new.
(main): Call new test.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'cipher/pubkey-util.c')
-rw-r--r-- | cipher/pubkey-util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cipher/pubkey-util.c b/cipher/pubkey-util.c index 3dfc0279..caf715eb 100644 --- a/cipher/pubkey-util.c +++ b/cipher/pubkey-util.c @@ -75,6 +75,10 @@ _gcry_pk_util_parse_flaglist (gcry_sexp_t list, encoding = PUBKEY_ENC_RAW; flags |= PUBKEY_FLAG_EDDSA; } + else if (n == 5 && !memcmp (s, "ecdsa", 5)) + { + flags |= PUBKEY_FLAG_ECDSA; + } else if (n == 3 && !memcmp (s, "raw", 3) && encoding == PUBKEY_ENC_UNKNOWN) { |