mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-05 20:30:57 +00:00
Implement Default for internal point types
This commit is contained in:
parent
9422804e13
commit
1d39d2ec6e
1 changed files with 18 additions and 0 deletions
|
|
@ -211,6 +211,12 @@ impl Identity for ProjectivePoint {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for ProjectivePoint {
|
||||||
|
fn default() -> ProjectivePoint {
|
||||||
|
ProjectivePoint::identity()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Identity for ProjectiveNielsPoint {
|
impl Identity for ProjectiveNielsPoint {
|
||||||
fn identity() -> ProjectiveNielsPoint {
|
fn identity() -> ProjectiveNielsPoint {
|
||||||
ProjectiveNielsPoint{
|
ProjectiveNielsPoint{
|
||||||
|
|
@ -222,6 +228,12 @@ impl Identity for ProjectiveNielsPoint {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for ProjectiveNielsPoint {
|
||||||
|
fn default() -> ProjectiveNielsPoint {
|
||||||
|
ProjectiveNielsPoint::identity()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Identity for AffineNielsPoint {
|
impl Identity for AffineNielsPoint {
|
||||||
fn identity() -> AffineNielsPoint {
|
fn identity() -> AffineNielsPoint {
|
||||||
AffineNielsPoint{
|
AffineNielsPoint{
|
||||||
|
|
@ -232,6 +244,12 @@ impl Identity for AffineNielsPoint {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for AffineNielsPoint {
|
||||||
|
fn default() -> AffineNielsPoint {
|
||||||
|
AffineNielsPoint::identity()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// Validity checks (for debugging, not CT)
|
// Validity checks (for debugging, not CT)
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue