From 868d614020213b487e6e6169fb464765725b290d Mon Sep 17 00:00:00 2001 From: Aaron Feickert <66188213+AaronFeickert@users.noreply.github.com> Date: Sun, 19 Jan 2025 10:54:30 -0600 Subject: [PATCH] Support zeroizing for `SubgroupPoint` (#682) --- curve25519-dalek/src/edwards.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/curve25519-dalek/src/edwards.rs b/curve25519-dalek/src/edwards.rs index 811764b..d6672bd 100644 --- a/curve25519-dalek/src/edwards.rs +++ b/curve25519-dalek/src/edwards.rs @@ -1532,6 +1532,13 @@ impl ConditionallySelectable for SubgroupPoint { } } +#[cfg(all(feature = "group", feature = "zeroize"))] +impl Zeroize for SubgroupPoint { + fn zeroize(&mut self) { + self.0.zeroize(); + } +} + #[cfg(feature = "group")] impl group::Group for SubgroupPoint { type Scalar = Scalar;