mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
sm: Support encryption using ECDH keys.
* sm/decrypt.c (hash_ecc_cms_shared_info): Make global.
* sm/encrypt.c (ecdh_encrypt): New.
(encrypt_dek): Add arg PK_ALGO and support ECDH.
(gpgsm_encrypt): Pass PK_ALGO.
--
Note: This has only been tested with a messages created and decrypted
by GnuPG.
GnuPG-bug-id: 4098
Signed-off-by: Werner Koch <wk@gnupg.org>
Backported-from-master: d5051e31a8
GnuPG-bug-id: 6253
This commit is contained in:
parent
d770715e15
commit
28467f3735
3 changed files with 313 additions and 17 deletions
|
@ -1,7 +1,7 @@
|
|||
/* decrypt.c - Decrypt a message
|
||||
* Copyright (C) 2001, 2003, 2010 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2001-2019 Werner Koch
|
||||
* Copyright (C) 2015-2021 g10 Code GmbH
|
||||
* Copyright (C) 2015-2020 g10 Code GmbH
|
||||
*
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
|
@ -88,7 +88,7 @@ string_from_gcry_buffer (gcry_buffer_t *buffer)
|
|||
* entityUInfo [0] EXPLICIT OCTET STRING OPTIONAL,
|
||||
* suppPubInfo [2] EXPLICIT OCTET STRING }
|
||||
* as described in RFC-5753, 7.2. */
|
||||
static gpg_error_t
|
||||
gpg_error_t
|
||||
hash_ecc_cms_shared_info (gcry_md_hd_t hash_hd, const char *wrap_algo_str,
|
||||
unsigned int keylen,
|
||||
const void *ukm, unsigned int ukmlen)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue