mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
common:kem: Factor out a function to retrieve ECC parameters.
* common/util.h (struct gnupg_ecc_params, gnupg_get_ecc_params): New. (ECC_SCALAR_LEN_MAX, ECC_POINT_LEN_MAX, ECC_HASH_LEN_MAX): New. * agent/pkdecrypt.c (ecc_extract_pk_from_key, ecc_extract_sk_from_key): Follow the change of gnupg_get_ecc_params. (ecc_raw_kem, ecc_pgp_kem_decap, composite_pgp_kem_decrypt): Likewise. (ecc_kem_decrypt): Likewise. (get_ecc_params): Move to... * common/kem.c (gnupg_get_ecc_params): ... here * g10/pkglue.c (ECC_POINT_LEN_MAX, ECC_HASH_LEN_MAX): Remove duplicates. -- GnuPG-bug-id: 7649 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
a354018bf3
commit
5e623b71d5
4 changed files with 104 additions and 112 deletions
|
@ -33,11 +33,6 @@
|
|||
#include "options.h"
|
||||
|
||||
|
||||
/* Maximum buffer sizes required for ECC KEM. */
|
||||
#define ECC_POINT_LEN_MAX (1+2*66)
|
||||
#define ECC_HASH_LEN_MAX 64
|
||||
|
||||
|
||||
/* FIXME: Better change the function name because mpi_ is used by
|
||||
gcrypt macros. */
|
||||
gcry_mpi_t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue