From 4bba214b2a90b333b8cf0cd4a1797091b8b167d4 Mon Sep 17 00:00:00 2001 From: Aaron Feickert <66188213+AaronFeickert@users.noreply.github.com> Date: Fri, 2 Aug 2024 17:04:16 -0500 Subject: [PATCH] Support zeroizing for `SubgroupPoint` --- 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 53ad4fef..2c87d79f 100644 --- a/curve25519-dalek/src/edwards.rs +++ b/curve25519-dalek/src/edwards.rs @@ -1524,6 +1524,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;