Home GnuPG

ecc: Add support for GOST R 34.10-2001/-2012 signatures
83902f1f1dbcUnpublished

Unpublished Commit · Learn More

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

Description

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.

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

  • Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>

Details

Provenance
lumagAuthored on Oct 15 2013, 9:56 PM
wernerCommitted on Oct 16 2013, 4:31 PM
Parents
rC187b2bb541b9: Fix 256-bit ecdsa test key definition
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rC83902f1f1dbc: ecc: Add support for GOST R 34.10-2001/-2012 signatures (authored by Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>).Oct 16 2013, 4:31 PM