Home GnuPG

Add hack to allow using an "ecc" key for "ecdsa" or "ecdh".
af8a79aea802Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Add hack to allow using an "ecc" key for "ecdsa" or "ecdh".

* cipher/pubkey.c (sexp_to_key): Add optional arg USE.
(gcry_pk_encrypt, gcry_pk_decrypt): Call sexp_to_key with usage sign.
(gcry_pk_sign, gcry_pk_verify): Call sexp_to_key with usage encrypt.
* tests/basic.c (show_sexp): New.
(check_pubkey_sign): Print test number and add cases for ecc.
(check_pubkey_sign_ecdsa): New.
(do_check_one_pubkey): Divert to new function.

The problem we try to address is that in the mdoule specs both, ECDSA
and ECDH have the same alias name "ecc". This patch allows to use for
example gcry_pk_verify with a key that has only "ecc" in it.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Apr 12 2013, 12:16 AM
Parents
rC1f3cfad66456: Add gcry_pubkey_get_sexp.
Branches
Unknown
Tags
Unknown

Event Timeline