mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-06 20:41:14 +00:00
Merge branch 'release/1.0.3'
This commit is contained in:
commit
4bdccd7b7c
3 changed files with 14 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "curve25519-dalek"
|
name = "curve25519-dalek"
|
||||||
version = "1.0.2"
|
version = "1.0.3"
|
||||||
authors = ["Isis Lovecruft <isis@patternsinthevoid.net>",
|
authors = ["Isis Lovecruft <isis@patternsinthevoid.net>",
|
||||||
"Henry de Valence <hdevalence@hdevalence.ca>"]
|
"Henry de Valence <hdevalence@hdevalence.ca>"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,12 @@ use traits::VartimeMultiscalarMul;
|
||||||
#[derive(Copy, Clone, Eq, PartialEq)]
|
#[derive(Copy, Clone, Eq, PartialEq)]
|
||||||
pub struct CompressedEdwardsY(pub [u8; 32]);
|
pub struct CompressedEdwardsY(pub [u8; 32]);
|
||||||
|
|
||||||
|
impl ConstantTimeEq for CompressedEdwardsY {
|
||||||
|
fn ct_eq(&self, other: &CompressedEdwardsY) -> Choice {
|
||||||
|
self.as_bytes().ct_eq(other.as_bytes())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Debug for CompressedEdwardsY {
|
impl Debug for CompressedEdwardsY {
|
||||||
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
|
||||||
write!(f, "CompressedEdwardsY: {:?}", self.as_bytes())
|
write!(f, "CompressedEdwardsY: {:?}", self.as_bytes())
|
||||||
|
|
@ -377,9 +383,7 @@ impl ConditionallySelectable for EdwardsPoint {
|
||||||
|
|
||||||
impl ConstantTimeEq for EdwardsPoint {
|
impl ConstantTimeEq for EdwardsPoint {
|
||||||
fn ct_eq(&self, other: &EdwardsPoint) -> Choice {
|
fn ct_eq(&self, other: &EdwardsPoint) -> Choice {
|
||||||
self.compress()
|
self.compress().ct_eq(&other.compress())
|
||||||
.as_bytes()
|
|
||||||
.ct_eq(other.compress().as_bytes())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,12 @@ use traits::{MultiscalarMul, VartimeMultiscalarMul};
|
||||||
#[derive(Copy, Clone, Eq, PartialEq)]
|
#[derive(Copy, Clone, Eq, PartialEq)]
|
||||||
pub struct CompressedRistretto(pub [u8; 32]);
|
pub struct CompressedRistretto(pub [u8; 32]);
|
||||||
|
|
||||||
|
impl ConstantTimeEq for CompressedRistretto {
|
||||||
|
fn ct_eq(&self, other: &CompressedRistretto) -> Choice {
|
||||||
|
self.as_bytes().ct_eq(other.as_bytes())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl CompressedRistretto {
|
impl CompressedRistretto {
|
||||||
/// Copy the bytes of this `CompressedRistretto`.
|
/// Copy the bytes of this `CompressedRistretto`.
|
||||||
pub fn to_bytes(&self) -> [u8; 32] {
|
pub fn to_bytes(&self) -> [u8; 32] {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue