mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
ecc: Use "cv448" to specify key using X448.
* common/openpgp-oid.c (oidtable): Use "cv448". (oid_cv448): Rename from oid_x448. (openpgp_oidbuf_is_cv448, openpgp_oid_is_cv448): Likewise. * common/util.h (openpgp_oid_is_cv448): Follow the change. * g10/ecdh.c (pk_ecdh_generate_ephemeral_key): Likewise. * g10/keygen.c (gen_ecc, ask_algo): Use "cv448". (parse_key_parameter_part): Likewise. * g10/pkglue.c (get_data_from_sexp): Fix for debug output. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
4bdade5b0b
commit
c94eea15d6
5 changed files with 23 additions and 15 deletions
|
@ -456,7 +456,7 @@ pk_ecdh_generate_ephemeral_key (gcry_mpi_t *pkey, gcry_mpi_t *r_k)
|
|||
int is_little_endian = 0;
|
||||
int require_opaque = 0;
|
||||
|
||||
if (openpgp_oid_is_x448 (pkey[0]))
|
||||
if (openpgp_oid_is_cv448 (pkey[0]))
|
||||
{
|
||||
is_little_endian = 1;
|
||||
require_opaque = 1;
|
||||
|
|
|
@ -1748,7 +1748,7 @@ gen_ecc (int algo, const char *curve, kbnode_t pub_root,
|
|||
curve = "Curve25519";
|
||||
else if (!ascii_strcasecmp (curve, "ed25519"))
|
||||
curve = "Ed25519";
|
||||
else if (!ascii_strcasecmp (curve, "x448"))
|
||||
else if (!ascii_strcasecmp (curve, "cv448"))
|
||||
curve = "X448";
|
||||
|
||||
/* Note that we use the "comp" flag with EdDSA to request the use of
|
||||
|
@ -2328,7 +2328,7 @@ ask_algo (ctrl_t ctrl, int addmode, int *r_subkey_algo, unsigned int *r_usage,
|
|||
kpi->algo = PUBKEY_ALGO_EDDSA;
|
||||
else if (!strcmp (algostr, "cv25519"))
|
||||
kpi->algo = PUBKEY_ALGO_ECDH;
|
||||
else if (!strcmp (algostr, "x448"))
|
||||
else if (!strcmp (algostr, "cv448"))
|
||||
kpi->algo = PUBKEY_ALGO_ECDH;
|
||||
else if ((kpi->usage & GCRY_PK_USAGE_ENCR))
|
||||
kpi->algo = PUBKEY_ALGO_ECDH;
|
||||
|
@ -3483,7 +3483,7 @@ parse_key_parameter_part (ctrl_t ctrl,
|
|||
algo = PUBKEY_ALGO_EDDSA;
|
||||
else if (!strcmp (algostr, "cv25519"))
|
||||
algo = PUBKEY_ALGO_ECDH;
|
||||
else if (!strcmp (algostr, "x448"))
|
||||
else if (!strcmp (algostr, "cv448"))
|
||||
algo = PUBKEY_ALGO_ECDH;
|
||||
else if ((kpi->usage & GCRY_PK_USAGE_ENCR))
|
||||
algo = PUBKEY_ALGO_ECDH;
|
||||
|
@ -3612,7 +3612,7 @@ parse_key_parameter_part (ctrl_t ctrl,
|
|||
* elg2048 := Elgamal with 2048 bit.
|
||||
* ed25519 := EDDSA using curve Ed25519.
|
||||
* cv25519 := ECDH using curve Curve25519.
|
||||
* x448 := ECDH using curve X448.
|
||||
* cv448 := ECDH using curve X448.
|
||||
* nistp256:= ECDSA or ECDH using curve NIST P-256
|
||||
*
|
||||
* All strings with an unknown prefix are considered an elliptic
|
||||
|
|
|
@ -106,7 +106,8 @@ get_data_from_sexp (gcry_sexp_t sexp, const char *item, size_t *r_size)
|
|||
const char *value;
|
||||
byte *v;
|
||||
|
||||
log_printsexp ("get_data_from_sexp:", sexp);
|
||||
if (DBG_CRYPTO)
|
||||
log_printsexp ("get_data_from_sexp:", sexp);
|
||||
|
||||
list = gcry_sexp_find_token (sexp, item, 0);
|
||||
log_assert (list);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue