Home GnuPG
Diffusion GnuPG b203325ce112

gpg: Allow ECDH with a smartcard returning just the x-coordinate.

Description

gpg: Allow ECDH with a smartcard returning just the x-coordinate.

* g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Factor extraction
part out to  ...
(extract_secret_x): new.  Allow for x-only coordinate.
(pk_ecdh_encrypt_with_shared_point): Change arg shared_mpi
to (shared,nshared).  Move param check to the top.  Add extra safety
check.
(pk_ecdh_decrypt): Adjust for change.
* g10/pkglue.c (get_data_from_sexp): New.
(pk_encrypt): Use it for "s" and adjusted for changed
pk_ecdh_encrypt_with_shared_point.
* g10/pubkey-enc.c (get_it): Remove conversion to an MPI and call
pk_ecdh_decrypt with the frame buffer.

Backported-from-master: f129b0e97730b47d62482fba9599db39b526f3d2)

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

Details

Provenance
wernerAuthored on Tue, May 4, 11:51 AM
Parents
rGb410c95fe953: build: Silence two compiler warnings.
Branches
Unknown
Tags
Unknown