Home GnuPG

cipher: Add use of the Kyber implementation.

Description

cipher: Add use of the Kyber implementation.

* cipher/Makefile.am (EXTRA_DIST): Add kyber-common.c kyber-kdep.c.
(libcipher_la_SOURCES): Add kyber.c and kyber.h.
* cipher/kem.c (_gcry_kem_keypair): Add call to kyber_keypair.
(_gcry_kem_encap): Add call to kyber_encap.
(_gcry_kem_decap): Add call to kyber_decap.
* tests/t-common.h (show_note): Factor from existing uses.
(show_sexp, prepend_srcdir, read_textline, copy_data): Likewise.
(hex2buffer, reverse_buffer): Likewise.
* tests/t-kem.c (show_note): Remove.
(test_kem_sntrup761): Rename from test_kem.
(test_kem_mlkem512, test_kem_mlkem768, test_kem_mlkem1024): New.
(check_kem): Add N_LOOPS argument.  Call relevant tests by the
variable SELECTED_ALGO.
(main): Add option handling to select testing specific algorithm.
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Jan 15 2024, 5:33 AM
Parents
rC5c9c4dca39f2: cipher:kyber: Modify VERIFY function.
Branches
Unknown
Tags
Unknown