Home GnuPG
Diffusion GnuPG 5ae2632002c0

gpgsm: Support decryption of ECDH data

Description

gpgsm: Support decryption of ECDH data

* sm/decrypt.c (hash_ecc_cms_shared_info): New.
(ecdh_derive_kek): New global function.
(ecdh_decrypt): New with support for
dhSinglePass-stdDH-sha1kdf-scheme.
(prepare_decryption): Support ECDH.  Add args pk_algo and nbits.
(gpgsm_decrypt): Pass size of curve to prepare_decryption.  Lift some
variables from an inner code block.

This has been compiled from these commits in master:
Backported-from-master: 95d83cf906177fe9f00e88ae42d4c118c7db4371
(sm: Support decryption of ECDH data)
Backported-from-master: ee6d29f1797e06977ae3d2edae9edc1165c6f144
(sm: Support decryption of ECDH data using a smartcard.)
Backported-from-master: 68b857df13c8a4e6cae5e3a29fd065bf90764547
(sm: Allow decryption using dhSinglePass-stdDH-sha1kdf-scheme.)

  • GnuPG-bug-id: T6253
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Oct 20 2022, 3:35 PM
Parents
rG37a853d808f0: gpgsm: Support key generation with ECC.
Branches
Unknown
Tags
Unknown
Tasks
T6253: GpgSM: Backport ECC support to 2.2