aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/openpgp-oid.c1
-rw-r--r--common/sexputil.c9
2 files changed, 9 insertions, 1 deletions
diff --git a/common/openpgp-oid.c b/common/openpgp-oid.c
index 605caa679..4e53a74fd 100644
--- a/common/openpgp-oid.c
+++ b/common/openpgp-oid.c
@@ -49,6 +49,7 @@ static struct {
{ "Curve25519", "1.3.6.1.4.1.3029.1.5.1", 255, "cv25519", PUBKEY_ALGO_ECDH },
{ "Ed25519", "1.3.6.1.4.1.11591.15.1", 255, "ed25519", PUBKEY_ALGO_EDDSA },
{ "X448", "1.3.101.111", 448, "cv448", PUBKEY_ALGO_ECDH },
+ { "Ed448", "1.3.101.113", 448, "ed448", PUBKEY_ALGO_EDDSA },
{ "NIST P-256", "1.2.840.10045.3.1.7", 256, "nistp256" },
{ "NIST P-384", "1.3.132.0.34", 384, "nistp384" },
diff --git a/common/sexputil.c b/common/sexputil.c
index b007b71f6..981a06664 100644
--- a/common/sexputil.c
+++ b/common/sexputil.c
@@ -624,9 +624,10 @@ get_pk_algo_from_key (gcry_sexp_t key)
algo = gcry_pk_map_name (algoname);
if (algo == GCRY_PK_ECC)
{
- gcry_sexp_t l1 = gcry_sexp_find_token (list, "flags", 0);
+ gcry_sexp_t l1;
int i;
+ l1 = gcry_sexp_find_token (list, "flags", 0);
for (i = l1 ? gcry_sexp_length (l1)-1 : 0; i > 0; i--)
{
s = gcry_sexp_nth_data (l1, i, &n);
@@ -640,6 +641,12 @@ get_pk_algo_from_key (gcry_sexp_t key)
}
}
gcry_sexp_release (l1);
+
+ l1 = gcry_sexp_find_token (list, "curve", 0);
+ s = gcry_sexp_nth_data (l1, 1, &n);
+ if (n == 5 && !memcmp (s, "Ed448", 5))
+ algo = GCRY_PK_EDDSA;
+ gcry_sexp_release (l1);
}
out: