dsa,ecdsa: Fix use of nonce, use larger one.

Authored by gniibe on Aug 8 2019, 10:42 AM.

Description

dsa,ecdsa: Fix use of nonce, use larger one.

* cipher/dsa-common.c (_gcry_dsa_modify_k): New.
* cipher/pubkey-internal.h (_gcry_dsa_modify_k): New.
* cipher/dsa.c (sign): Use _gcry_dsa_modify_k.
* cipher/ecc-ecdsa.c (_gcry_ecc_ecdsa_sign): Likewise.
* cipher/ecc-gost.c (_gcry_ecc_gost_sign): Likewise.

Cherry-picked master commit of:
7c2943309d14407b51c8166c4dcecb56a3628567

CVE-id: CVE-2019-13627

  • GnuPG-bug-id: T4626
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Committed
gniibeAug 9 2019, 2:20 AM
Parents
rCd5407b78cca9: ecc: Add mitigation against timing attack.
Branches
Unknown
Tags
Unknown