impl Identity for MontgomeryPoint

This commit is contained in:
nworbnhoj 2022-03-09 20:17:35 +11:00 committed by GitHub
parent 93538aab36
commit ea8bb3a6e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();