aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2025-08-04 08:45:53 +0000
committerNIIBE Yutaka <[email protected]>2025-08-04 08:45:53 +0000
commitd52be132c779f198aa026b8a76f41dffae81c837 (patch)
treeac90091d39d5d60d91debcfe0e4d0017e5171ef3
parentgpg: Improve the "help" and "full-help" --foo-options. (diff)
downloadgnupg-d52be132c779f198aa026b8a76f41dffae81c837.tar.gz
gnupg-d52be132c779f198aa026b8a76f41dffae81c837.zip
gpg: Fix a regression composite KEM with PQC and ECC.
* g10/pkglue.c (do_encrypt_kem): Length of shared secret is the hash length in this case, not the scalar length. -- GnuPG-bug-id: 7649 Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--g10/pkglue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/pkglue.c b/g10/pkglue.c
index a6bd893b3..11d252f0a 100644
--- a/g10/pkglue.c
+++ b/g10/pkglue.c
@@ -486,8 +486,8 @@ do_encrypt_kem (PKT_public_key *pk, gcry_mpi_t data, int seskey_algo,
goto leave;
}
ecc_ct_len = ecc_ecdh_len = ecc->point_len;
- ecc_ss_len = ecc->scalar_len;
ecc_hash_algo = ecc->hash_algo;
+ ecc_ss_len = gcry_md_get_algo_dlen (ecc_hash_algo);
ecc_pubkey = gcry_mpi_get_opaque (pk->pkey[1], &nbits);
ecc_pubkey_len = (nbits+7)/8;