diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-06-28 15:36:10 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-06-28 16:58:43 +0200 |
commit | 09c8dfc78c278eacbb986c12a189826e94e68c22 (patch) | |
tree | 2a0c28ffdef22b86efac3ff9523aa9947c6be225 /openpgp/src/packet/pkesk.rs | |
parent | 20cae96915c9acd5e36c426e8ca3f0fc70b80693 (diff) |
openpgp: Rework protection of mpis::SecretKey.
- Introduce a new type, ProtectedMPI, that uses
crypto::mem::Protected for storing the MPI. Change
mpis::SecretKey to use this.
- Fixes #181.
Diffstat (limited to 'openpgp/src/packet/pkesk.rs')
-rw-r--r-- | openpgp/src/packet/pkesk.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openpgp/src/packet/pkesk.rs b/openpgp/src/packet/pkesk.rs index 012c940e..735908a4 100644 --- a/openpgp/src/packet/pkesk.rs +++ b/openpgp/src/packet/pkesk.rs @@ -355,7 +355,7 @@ mod tests { sym: SymmetricAlgorithm::AES256, }; let private_mpis = mpis::SecretKey::ECDH { - scalar: MPI::new(&sec[..]), + scalar: MPI::new(&sec[..]).into(), }; let mut key: Key = Key4::new(time::now().canonicalize(), PublicKeyAlgorithm::ECDH, |