From 31490ab90ca3f139c0442fa0e47e7a3da419ab46 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Mon, 3 Aug 2020 20:36:17 -0700 Subject: [PATCH] elliptic-curve: derive Clone on SecretKey SecretKey is auto-zeroizing. While cloning it isn't ideal, we have a strategy for automatically cleaning up afterward. --- elliptic-curve/src/secret_key.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/elliptic-curve/src/secret_key.rs b/elliptic-curve/src/secret_key.rs index d431cf2f0..cb613d884 100644 --- a/elliptic-curve/src/secret_key.rs +++ b/elliptic-curve/src/secret_key.rs @@ -26,6 +26,7 @@ use { /// This type wraps a serialized scalar value, helping to prevent accidental /// exposure and securely erasing the value from memory when dropped /// (when the `zeroize` feature of this crate is enabled). +#[derive(Clone)] pub struct SecretKey { /// Private scalar value scalar: ScalarBytes,