diff options
author | Werner Koch <[email protected]> | 2024-04-09 13:49:00 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2024-04-09 13:49:00 +0000 |
commit | 8d552b279d8963dfaff910a55bcca55ac5e2f258 (patch) | |
tree | af442611109b88e6d1476300207b8575c3f771c5 /common/openpgp-oid.c | |
parent | agent: Changes to the new KEM code in pkdecrypt.c (diff) | |
download | gnupg-8d552b279d8963dfaff910a55bcca55ac5e2f258.tar.gz gnupg-8d552b279d8963dfaff910a55bcca55ac5e2f258.zip |
gpg: Make Kyber creation more flexible.wk/kyber-test
* 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.
GnuPG-bug-id: 6815
Diffstat (limited to 'common/openpgp-oid.c')
-rw-r--r-- | common/openpgp-oid.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/openpgp-oid.c b/common/openpgp-oid.c index bc82cc6b0..4b59c1aeb 100644 --- a/common/openpgp-oid.c +++ b/common/openpgp-oid.c @@ -599,7 +599,9 @@ openpgp_is_curve_supported (const char *name, int *r_algo, { if ((!ascii_strcasecmp (name, oidtable[idx].name) || (oidtable[idx].alias - && !ascii_strcasecmp (name, (oidtable[idx].alias)))) + && !ascii_strcasecmp (name, (oidtable[idx].alias))) + || (oidtable[idx].abbr + && !ascii_strcasecmp (name, (oidtable[idx].abbr)))) && curve_supported_p (oidtable[idx].name)) { if (r_algo) |