mirror of
https://github.com/saymrwulf/betrusted-curve25519-dalek-source.git
synced 2026-09-05 20:30:54 +00:00
impl Identity for MontgomeryPoint
This commit is contained in:
parent
93538aab36
commit
ea8bb3a6e4
1 changed files with 7 additions and 0 deletions
|
|
@ -98,6 +98,13 @@ impl PartialEq for MontgomeryPoint {
|
|||
|
||||
impl Eq for MontgomeryPoint {}
|
||||
|
||||
impl Identity for MontgomeryPoint {
|
||||
/// Return the group identity element, which has order 4.
|
||||
fn identity() -> MontgomeryPoint {
|
||||
MontgomeryPoint([0u8; 32])
|
||||
}
|
||||
}
|
||||
|
||||
impl Zeroize for MontgomeryPoint {
|
||||
fn zeroize(&mut self) {
|
||||
self.0.zeroize();
|
||||
|
|
|
|||
Loading…
Reference in a new issue