From: Jonathan McDowell Date: Sat, 15 Aug 2015 09:23:54 +0000 (+0100) Subject: Add support for displaying EDDSA keys X-Git-Tag: onak-0.4.6~9 X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=ced2e52d6466e53a9e7d1cc1d1b606e902ba592b;p=onak.git Add support for displaying EDDSA keys EDDSA is not yet formally defined, but understood by GnuPG 2.1 and has been seen in the wild. Key size is defined by the OID as for ECDH/ECDSA keys. --- diff --git a/keyindex.c b/keyindex.c index a26d458..ae1bcf8 100644 --- a/keyindex.c +++ b/keyindex.c @@ -48,6 +48,7 @@ char pkalgo2char(uint8_t algo) typech = 'D'; break; case OPENPGP_PKALGO_ECDSA: + case OPENPGP_PKALGO_EDDSA: typech = 'E'; break; case OPENPGP_PKALGO_EC: @@ -93,6 +94,7 @@ unsigned int keylength(struct openpgp_packet *keydata) switch (keydata->data[5]) { case OPENPGP_PKALGO_EC: case OPENPGP_PKALGO_ECDSA: + case OPENPGP_PKALGO_EDDSA: /* Elliptic curve key size is based on OID */ /* Ed25519 / 1.3.6.1.4.1.11591.15.1 */ if ((keydata->data[6] == 9) && diff --git a/openpgp.h b/openpgp.h index 7196e95..84a1b92 100644 --- a/openpgp.h +++ b/openpgp.h @@ -29,6 +29,7 @@ #define OPENPGP_PKALGO_ECDSA 19 #define OPENPGP_PKALGO_ELGAMAL_SIGN 20 #define OPENPGP_PKALGO_DH 21 +#define OPENPGP_PKALGO_EDDSA 22 #define OPENPGP_SYMALGO_PLAIN 0 #define OPENPGP_SYMALGO_IDEA 1