Home GnuPG

cipher:kyber: Add gcry_kem_genkey to support deterministic op.

Description

cipher:kyber: Add gcry_kem_genkey to support deterministic op.

* cipher/kem.c (_gcry_kem_genkey): Rename from _gcry_kem_keypair,
adding OPTIONAL argument.
(_gcry_kem_encap): Allow OPTIONAL for deterministic operation.
(kem_generate): Use _gcry_kem_genkey instead of _gcry_kem_keypair.
* cipher/kyber.c (crypto_kem_keypair_derand_2)
(crypto_kem_keypair_derand_3, crypto_kem_keypair_derand_4): Expose.
(crypto_kem_enc_derand_2, crypto_kem_enc_derand_3): Likewise.
(crypto_kem_enc_derand_4): Likewise.
(kyber_keypair): Allow COINS for deterministic operation.
(kyber_encap): Likewise.
* cipher/kyber.h: Allow COINS for deterministic operation.
(crypto_kem_keypair_derand, crypto_kem_enc_derand): New.
* src/gcrypt-int.h (_gcry_kem_genkey): Rename from _gcry_kem_keypair.
* src/gcrypt.h.in (gcry_kem_genkey): New.
* src/libgcrypt.def (gcry_kem_genkey): New.
* src/libgcrypt.vers (gcry_kem_genkey): New.
* src/visibility.c (gcry_kem_genkey): New.
* src/visibility.h (gcry_kem_genkey): New.
  • GnuPG-bug-id: T7277
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Tue, Sep 17, 9:19 AM
Parents
rC841ccd96e1a5: doc: Update an URL hint in the configure script.
Branches
Unknown
Tags
Unknown
Tasks
T7277: libgcrypt: Adding Known Answer Tests for KEM