mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Clean up ECDH code path (5).
* g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Now, it's only for encrytion. (pk_ecdh_decrypt): Use prepare_ecdh_with_shared_point and move decrypt code path in original pk_ecdh_encrypt_with_shared_point here. * g10/pkglue.h (pk_ecdh_encrypt_with_shared_point): Change API. * g10/pkglue.c (pk_encrypt): Follow the change. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
64d93271bf
commit
510bda7d37
3 changed files with 141 additions and 122 deletions
|
@ -330,7 +330,7 @@ pk_encrypt (pubkey_algo_t algo, gcry_mpi_t *resarr, gcry_mpi_t data,
|
|||
if (fpn != 20)
|
||||
rc = gpg_error (GPG_ERR_INV_LENGTH);
|
||||
else
|
||||
rc = pk_ecdh_encrypt_with_shared_point (1 /*=encrypton*/, shared,
|
||||
rc = pk_ecdh_encrypt_with_shared_point (shared,
|
||||
fp, data, pkey, &result);
|
||||
gcry_mpi_release (shared);
|
||||
if (!rc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue