mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
Merge remote-tracking branch 'hdevalence/feature/derive-eq-partialeq-compressededwardsy' into develop
This commit is contained in:
commit
57884ecefa
1 changed files with 1 additions and 13 deletions
14
src/curve.rs
14
src/curve.rs
|
|
@ -98,7 +98,7 @@ use util::CTAssignable;
|
|||
///
|
||||
/// The first 255 bits of a CompressedEdwardsY represent the
|
||||
/// y-coordinate. The high bit of the 32nd byte gives the sign of `x`.
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq)]
|
||||
pub struct CompressedEdwardsY(pub [u8; 32]);
|
||||
|
||||
impl Debug for CompressedEdwardsY {
|
||||
|
|
@ -107,18 +107,6 @@ impl Debug for CompressedEdwardsY {
|
|||
}
|
||||
}
|
||||
|
||||
impl Eq for CompressedEdwardsY {}
|
||||
impl PartialEq for CompressedEdwardsY {
|
||||
/// Determine if this `CompressedEdwardsY` is equal to another.
|
||||
///
|
||||
/// # Warning
|
||||
///
|
||||
/// This function is NOT constant time.
|
||||
fn eq(&self, other: &CompressedEdwardsY) -> bool {
|
||||
return self.0 == other.0;
|
||||
}
|
||||
}
|
||||
|
||||
impl Index<usize> for CompressedEdwardsY {
|
||||
type Output = u8;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue