mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
Merge branch 'feature/154-defaults' into develop
This commit is contained in:
commit
4d527cae4b
4 changed files with 30 additions and 6 deletions
|
|
@ -212,12 +212,6 @@ impl Identity for ProjectivePoint {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for ProjectivePoint {
|
||||
fn default() -> ProjectivePoint {
|
||||
ProjectivePoint::identity()
|
||||
}
|
||||
}
|
||||
|
||||
impl Identity for ProjectiveNielsPoint {
|
||||
fn identity() -> ProjectiveNielsPoint {
|
||||
ProjectiveNielsPoint{
|
||||
|
|
|
|||
|
|
@ -260,6 +260,12 @@ impl Identity for CompressedEdwardsY {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for CompressedEdwardsY {
|
||||
fn default() -> CompressedEdwardsY {
|
||||
CompressedEdwardsY::identity()
|
||||
}
|
||||
}
|
||||
|
||||
impl Identity for EdwardsPoint {
|
||||
fn identity() -> EdwardsPoint {
|
||||
EdwardsPoint{ X: FieldElement::zero(),
|
||||
|
|
@ -269,6 +275,12 @@ impl Identity for EdwardsPoint {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for EdwardsPoint {
|
||||
fn default() -> EdwardsPoint {
|
||||
EdwardsPoint::identity()
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Validity checks (for debugging, not CT)
|
||||
// ------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -155,6 +155,12 @@ impl Identity for ProjectivePoint {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for ProjectivePoint {
|
||||
fn default() -> ProjectivePoint {
|
||||
ProjectivePoint::identity()
|
||||
}
|
||||
}
|
||||
|
||||
impl ConditionallyAssignable for ProjectivePoint {
|
||||
fn conditional_assign(&mut self, that: &ProjectivePoint, choice: Choice) {
|
||||
self.U.conditional_assign(&that.U, choice);
|
||||
|
|
|
|||
|
|
@ -281,6 +281,12 @@ impl Identity for CompressedRistretto {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for CompressedRistretto {
|
||||
fn default() -> CompressedRistretto {
|
||||
CompressedRistretto::identity()
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Serde support
|
||||
// ------------------------------------------------------------------------
|
||||
|
|
@ -663,6 +669,12 @@ impl Identity for RistrettoPoint {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for RistrettoPoint {
|
||||
fn default() -> RistrettoPoint {
|
||||
RistrettoPoint::identity()
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Equality
|
||||
// ------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue