Struct curve25519_dalek::edwards::CompressedEdwardsY [−][src]
In "Edwards y" / "Ed25519" format, the curve point \((x,y)\) is determined by the \(y\)-coordinate and the sign of \(x\).
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]
impl CompressedEdwardsY
pub fn as_bytes(&self) -> &[u8; 32]
[src]
pub fn as_bytes(&self) -> &[u8; 32]
View this CompressedEdwardsY
as an array of bytes.
pub fn to_bytes(&self) -> [u8; 32]
[src]
pub fn to_bytes(&self) -> [u8; 32]
Copy this CompressedEdwardsY
to an array of bytes.
pub fn decompress(&self) -> Option<EdwardsPoint>
[src]
pub fn decompress(&self) -> Option<EdwardsPoint>
Attempt to decompress to an EdwardsPoint
.
Returns None
if the input is not the \(y\)-coordinate of a
curve point.
Trait Implementations
impl Copy for CompressedEdwardsY
[src]
impl Copy for CompressedEdwardsY
impl Clone for CompressedEdwardsY
[src]
impl Clone for CompressedEdwardsY
fn clone(&self) -> CompressedEdwardsY
[src]
fn clone(&self) -> CompressedEdwardsY
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Eq for CompressedEdwardsY
[src]
impl Eq for CompressedEdwardsY
impl PartialEq for CompressedEdwardsY
[src]
impl PartialEq for CompressedEdwardsY
fn eq(&self, other: &CompressedEdwardsY) -> bool
[src]
fn eq(&self, other: &CompressedEdwardsY) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &CompressedEdwardsY) -> bool
[src]
fn ne(&self, other: &CompressedEdwardsY) -> bool
This method tests for !=
.
impl Debug for CompressedEdwardsY
[src]
impl Debug for CompressedEdwardsY
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Identity for CompressedEdwardsY
[src]
impl Identity for CompressedEdwardsY
fn identity() -> CompressedEdwardsY
[src]
fn identity() -> CompressedEdwardsY
Returns the identity element of the curve. Can be used as a constructor. Read more
impl Default for CompressedEdwardsY
[src]
impl Default for CompressedEdwardsY
fn default() -> CompressedEdwardsY
[src]
fn default() -> CompressedEdwardsY
Returns the "default value" for a type. Read more
Auto Trait Implementations
impl Send for CompressedEdwardsY
impl Send for CompressedEdwardsY
impl Sync for CompressedEdwardsY
impl Sync for CompressedEdwardsY