diff options
author | Werner Koch <[email protected]> | 2023-11-13 15:10:05 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2023-11-13 15:13:30 +0000 |
commit | 6fab7b075adfa2931e2c0bbccf3038b3d916f37c (patch) | |
tree | 65804a031e0a56da04346d996259ca10996442f7 /g10/misc.c | |
parent | gpg,sm: Set confidential in assuan communication for password. (diff) | |
download | gnupg-6fab7b075adfa2931e2c0bbccf3038b3d916f37c.tar.gz gnupg-6fab7b075adfa2931e2c0bbccf3038b3d916f37c.zip |
gpg: Implement a parser for Kyber encrypted packets.
* g10/misc.c (pubkey_get_nenc): Add ky768 and ky1024 values.
* g10/parse-packet.c (read_octet_string): New.
(read_size_body): Rename to ...
(read_sized_octet_string): this and change args to update-able PKTLEN.
(parse_pubkeyenc): Split general parsing loop for easier reading.
Implement parser for the Kyber algorithms.
--
Take care: this has not been tested at all, it merely passes the
regression test for the other algos.
Kyber is also known as ML-KEM in FIPS-203.
The list mode is slighly changed: In case of a parsing error no data
is printed - before that already parsed data was printed.
GnuPG-bug-id: 6815
Diffstat (limited to 'g10/misc.c')
-rw-r--r-- | g10/misc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/g10/misc.c b/g10/misc.c index ec9b9025d..24242cc30 100644 --- a/g10/misc.c +++ b/g10/misc.c @@ -1783,6 +1783,8 @@ pubkey_get_nenc (pubkey_algo_t algo) case PUBKEY_ALGO_ECDSA: return 0; case PUBKEY_ALGO_ELGAMAL: return 2; case PUBKEY_ALGO_EDDSA: return 0; + case PUBKEY_ALGO_KY768_25519: return 4; + case PUBKEY_ALGO_KY1024_448: return 4; default: return 0; } } |