mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-05 20:30:57 +00:00
Merge remote-tracking branch 'gedigi/zeroize_ristrettopoint' into develop
This commit is contained in:
commit
da0c49985c
1 changed files with 21 additions and 0 deletions
|
|
@ -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
|
||||
// ------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue