Home GnuPG
Diffusion GnuPG 84ddb24e30c5

gpg: Make Kyber creation more flexible.

Description

gpg: Make Kyber creation more flexible.

* common/openpgp-oid.c (openpgp_is_curve_supported): Allow the
abbreviated curve name.
* g10/pkglue.c (pk_encrypt): Add debug output.
* g10/seskey.c (encode_session_key): Handle Kyber session key like
ECDH.  This is just a stub.
* g10/keygen.c (ecckey_from_sexp): Use the modern OID for cv25519.
(parse_key_parameter_part): Allow more Kyber variants.

Test by creating an ed25519 key and using

gpg --quick-add-key --batch --passphrase "" <fingerprint> <algo>

to create several subkeys. Tested with ALGOs:

kyber768
kyber1024
ky768_cv25519
ky768_bp256
kyber768_nistp256
ky1024_cv448

All curves capable of encryption should work.

Details

Provenance
wernerAuthored on Tue, Apr 9, 3:49 PM
Parents
rGc21237ac2722: agent:kem: Externalize FIXED_INFO.
Branches
Unknown
Tags
Unknown
Tasks
T6815: PQC encryption for GnuPG