mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-06 20:41:14 +00:00
implemented Zeroize for CompressedRistretto and RistrettoPoint
This commit is contained in:
parent
805cdbfd3c
commit
c9fe6c5533
1 changed files with 21 additions and 0 deletions
|
|
@ -200,6 +200,8 @@ use backend::serial::scalar_mul;
|
||||||
))]
|
))]
|
||||||
use backend::vector::scalar_mul;
|
use backend::vector::scalar_mul;
|
||||||
|
|
||||||
|
use zeroize::Zeroize;
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// Compressed points
|
// 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
|
// Tests
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue