Merge remote-tracking branch 'gedigi/zeroize_ristrettopoint' into develop

This commit is contained in:
Isis Lovecruft 2021-03-24 18:12:22 +00:00
commit da0c49985c
No known key found for this signature in database
GPG key ID: AB41313533E8E812

View file

@ -200,6 +200,8 @@ use backend::serial::scalar_mul;
))]
use backend::vector::scalar_mul;
use zeroize::Zeroize;
// ------------------------------------------------------------------------
// Compressed points
// ------------------------------------------------------------------------
@ -1078,6 +1080,25 @@ impl Debug for RistrettoPoint {
}
}
// ------------------------------------------------------------------------
// Zeroize traits
// ------------------------------------------------------------------------
impl Zeroize for CompressedRistretto {
fn zeroize(&mut self) {
self.0.zeroize();
}
}
impl Zeroize for RistrettoPoint {
fn zeroize(&mut self) {
self.0.X.zeroize();
self.0.Y.zeroize();
self.0.Z.zeroize();
self.0.T.zeroize();
}
}
// ------------------------------------------------------------------------
// Tests
// ------------------------------------------------------------------------