mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
experiment: Fix keygrip computation for new 448 key on gpg-agent.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
f2b54b3309
commit
e6002e16c9
4 changed files with 37 additions and 24 deletions
|
@ -8,15 +8,11 @@
|
|||
#include "openpgpdefs.h"
|
||||
|
||||
gcry_mpi_t
|
||||
openpgp_ecc_parse_pubkey (pubkey_algo_t pkalgo, const char *curve_oid,
|
||||
openpgp_ecc_parse_pubkey (pubkey_algo_t pkalgo, const char *curve,
|
||||
gcry_mpi_t pubkey)
|
||||
{
|
||||
unsigned int nbits = 0;
|
||||
unsigned char *buf = NULL;
|
||||
const char *curve = openpgp_oid_to_curve (curve_oid, 1);
|
||||
|
||||
if (curve == NULL)
|
||||
curve = curve_oid;
|
||||
|
||||
if ((pkalgo == PUBKEY_ALGO_EDDSA && !strcmp (curve, "Ed448"))
|
||||
|| (pkalgo == PUBKEY_ALGO_ECDH && !strcmp (curve, "X448")))
|
||||
|
@ -35,15 +31,11 @@ openpgp_ecc_parse_pubkey (pubkey_algo_t pkalgo, const char *curve_oid,
|
|||
|
||||
|
||||
gcry_mpi_t
|
||||
openpgp_ecc_parse_seckey (pubkey_algo_t pkalgo, const char *curve_oid,
|
||||
openpgp_ecc_parse_seckey (pubkey_algo_t pkalgo, const char *curve,
|
||||
gcry_mpi_t seckey)
|
||||
{
|
||||
unsigned int nbits = 0;
|
||||
unsigned char *buf = NULL;
|
||||
const char *curve = openpgp_oid_to_curve (curve_oid, 1);
|
||||
|
||||
if (curve == NULL)
|
||||
curve = curve_oid;
|
||||
|
||||
if ((pkalgo == PUBKEY_ALGO_EDDSA && !strcmp (curve, "Ed448"))
|
||||
|| (pkalgo == PUBKEY_ALGO_ECDH && !strcmp (curve, "X448")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue