diff options
author | Werner Koch <wk@gnupg.org> | 2013-09-04 11:20:57 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2013-09-04 11:25:06 +0200 |
commit | c47d4001033f68212d2847b3074a0bdda990342e (patch) | |
tree | d0517bc1be1a9ca2d73320030983fcc3065e0720 /cipher/dsa.c | |
parent | c26be7a337d0bf98193bc58e043209e46d0769bb (diff) | |
download | libgcrypt-c47d4001033f68212d2847b3074a0bdda990342e.tar.gz |
Prepare support for EdDSA.
* src/cipher.h (PUBKEY_FLAG_EDDSA): New.
* cipher/pubkey.c (pubkey_verify): Repalce args CMP and OPAQUEV by
CTX. Pass flags and hash algo to the verify function. Change all
verify functions to accept these args.
(sexp_data_to_mpi): Implement new flag "eddsa".
(gcry_pk_verify): Pass CTX instead of the compare function to
pubkey_verify.
* cipher/ecc.c (sign): Rename to sign_ecdsa. Change all callers.
(verify): Rename to verify_ecdsa. Change all callers.
(sign_eddsa, verify_eddsa): New stub functions.
(ecc_sign): Divert to sign_ecdsa or sign_eddsa.
(ecc_verify): Divert to verify_ecdsa or verify_eddsa.
Diffstat (limited to 'cipher/dsa.c')
-rw-r--r-- | cipher/dsa.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cipher/dsa.c b/cipher/dsa.c index ac2dee15..3a64dda1 100644 --- a/cipher/dsa.c +++ b/cipher/dsa.c @@ -1004,7 +1004,8 @@ dsa_sign (int algo, gcry_mpi_t *resarr, gcry_mpi_t data, gcry_mpi_t *skey, static gcry_err_code_t dsa_verify (int algo, gcry_mpi_t hash, gcry_mpi_t *data, gcry_mpi_t *pkey, - int (*cmp) (void *, gcry_mpi_t), void *opaquev) + int (*cmp) (void *, gcry_mpi_t), void *opaquev, + int flags, int hashalgo) { gcry_err_code_t err = GPG_ERR_NO_ERROR; DSA_public_key pk; @@ -1012,6 +1013,8 @@ dsa_verify (int algo, gcry_mpi_t hash, gcry_mpi_t *data, gcry_mpi_t *pkey, (void)algo; (void)cmp; (void)opaquev; + (void)flags; + (void)hashalgo; if ((! data[0]) || (! data[1]) || (! hash) || (! pkey[0]) || (! pkey[1]) || (! pkey[2]) || (! pkey[3])) |