aboutsummaryrefslogtreecommitdiffstats
path: root/g10/pkglue.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2024-04-09 13:49:00 +0000
committerWerner Koch <[email protected]>2024-04-09 13:49:00 +0000
commit8d552b279d8963dfaff910a55bcca55ac5e2f258 (patch)
treeaf442611109b88e6d1476300207b8575c3f771c5 /g10/pkglue.c
parentagent: Changes to the new KEM code in pkdecrypt.c (diff)
downloadgnupg-wk/kyber-test.tar.gz
gnupg-wk/kyber-test.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 'g10/pkglue.c')
-rw-r--r--g10/pkglue.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/g10/pkglue.c b/g10/pkglue.c
index f18313913..037e97a14 100644
--- a/g10/pkglue.c
+++ b/g10/pkglue.c
@@ -480,6 +480,11 @@ pk_encrypt (pubkey_algo_t algo, gcry_mpi_t *resarr, gcry_mpi_t data,
gcry_mpi_release (k);
}
}
+ else if (algo == PUBKEY_ALGO_KYBER)
+ {
+ log_debug ("Implement Kyber encryption\n");
+ rc = gpg_error (GPG_ERR_NOT_IMPLEMENTED);
+ }
else
rc = gpg_error (GPG_ERR_PUBKEY_ALGO);