[−][src]Struct salty::CompressedY
"Compressed" form of a CurvePoint
, whereby
the sign of the x-coordinate is stuffed in a
spare bit of the y-coordinate
Methods
impl CompressedY
[src]
pub fn decompressed(&self) -> Result<CurvePoint>
[src]
This is rather tricky: to get the x-coordinate,
and not just its sign, need to calculate the square
root of u/v := (y**2 - 1)/(dy**2 + 1)
. Moreover, we want
to detect whether our compressed Y actually corresponds
to a point on the curve! The original sources are
the Tweet NaCl paper, section 5 and
the ed25519 paper, also section 5.
impl CompressedY
[src]
Trait Implementations
impl<'_> From<&'_ [u8; 32]> for CompressedY
[src]
fn from(bytes: &[u8; 32]) -> CompressedY
[src]
impl PartialEq<CompressedY> for CompressedY
[src]
impl Debug for CompressedY
[src]
impl Copy for CompressedY
[src]
impl Clone for CompressedY
[src]
fn clone(&self) -> CompressedY
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for CompressedY
[src]
fn default() -> CompressedY
[src]
impl ConstantTimeEq for CompressedY
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,