Home GnuPG

cipher:kem: Add ECC KEM for X25519.

Description

cipher:kem: Add ECC KEM for X25519.

* cipher/Makefile.am (libcipher_la_SOURCES): Add kem-ecc.{c,h}.
* cipher/kem-ecc.c: New.
* cipher/kem-ecc.h: New.
* cipher/kem.c (_gcry_kem_keypair): Dispatch to _gcry_ecc_raw_keypair.
(_gcry_kem_encap): Dispatch to _gcry_ecc_raw_encap,
_gcry_ecc_dhkem_encap, _gcry_openpgp_kem_encap, and
_gcry_cms_kem_encap.
(_gcry_kem_decap): Dispatch to _gcry_ecc_raw_decap,
_gcry_ecc_dhkem_decap, _gcry_openpgp_kem_decap, and
_gcry_cms_kem_decap.
* src/gcrypt.h.in: Add constants for ECC KEM.
* tests/t-kem.c (test_kem_raw_x25519, test_kem_dhkem_x25519)
(test_kem_openpgp_x25519, test_kem_cms_x25519): New.
(check_kem, main): Add tests for ECC KEM.
  • GnuPG-bug-id: T6755
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Mar 28 2024, 3:52 AM
Parents
rCb81076beba28: tests:basic: Add cSHAKE test vectors.
Branches
Unknown
Tags
Unknown
Tasks
T6755: libgcrypt: KEM API