diff options
Diffstat (limited to 'common/openpgp-misc.c')
-rw-r--r-- | common/openpgp-misc.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/common/openpgp-misc.c b/common/openpgp-misc.c index 2062b1d9d..74453996c 100644 --- a/common/openpgp-misc.c +++ b/common/openpgp-misc.c @@ -24,12 +24,13 @@ #include "openpgpdefs.h" /* - * Parse the key (pubkey or seckey), and return real version of the - * key; That is, for Ed448/X448, return key with prefix removed. + * Convert from OpenPGP-format with possible prefix, return + * libgcrypt-format of the key; That is, for Ed448/X448, return key + * with prefix removed, if any. */ gcry_mpi_t -openpgp_ecc_parse_key (pubkey_algo_t pkalgo, const char *curve, - gcry_mpi_t key) +openpgp_to_libgcrypt (pubkey_algo_t pkalgo, const char *curve, + gcry_mpi_t key) { unsigned int nbits = 0; unsigned char *buf = NULL; @@ -53,10 +54,11 @@ openpgp_ecc_parse_key (pubkey_algo_t pkalgo, const char *curve, /* - * Fix up public/sec key for OpenPGP adding the prefix. + * Convert from libgcrypt-format with no-prefix, return OpenPGP-format + * of the key; That is, for Ed448/X448, return key with prefix added. */ gpg_error_t -openpgp_fixup_key_448 (int algo, gcry_mpi_t *r_key) +openpgp_from_libgcrypt (int algo, gcry_mpi_t *r_key) { gcry_mpi_t key_mpi; gcry_mpi_t a; |