Struct noah_api::ristretto::RistrettoPoint
source · pub struct RistrettoPoint(pub RistrettoPoint);Expand description
The wrapped struct for curve25519_dalek::ristretto::RistrettoPoint
Tuple Fields§
§0: RistrettoPointImplementations§
source§impl RistrettoPoint
impl RistrettoPoint
sourcepub fn compress(&self) -> CompressedRistretto
pub fn compress(&self) -> CompressedRistretto
Compress the point and output CompressedRistretto
Trait Implementations§
source§impl<'a> Add<&'a RistrettoPoint> for RistrettoPoint
impl<'a> Add<&'a RistrettoPoint> for RistrettoPoint
§type Output = RistrettoPoint
type Output = RistrettoPoint
The resulting type after applying the
+ operator.source§fn add(
self,
rhs: &RistrettoPoint
) -> <RistrettoPoint as Add<&'a RistrettoPoint>>::Output
fn add(
self,
rhs: &RistrettoPoint
) -> <RistrettoPoint as Add<&'a RistrettoPoint>>::Output
Performs the
+ operation. Read moresource§impl<'a> AddAssign<&'a RistrettoPoint> for RistrettoPoint
impl<'a> AddAssign<&'a RistrettoPoint> for RistrettoPoint
source§fn add_assign(&mut self, rhs: &RistrettoPoint)
fn add_assign(&mut self, rhs: &RistrettoPoint)
Performs the
+= operation. Read moresource§impl Clone for RistrettoPoint
impl Clone for RistrettoPoint
source§fn clone(&self) -> RistrettoPoint
fn clone(&self) -> RistrettoPoint
Returns a copy 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 Debug for RistrettoPoint
impl Debug for RistrettoPoint
source§impl Default for RistrettoPoint
impl Default for RistrettoPoint
source§fn default() -> RistrettoPoint
fn default() -> RistrettoPoint
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for RistrettoPoint
impl<'de> Deserialize<'de> for RistrettoPoint
source§fn deserialize<D>(
deserializer: D
) -> Result<RistrettoPoint, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<RistrettoPoint, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Group for RistrettoPoint
impl Group for RistrettoPoint
§type ScalarType = RistrettoScalar
type ScalarType = RistrettoScalar
The scalar type
source§const COMPRESSED_LEN: usize = 32usize
const COMPRESSED_LEN: usize = 32usize
The number of bytes for a compressed representation of a group element
source§fn double(&self) -> RistrettoPoint
fn double(&self) -> RistrettoPoint
Return the doubling of the group element
source§fn get_identity() -> RistrettoPoint
fn get_identity() -> RistrettoPoint
Return the identity element (i.e., 0 * G)
source§fn get_base() -> RistrettoPoint
fn get_base() -> RistrettoPoint
Return the base element (i.e., 1 * G)
source§fn random<R>(rng: &mut R) -> RistrettoPointwhere
R: CryptoRng + RngCore,
fn random<R>(rng: &mut R) -> RistrettoPointwhere
R: CryptoRng + RngCore,
Return a random element
source§fn to_compressed_bytes(&self) -> Vec<u8, Global>
fn to_compressed_bytes(&self) -> Vec<u8, Global>
Convert to bytes in the compressed representation
source§fn to_unchecked_bytes(&self) -> Vec<u8, Global>
fn to_unchecked_bytes(&self) -> Vec<u8, Global>
Convert to bytes in the unchecked representation
source§fn from_compressed_bytes(
bytes: &[u8]
) -> Result<RistrettoPoint, Box<dyn RucError + 'static, Global>>
fn from_compressed_bytes(
bytes: &[u8]
) -> Result<RistrettoPoint, Box<dyn RucError + 'static, Global>>
Convert from bytes in the compressed representation
source§fn from_unchecked_bytes(
bytes: &[u8]
) -> Result<RistrettoPoint, Box<dyn RucError + 'static, Global>>
fn from_unchecked_bytes(
bytes: &[u8]
) -> Result<RistrettoPoint, Box<dyn RucError + 'static, Global>>
Convert from bytes in the unchecked representation
source§fn unchecked_size() -> usize
fn unchecked_size() -> usize
Return the size of unchecked bytes.
source§fn from_hash<D>(hash: D) -> RistrettoPointwhere
D: Digest<OutputSize = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>> + Default,
fn from_hash<D>(hash: D) -> RistrettoPointwhere
D: Digest<OutputSize = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>> + Default,
Sample a group element based on a hash value
source§fn multi_exp(scalars: &[&Self::ScalarType], points: &[&Self]) -> Self
fn multi_exp(scalars: &[&Self::ScalarType], points: &[&Self]) -> Self
Compute the multiscalar multiplication
source§impl<'a> Mul<&'a RistrettoScalar> for RistrettoPoint
impl<'a> Mul<&'a RistrettoScalar> for RistrettoPoint
§type Output = RistrettoPoint
type Output = RistrettoPoint
The resulting type after applying the
* operator.source§fn mul(
self,
rhs: &RistrettoScalar
) -> <RistrettoPoint as Mul<&'a RistrettoScalar>>::Output
fn mul(
self,
rhs: &RistrettoScalar
) -> <RistrettoPoint as Mul<&'a RistrettoScalar>>::Output
Performs the
* operation. Read moresource§impl Neg for RistrettoPoint
impl Neg for RistrettoPoint
§type Output = RistrettoPoint
type Output = RistrettoPoint
The resulting type after applying the
- operator.source§impl NoahFromToBytes for RistrettoPoint
impl NoahFromToBytes for RistrettoPoint
source§fn noah_from_bytes(
bytes: &[u8]
) -> Result<RistrettoPoint, Box<dyn RucError + 'static, Global>>
fn noah_from_bytes(
bytes: &[u8]
) -> Result<RistrettoPoint, Box<dyn RucError + 'static, Global>>
reconstruct from bytes
source§impl PartialEq<RistrettoPoint> for RistrettoPoint
impl PartialEq<RistrettoPoint> for RistrettoPoint
source§fn eq(&self, other: &RistrettoPoint) -> bool
fn eq(&self, other: &RistrettoPoint) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PedersenCommitment<RistrettoPoint> for PedersenCommitmentRistretto
impl PedersenCommitment<RistrettoPoint> for PedersenCommitmentRistretto
source§fn generator(&self) -> RistrettoPoint
fn generator(&self) -> RistrettoPoint
Return the generator for the value part.
source§fn blinding_generator(&self) -> RistrettoPoint
fn blinding_generator(&self) -> RistrettoPoint
Return the generator for the blinding part.
source§fn commit(
&self,
value: RistrettoScalar,
blinding: RistrettoScalar
) -> RistrettoPoint
fn commit(
&self,
value: RistrettoScalar,
blinding: RistrettoScalar
) -> RistrettoPoint
Compute the Pedersen commitment over the Ristretto group.
source§impl Serialize for RistrettoPoint
impl Serialize for RistrettoPoint
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl<'a> Sub<&'a RistrettoPoint> for RistrettoPoint
impl<'a> Sub<&'a RistrettoPoint> for RistrettoPoint
§type Output = RistrettoPoint
type Output = RistrettoPoint
The resulting type after applying the
- operator.source§fn sub(
self,
rhs: &RistrettoPoint
) -> <RistrettoPoint as Sub<&'a RistrettoPoint>>::Output
fn sub(
self,
rhs: &RistrettoPoint
) -> <RistrettoPoint as Sub<&'a RistrettoPoint>>::Output
Performs the
- operation. Read moresource§impl<'a> SubAssign<&'a RistrettoPoint> for RistrettoPoint
impl<'a> SubAssign<&'a RistrettoPoint> for RistrettoPoint
source§fn sub_assign(&mut self, rhs: &'a RistrettoPoint)
fn sub_assign(&mut self, rhs: &'a RistrettoPoint)
Performs the
-= operation. Read moreimpl Copy for RistrettoPoint
impl Eq for RistrettoPoint
impl StructuralEq for RistrettoPoint
impl StructuralPartialEq for RistrettoPoint
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> InitializableFromZeroed for Twhere
T: Default,
impl<T> InitializableFromZeroed for Twhere
T: Default,
§unsafe fn initialize(place: *mut T)
unsafe fn initialize(place: *mut T)
Called to initialize a place to a valid value, after it is set
to all-bits-zero. Read more