From 07950c865a901afc48acb46f0695040cadfd5068 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 11 Oct 2013 21:13:12 +0200 Subject: 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 --- cipher/pubkey.c | 265 ++------------------------------------------------------ 1 file changed, 5 insertions(+), 260 deletions(-) (limited to 'cipher/pubkey.c') diff --git a/cipher/pubkey.c b/cipher/pubkey.c index 8a46e4e5..d7a474d8 100644 --- a/cipher/pubkey.c +++ b/cipher/pubkey.c @@ -693,213 +693,6 @@ get_hash_algo (const char *s, size_t n) } -/**************** - * Take sexp and return an array of MPI as used for our internal decrypt - * function. - * s_data = (enc-val - * [(flags [raw, pkcs1, oaep, no-blinding])] - * [(hash-algo )] - * [(label