Home GnuPG

cipher: Add sign+hash, verify+hash, and random-override API.

Description

cipher: Add sign+hash, verify+hash, and random-override API.

* cipher/pubkey.c (_gcry_pk_sign_md, _gcry_pk_verify_md): New.
(_gcry_pk_random_override_new): New.
(_gcry_pk_get_random_override): New.
* src/gcrypt-int.h: Add those routines.
* src/context.h (CONTEXT_TYPE_RANDOM_OVERRIDE): New.
* src/context.c (_gcry_ctx_alloc, _gcry_ctx_release): Handle
CONTEXT_TYPE_RANDOM_OVERRIDE.
* src/gcrypt.h.in (gcry_error_t gcry_pk_hash_sign): New.
(gcry_error_t gcry_pk_hash_verify): New.
(gcry_pk_random_override_new): New.
* src/libgcrypt.def, src/libgcrypt.vers: Update.
* src/visibility.c (gcry_pk_hash_sign, gcry_pk_hash_verify): New.
(gcry_pk_random_override_new): New.
* src/visibility.h: Add those routines.
  • GnuPG-bug-id: T4894
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Oct 7 2021, 6:53 AM
Parents
rC16a9eaad5d1a: cipher:dsa,ecdsa: Support supplying K externally.
Branches
Unknown
Tags
Unknown
Tasks
T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation