Struct curve25519_dalek::edwards::CompressedEdwardsY
source · [−]Expand description
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\).
Tuple Fields
0: [u8; 32]
Implementations
sourceimpl CompressedEdwardsY
impl CompressedEdwardsY
sourcepub fn decompress(&self) -> Option<EdwardsPoint>
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.
sourceimpl CompressedEdwardsY
impl CompressedEdwardsY
sourcepub fn from_slice(bytes: &[u8]) -> CompressedEdwardsY
pub fn from_slice(bytes: &[u8]) -> CompressedEdwardsY
Construct a CompressedEdwardsY
from a slice of bytes.
Panics
If the input bytes
slice does not have a length of 32.
Trait Implementations
sourceimpl Clone for CompressedEdwardsY
impl Clone for CompressedEdwardsY
sourcefn clone(&self) -> CompressedEdwardsY
fn clone(&self) -> CompressedEdwardsY
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl ConstantTimeEq for CompressedEdwardsY
impl ConstantTimeEq for CompressedEdwardsY
sourcefn ct_eq(&self, other: &CompressedEdwardsY) -> Choice
fn ct_eq(&self, other: &CompressedEdwardsY) -> Choice
Determine if two items are equal. Read more
sourceimpl Debug for CompressedEdwardsY
impl Debug for CompressedEdwardsY
sourceimpl Default for CompressedEdwardsY
impl Default for CompressedEdwardsY
sourcefn default() -> CompressedEdwardsY
fn default() -> CompressedEdwardsY
Returns the “default value” for a type. Read more
sourceimpl Hash for CompressedEdwardsY
impl Hash for CompressedEdwardsY
sourceimpl Identity for CompressedEdwardsY
impl Identity for CompressedEdwardsY
sourcefn identity() -> CompressedEdwardsY
fn identity() -> CompressedEdwardsY
Returns the identity element of the curve. Can be used as a constructor. Read more
sourceimpl PartialEq<CompressedEdwardsY> for CompressedEdwardsY
impl PartialEq<CompressedEdwardsY> for CompressedEdwardsY
sourcefn eq(&self, other: &CompressedEdwardsY) -> bool
fn eq(&self, other: &CompressedEdwardsY) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CompressedEdwardsY) -> bool
fn ne(&self, other: &CompressedEdwardsY) -> bool
This method tests for !=
.
sourceimpl Zeroize for CompressedEdwardsY
impl Zeroize for CompressedEdwardsY
impl Copy for CompressedEdwardsY
impl Eq for CompressedEdwardsY
impl StructuralEq for CompressedEdwardsY
impl StructuralPartialEq for CompressedEdwardsY
Auto Trait Implementations
impl RefUnwindSafe for CompressedEdwardsY
impl Send for CompressedEdwardsY
impl Sync for CompressedEdwardsY
impl Unpin for CompressedEdwardsY
impl UnwindSafe for CompressedEdwardsY
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IsIdentity for T where
T: ConstantTimeEq + Identity,
impl<T> IsIdentity for T where
T: ConstantTimeEq + Identity,
sourcefn is_identity(&self) -> bool
fn is_identity(&self) -> bool
Return true if this element is the identity element of the curve.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more