Struct curve25519_dalek::curve::CompressedEdwardsY
[−]
[src]
pub struct CompressedEdwardsY(pub [u8; 32]);
In "Edwards y" format, the 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 CompressedEdwardsY represent the
y-coordinate. The high bit of the 32nd byte gives the sign of x
.
Methods
impl CompressedEdwardsY
[src]
fn as_bytes<'a>(&'a self) -> &'a [u8; 32]
View this CompressedEdwardsY
as an array of bytes.
fn to_bytes(&self) -> [u8; 32]
Copy this CompressedEdwardsY
to an array of bytes.
XXX is this useful?
fn decompress(&self) -> Option<ExtendedPoint>
Attempt to decompress to an ExtendedPoint
.
Returns None
if the input is not the y
-coordinate of a
curve point.
Trait Implementations
impl Copy for CompressedEdwardsY
[src]
impl Clone for CompressedEdwardsY
[src]
fn clone(&self) -> CompressedEdwardsY
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 Eq for CompressedEdwardsY
[src]
impl PartialEq for CompressedEdwardsY
[src]
fn eq(&self, __arg_0: &CompressedEdwardsY) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &CompressedEdwardsY) -> bool
This method tests for !=
.
impl Debug for CompressedEdwardsY
[src]
impl Identity for CompressedEdwardsY
[src]
fn identity() -> CompressedEdwardsY
Returns the identity element of the curve. Can be used as a constructor. Read more