pub struct CompressedEdwardsY(pub [u8; 57]);Expand description
Represents a point on the Compressed Twisted Edwards Curve in little endian format where the most significant bit is the sign bit and the remaining 448 bits represent the y-coordinate
Tuple Fields§
§0: [u8; 57]Implementations§
Source§impl CompressedEdwardsY
impl CompressedEdwardsY
Sourcepub fn decompress_unchecked(&self) -> CtOption<AffinePoint>
pub fn decompress_unchecked(&self) -> CtOption<AffinePoint>
Attempt to decompress to an AffinePoint.
Returns None if the input is not the \(y\)-coordinate of a
curve point.
Sourcepub fn decompress(&self) -> CtOption<AffinePoint>
pub fn decompress(&self) -> CtOption<AffinePoint>
Attempt to decompress to an AffinePoint.
Returns None:
- if the input is not the \(y\)-coordinate of a curve point.
- if the input point is not on the curve.
- if the input point has nonzero torsion component.
Trait Implementations§
Source§impl AsRef<[u8]> for CompressedEdwardsY
impl AsRef<[u8]> for CompressedEdwardsY
Source§impl Clone for CompressedEdwardsY
impl Clone for CompressedEdwardsY
Source§fn clone(&self) -> CompressedEdwardsY
fn clone(&self) -> CompressedEdwardsY
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ConditionallySelectable for CompressedEdwardsY
impl ConditionallySelectable for CompressedEdwardsY
Source§fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
Source§fn conditional_assign(&mut self, other: &Self, choice: Choice)
fn conditional_assign(&mut self, other: &Self, choice: Choice)
Source§fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
Conditionally swap
self and other if choice == 1; otherwise,
reassign both unto themselves. Read moreSource§impl ConstantTimeEq for CompressedEdwardsY
impl ConstantTimeEq for CompressedEdwardsY
Source§impl Debug for CompressedEdwardsY
impl Debug for CompressedEdwardsY
Source§impl Default for CompressedEdwardsY
impl Default for CompressedEdwardsY
Source§impl Display for CompressedEdwardsY
impl Display for CompressedEdwardsY
Source§impl From<&CompressedEdwardsY> for [u8; 57]
impl From<&CompressedEdwardsY> for [u8; 57]
Source§fn from(value: &CompressedEdwardsY) -> Self
fn from(value: &CompressedEdwardsY) -> Self
Converts to this type from the input type.
Source§impl From<&CompressedEdwardsY> for Vec<u8>
Available on crate feature alloc only.
impl From<&CompressedEdwardsY> for Vec<u8>
Available on crate feature
alloc only.Source§fn from(value: &CompressedEdwardsY) -> Self
fn from(value: &CompressedEdwardsY) -> Self
Converts to this type from the input type.
Source§impl From<CompressedEdwardsY> for [u8; 57]
impl From<CompressedEdwardsY> for [u8; 57]
Source§fn from(value: CompressedEdwardsY) -> Self
fn from(value: CompressedEdwardsY) -> Self
Converts to this type from the input type.
Source§impl From<CompressedEdwardsY> for Vec<u8>
Available on crate feature alloc only.
impl From<CompressedEdwardsY> for Vec<u8>
Available on crate feature
alloc only.Source§fn from(value: CompressedEdwardsY) -> Self
fn from(value: CompressedEdwardsY) -> Self
Converts to this type from the input type.
Source§impl LowerHex for CompressedEdwardsY
impl LowerHex for CompressedEdwardsY
Source§impl PartialEq for CompressedEdwardsY
impl PartialEq for CompressedEdwardsY
Source§impl TryFrom<&[u8]> for CompressedEdwardsY
impl TryFrom<&[u8]> for CompressedEdwardsY
Source§impl UpperHex for CompressedEdwardsY
impl UpperHex for CompressedEdwardsY
Source§impl Zeroize for CompressedEdwardsY
impl Zeroize for CompressedEdwardsY
impl Copy for CompressedEdwardsY
impl Eq for CompressedEdwardsY
Auto Trait Implementations§
impl Freeze for CompressedEdwardsY
impl RefUnwindSafe for CompressedEdwardsY
impl Send for CompressedEdwardsY
impl Sync for CompressedEdwardsY
impl Unpin for CompressedEdwardsY
impl UnsafeUnpin for CompressedEdwardsY
impl UnwindSafe for CompressedEdwardsY
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more