aboutsummaryrefslogtreecommitdiffstats
path: root/common/kem.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-04-23Require Libgcrypt 1.11.0Werner Koch1-4/+1
* configure.ac (NEED_LIBGCRYPT_VERSION): Set to 1.11.0 * agent/pkdecrypt.c (struct ecc_params): Move constants to the top. -- It does not make anymore sense to allow building with older Libgcrypt versions. After all PQ key support is a major feature and for this we need Libgcrypt.
2024-04-15gpg: Add arg session_algo to pk_decrypt.Werner Koch1-9/+23
* common/kem.c: Move constants to the top. Add some documentation. * g10/pkglue.c (pk_encrypt): Add arguments session_key and factor code out to ... (do_encrypt_rsa_elg): here, (do_encrypt_ecdh): and here, (do_encrypt_kem): and here. * g10/encrypt.c (write_pubkey_enc): Call with session key algorithm. -- This makes it easier to review the code.
2024-04-10common: Rename to kem.c from kmac.c.NIIBE Yutaka1-0/+0
* common/Makefile.am (common_sources): Fix to kem.c. * common/kem.c: Rename. -- Signed-off-by: NIIBE Yutaka <[email protected]>
2024-04-10common,agent: Factor out KEM functions into common/kem.c.NIIBE Yutaka1-2/+75
* common/util.h (compute_kmac256): Remove. (gnupg_ecc_kem_kdf, gnupg_kem_combiner): New. * common/kmac.c (compute_kmac256): Don't expose. (gnupg_ecc_kem_kdf, gnupg_kem_combiner): New. * agent/pkdecrypt.c (agent_hybrid_pgp_kem_decrypt): Use gnupg_ecc_kem_kdf and gnupg_kem_combiner. -- Signed-off-by: NIIBE Yutaka <[email protected]>
2024-04-03common: Allow building with libgcrypt 1.10 for now.Werner Koch1-0/+4
* common/kmac.c (compute_kmac256): Return an error for older gcrypt versions. -- Except for the new KEM module there is no hard requirement for libgcrypt 1.11 *yet*.
2024-03-29common: Add KMAC.NIIBE Yutaka1-0/+132
* common/Makefile.am (common_sources): Add kmac.c. * common/kmac.c: New. * common/util.h (compute_kmac256): New. -- Signed-off-by: NIIBE Yutaka <[email protected]>