From f031c7ae99ee0439f83259466d83d83eca912a14 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Mon, 24 Jun 2019 14:59:17 +0200 Subject: openpgp: Use SessionKey to protect secrets during ECDH. --- openpgp/src/crypto/asymmetric.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'openpgp/src/crypto/asymmetric.rs') diff --git a/openpgp/src/crypto/asymmetric.rs b/openpgp/src/crypto/asymmetric.rs index 6857d231..a3b55aaf 100644 --- a/openpgp/src/crypto/asymmetric.rs +++ b/openpgp/src/crypto/asymmetric.rs @@ -224,6 +224,7 @@ impl Decryptor for KeyPair { &q.value, Option::None)?; let mut rand = Yarrow::default(); rsa::decrypt_pkcs1(&public, &secret, &mut rand, &c.value)? + .into() } (PublicKey::Elgamal{ .. }, @@ -243,7 +244,7 @@ impl Decryptor for KeyPair { "unsupported combination of key pair {:?}/{:?} \ and ciphertext {:?}", public, secret, ciphertext)).into()), - }.into()) + }) } } -- cgit v1.2.3