Merge remote-tracking branch 'hdevalence/feature/derive-eq-partialeq-compressededwardsy' into develop

This commit is contained in:
Isis Lovecruft 2017-02-20 02:14:37 +00:00
commit 57884ecefa
Failed to extract signature

View file

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