diff options
author | Werner Koch <[email protected]> | 2020-05-04 12:58:37 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2020-05-04 12:58:37 +0000 |
commit | d5051e31a8fc07c339253c6b82426e0d0115a20a (patch) | |
tree | 33906807ae246d60818a54388c6bb0e9d4e51d54 /sm/decrypt.c | |
parent | doc: Typo fixes in code comments (diff) | |
download | gnupg-d5051e31a8fc07c339253c6b82426e0d0115a20a.tar.gz gnupg-d5051e31a8fc07c339253c6b82426e0d0115a20a.zip |
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 <[email protected]>
Diffstat (limited to 'sm/decrypt.c')
-rw-r--r-- | sm/decrypt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sm/decrypt.c b/sm/decrypt.c index 0bde2e387..f9dc0376e 100644 --- a/sm/decrypt.c +++ b/sm/decrypt.c @@ -1,5 +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-2020 g10 Code GmbH * * This file is part of GnuPG. * @@ -15,6 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, see <https://www.gnu.org/licenses/>. + * SPDX-License-Identifier: GPL-3.0-or-later */ #include <config.h> @@ -75,7 +78,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) |