[−][src]Struct zerocaf::ristretto::RistrettoPoint
Methods
impl RistrettoPoint
[src][−]
pub fn compress(&self) -> CompressedRistretto
[src][−]
Encode a Ristretto point represented by the point (X:Y:Z:T)
in extended coordinates.
pub fn elligator_ristretto_flavor(r_0: &FieldElement) -> RistrettoPoint
[src][−]
Computes the Ristretto Elligator map.
This gets a RistrettoPoint
from a given
`FieldElement´.
pub fn from_uniform_bytes(bytes: &[u8; 64]) -> RistrettoPoint
[src][−]
Construct a RistrettoPoint
from 64 bytes of data.
If the input bytes are uniformly distributed, the resulting point will be uniformly distributed over the group, and its discrete log with respect to other points should be unknown.
Implementation
This function splits the input array into two 32-byte halves, takes the low 255 bits of each half mod p, applies the Ristretto-flavored Elligator map to each, and adds the results.
This function is taken from the Ristretto255 implementation found in curve25519-dalek
pub fn new_random_point<T: Rng + CryptoRng>(rand: &mut T) -> RistrettoPoint
[src][−]
Generate a random RistrettoPoint
from a 64-byte array generated
with user-provided rng.
The provided rng
has to implement: Rng
+ CryptoRng
.
This function uses the elligator hash map twice, once for [0..31] & another for [32..64] giving a uniformly distributed random value.
This implementation follows the idea pointed on the random point generation used in curve25519-dalek.
Trait Implementations
impl<'a, 'b> Add<&'a RistrettoPoint> for &'b RistrettoPoint
[src][+]
impl Add<RistrettoPoint> for RistrettoPoint
[src][+]
impl Clone for RistrettoPoint
[src][+]
impl ConstantTimeEq for RistrettoPoint
[src][+]
impl Copy for RistrettoPoint
[src]
impl Debug for RistrettoPoint
[src][+]
impl Default for RistrettoPoint
[src][+]
impl<'a> Double for &'a RistrettoPoint
[src][+]
impl Eq for RistrettoPoint
[src]
impl Identity for RistrettoPoint
[src][+]
impl<'a, 'b> Mul<&'b RistrettoPoint> for &'a Scalar
[src][+]
impl<'a, 'b> Mul<&'b Scalar> for &'a RistrettoPoint
[src][+]
impl Mul<RistrettoPoint> for Scalar
[src][+]
impl Mul<Scalar> for RistrettoPoint
[src][+]
impl<'a> Neg for &'a RistrettoPoint
[src][+]
impl Neg for RistrettoPoint
[src][+]
impl PartialEq<RistrettoPoint> for RistrettoPoint
[src][+]
impl<'a, 'b> Sub<&'a RistrettoPoint> for &'b RistrettoPoint
[src][+]
impl Sub<RistrettoPoint> for RistrettoPoint
[src][+]
impl ValidityCheck for RistrettoPoint
[src][+]
Auto Trait Implementations
impl RefUnwindSafe for RistrettoPoint
impl Send for RistrettoPoint
impl Sync for RistrettoPoint
impl Unpin for RistrettoPoint
impl UnwindSafe for RistrettoPoint
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
[+]
T: InitializableFromZeroed + ?Sized,
impl<T> From<T> for T
[src][+]
impl<T> InitializableFromZeroed for T where
T: Default,
[+]
T: Default,
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[+]
V: MultiLane<T>,