Home GnuPG

cipher:kem:ecc: Support brainpoolP256r1 and brainpoolP384r1.

Description

cipher:kem:ecc: Support brainpoolP256r1 and brainpoolP384r1.

* cipher/kem.c (_gcry_kem_keypair): Support classic curves.
(_gcry_kem_encap, _gcry_kem_decap): Likewise.
* cipher/kem-ecc.c (algo_to_curve, algo_to_seckey_len): New.
(_gcry_ecc_raw_keypair): Support classic curves.
(_gcry_ecc_raw_encap, _gcry_ecc_raw_decap): Likewise.
(ecc_tweak_bits): Move to ...
* cipher/ecc-ecdh.c (ecc_tweak_bits): here.
(_gcry_ecc_curve_keypair): New.
(_gcry_ecc_curve_mul_point): Add length arguments.
* src/gcrypt-int.h (_gcry_ecc_curve_keypair): New.
* src/gcrypt.h.in: Add constants for brainpoolP256r1 and
brainpoolP384r1.
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Apr 22 2024, 7:38 AM
Parents
rC47f2cb8f6f35: cipher:ecc: Return the result in SEC1 point format for Weierstrass.
Branches
Unknown
Tags
Unknown