Struct curve25519_dalek::curve::CompressedPoint
[−]
[src]
pub struct CompressedPoint(pub [u8; 32]);
An affine point (x,y)
on the curve is determined by the
y
-coordinate and the sign of x
, marshalled into a 32-byte array.
The first 255 bits of a CompressedPoint represent the
y-coordinate. The high bit of the 32nd byte gives the sign of x
.
Methods
impl CompressedPoint
[src]
fn to_bytes(&self) -> [u8; 32]
View this CompressedPoint
as an array of bytes.
fn decompress(&self) -> Option<ExtendedPoint>
Attempt to decompress to an ExtendedPoint
.
Warning
This function will fail and return None if both vx²-u=0 and vx²+u=0.
Trait Implementations
impl Copy for CompressedPoint
[src]
impl Clone for CompressedPoint
[src]
fn clone(&self) -> CompressedPoint
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for CompressedPoint
[src]
impl Eq for CompressedPoint
[src]
impl PartialEq for CompressedPoint
[src]
fn eq(&self, other: &CompressedPoint) -> bool
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.