Home GnuPG
Diffusion GnuPG 6fab7b075adf

gpg: Implement a parser for Kyber encrypted packets.

Description

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.

Details

Provenance
wernerAuthored on Nov 13 2023, 4:10 PM
Parents
rGec1446f94465: gpg,sm: Set confidential in assuan communication for password.
Branches
Unknown
Tags
Unknown
Tasks
T6815: PQC encryption for GnuPG