Truncate hash values for ECDSA signature scheme

Authored by lumag on Dec 30 2013, 9:38 PM.

Description

Truncate hash values for ECDSA signature scheme

* cipher/dsa-common (_gcry_dsa_normalize_hash): New. Truncate opaque
  mpis as required for DSA and ECDSA signature schemas.
* cipher/dsa.c (verify): Return gpg_err_code_t value from verify() to
  behave like the rest of internal sign/verify functions.
* cipher/dsa.c (sign, verify, dsa_verify): Factor out hash truncation.
* cipher/ecc-ecdsa.c (_gcry_ecc_ecdsa_sign): Factor out hash truncation.
* cipher/ecc-ecdsa.c (_gcry_ecc_ecdsa_verify):
  as required by ECDSA scheme, truncate hash values to bitlength of
  used curve.
* tests/pubkey.c (check_ecc_sample_key): add a testcase for hash
  truncation.
  • Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>

Details

Committed
wernerJan 13 2014, 11:09 AM
Parents
rC2c5ec803100e: Add GOST R 34.10-2012 curves proposed by TC26
Branches
Unknown
Tags
Unknown
Werner Koch <wk@gnupg.org> committed rC9edcf1090e04: Truncate hash values for ECDSA signature scheme (authored by Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>).Jan 13 2014, 11:09 AM
werner mentioned this in Unknown Object (Maniphest Task).Mar 27 2017, 5:05 PM
werner mentioned this in Unknown Object (Maniphest Task).Mar 27 2017, 5:28 PM