pubkey: Move sexp parsing for gcry_pk_decrypt to the modules.
authorWerner Koch <wk@gnupg.org>
Fri, 11 Oct 2013 19:13:12 +0000 (21:13 +0200)
committerWerner Koch <wk@gnupg.org>
Fri, 11 Oct 2013 19:13:12 +0000 (21:13 +0200)
commit07950c865a901afc48acb46f0695040cadfd5068
treed608acf3116831d6a8874caa4686efcd44f87b9e
parent6bd5d18c45a4a3ce8f0f66f56c83b80594877f53
pubkey: Move sexp parsing for gcry_pk_decrypt to the modules.

* cipher/rsa.c (rsa_decrypt): Revamp.
* cipher/elgamal.c (elg_decrypt): Revamp.
* cipher/ecc.c (ecc_decrypt_raw): Revamp.
* cipher/pubkey.c (gcry_pk_decrypt): Simplify.
(sexp_to_enc): Remove.
* cipher/pubkey-util.c (_gcry_pk_util_preparse_encval): New.
--

Note that we do not have a regression test for ecc_decrypt_raw.  Even
GnuPG does not use it.  we also better check whether the interface is
really usable; for example GnuPG implements way to much low-level ECC
code.  Maybe we should move the OpenPGP ECC encryption code into
Libgcrypt.

Signed-off-by: Werner Koch <wk@gnupg.org>
cipher/ecc.c
cipher/elgamal.c
cipher/pubkey-internal.h
cipher/pubkey-util.c
cipher/pubkey.c
cipher/rsa.c
src/cipher-proto.h