diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2013-10-15 23:56:44 +0400 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2013-10-16 16:31:07 +0200 |
commit | 83902f1f1dbc8263a0c3f61be59cd2eb95293c97 (patch) | |
tree | 44104dabba10787887e717ddf86d98a83a9dda02 /tests/curves.c | |
parent | 187b2bb541b985255aee262d181434a7cb4ae2e7 (diff) | |
download | libgcrypt-83902f1f1dbc8263a0c3f61be59cd2eb95293c97.tar.gz |
ecc: Add support for GOST R 34.10-2001/-2012 signatures
* src/cipher.h: define PUBKEY_FLAG_GOST
* cipher/ecc-curves.c: Add GOST2001-test and GOST2012-test curves
defined in standards. Typical applications would use either those
curves, or curves defined in RFC 4357 (will be added later).
* cipher/ecc.c (sign_gost, verify_gost): New.
(ecc_sign, ecc_verify): use sign_gost/verify_gost if PUBKEY_FLAG_GOST
is set.
(ecc_names): add "gost" for gost signatures.
* cipher/pubkey-util.c (_gcry_pk_util_parse_flaglist,
_gcry_pk_util_preparse_sigval): set PUBKEY_FLAG_GOST if gost flag
is present in s-exp.
* tests/benchmark.c (ecc_bench): also benchmark GOST signatures.
* tests/basic.c (check_pubkey): add two public keys from
GOST R 34.10-2012 standard.
(check_pubkey_sign_ecdsa): add two data sets to check gost signatures.
* tests/curves.c: correct N_CURVES as we now have 2 more curves.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Removed some comments from the new curve definitions in ecc-curves.c
to avoid line wrapping. Eventually we will develop a precompiler to
avoid parsing those hex strings. -wk
Diffstat (limited to 'tests/curves.c')
-rw-r--r-- | tests/curves.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/curves.c b/tests/curves.c index 2c3ae53b..198693e5 100644 --- a/tests/curves.c +++ b/tests/curves.c @@ -29,7 +29,7 @@ #include "../src/gcrypt-int.h" /* Number of curves defined in ../cipger/ecc.c */ -#define N_CURVES 13 +#define N_CURVES 15 /* A real world sample public key. */ static char const sample_key_1[] = |