diff options
author | Werner Koch <wk@gnupg.org> | 2013-11-05 19:00:09 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2013-11-05 19:00:09 +0100 |
commit | b9fd3988b54b50109f4e7179e7fe0739bb1d97c5 (patch) | |
tree | 879510f3cfce1a862506cb34edbacdb05d7ca6bd /tests/t-ed25519.c | |
parent | f09ffe8a4802af65a116e79eceeb1cb4ed4fa2f4 (diff) | |
download | libgcrypt-b9fd3988b54b50109f4e7179e7fe0739bb1d97c5.tar.gz |
ecc: Require "eddsa" flag for curve Ed25519.
* src/cipher.h (PUBKEY_FLAG_ECDSA): Remove.
* cipher/pubkey-util.c (_gcry_pk_util_parse_flaglist): Remove "ecdsa".
* cipher/ecc.c (ecc_generate, ecc_sign, ecc_verify): Require "eddsa" flag.
* cipher/ecc-misc.c (_gcry_ecc_compute_public): Depend "eddsa" flag.
* tests/benchmark.c, tests/keygen.c, tests/pubkey.c
* tests/t-ed25519.c, tests/t-mpi-point.c: Adjust for changed flags.
--
This changes make using ECDSA signatures the default for all curves.
If another signing algorithm is to be used, the corresponding flag
needs to be given. In particular the flags "eddsa" is now always
required with curve Ed25519 to comply with the specs. This change
makes the code better readable by not assuming a certain signature
algorithm depending on the curve.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'tests/t-ed25519.c')
-rw-r--r-- | tests/t-ed25519.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/t-ed25519.c b/tests/t-ed25519.c index be200fa4..465a217b 100644 --- a/tests/t-ed25519.c +++ b/tests/t-ed25519.c @@ -288,6 +288,7 @@ one_test (int testno, const char *sk, const char *pk, "(private-key" " (ecc" " (curve \"Ed25519\")" + " (flags eddsa)" " (q %b)" " (d %b)))", (int)buflen2, buffer2, @@ -297,6 +298,7 @@ one_test (int testno, const char *sk, const char *pk, "(private-key" " (ecc" " (curve \"Ed25519\")" + " (flags eddsa)" " (d %b)))", (int)buflen, buffer); if (err) @@ -310,6 +312,7 @@ one_test (int testno, const char *sk, const char *pk, "(public-key" " (ecc" " (curve \"Ed25519\")" + " (flags eddsa)" " (q %b)))", (int)buflen2, buffer2))) { fail ("error building s-exp for test %d, %s: %s", |