1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

common: New module to compute openpgp fingerprints

* common/openpgp-fpr.c: New.
* common/Makefile.am (common_sources): Add it.
--

This function is targeted to handle keys on smartcards.

Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit 2f2bdd9c08)
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2021-04-16 12:39:24 +02:00
parent c825117c5f
commit f3c98b8cb5
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 306 additions and 0 deletions

View file

@ -205,4 +205,26 @@ compress_algo_t;
#define OPENPGP_MAX_NENC 2 /* Maximum number of encryption parameters. */
/*-- openpgp-fpr.c --*/
gpg_error_t compute_openpgp_fpr (int keyversion, int pgpalgo,
unsigned long timestamp,
gcry_buffer_t *iov, int iovcnt,
unsigned char *result,
unsigned int *r_resultlen);
gpg_error_t compute_openpgp_fpr_rsa (int keyversion,
unsigned long timestamp,
const unsigned char *m, unsigned int mlen,
const unsigned char *e, unsigned int elen,
unsigned char *result,
unsigned int *r_resultlen);
gpg_error_t compute_openpgp_fpr_ecc (int keyversion,
unsigned long timestamp,
const char *curvename, int for_encryption,
const unsigned char *q, unsigned int qlen,
const unsigned char *kdf,
unsigned int kdflen,
unsigned char *result,
unsigned int *r_resultlen);
#endif /*GNUPG_COMMON_OPENPGPDEFS_H*/