pub struct Point { /* private fields */ }Implementations§
Trait Implementations§
Source§impl BinaryMarshaler for Point
impl BinaryMarshaler for Point
fn marshal_binary(&self) -> Result<Vec<u8>, MarshallingError>
Source§impl BinaryUnmarshaler for Point
impl BinaryUnmarshaler for Point
fn unmarshal_binary(&mut self, data: &[u8]) -> Result<(), MarshallingError>
Source§impl<'de> Deserialize<'de> for Point
impl<'de> Deserialize<'de> for Point
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Marshaling for Point
impl Marshaling for Point
Source§fn marshal_to(&self, w: &mut impl Write) -> Result<(), MarshallingError>
fn marshal_to(&self, w: &mut impl Write) -> Result<(), MarshallingError>
io::Write.Source§fn marshal_size(&self) -> usize
fn marshal_size(&self) -> usize
Source§fn unmarshal_from(&mut self, r: &mut impl Read) -> Result<(), MarshallingError>
fn unmarshal_from(&mut self, r: &mut impl Read) -> Result<(), MarshallingError>
io::Read.
If r is an [XOF], it uses r to pick a valid object pseudo-randomly,
which may entail reading more than len bytes due to retries.fn unmarshal_from_random(&mut self, r: &mut (impl Read + Stream))
Source§fn marshal_id(&self) -> [u8; 8]
fn marshal_id(&self) -> [u8; 8]
marshal_id()] returns the type tag used in encoding/decodingSource§impl Ord for Point
impl Ord for Point
Source§impl PartialOrd for Point
impl PartialOrd for Point
Source§impl Point for Point
impl Point for Point
Source§fn null(self) -> Self
fn null(self) -> Self
[null()] sets [self] to the neutral element, which is (0,1) for twisted Edwards curves.
type SCALAR = Scalar
Source§fn pick<S: Stream>(self, rand: &mut S) -> Self
fn pick<S: Stream>(self, rand: &mut S) -> Self
pick()] sets the receiver to a fresh random or pseudo-random Point.Source§fn embed_len(&self) -> usize
fn embed_len(&self) -> usize
embed_len()] returns the maximum number of bytes that can be embedded in a single
group element via [pick()].Source§fn embed<S: Stream>(self, data: Option<&[u8]>, rand: &mut S) -> Self
fn embed<S: Stream>(self, data: Option<&[u8]>, rand: &mut S) -> Self
embed()] encodes a limited amount of specified data in the
Point, using r as a source of cryptographically secure
random data. Implementations only embed the first embed_len
bytes of the given data.Source§impl PointCanCheckCanonicalAndSmallOrder for Point
impl PointCanCheckCanonicalAndSmallOrder for Point
Source§fn has_small_order(&self) -> bool
fn has_small_order(&self) -> bool
[has_small_order()] determines whether the group element has small order
Provides resilience against malicious key substitution attacks (M-S-UEO) and message bound security (MSB) even for malicious keys See paper https://eprint.iacr.org/2020/823.pdf for definitions and theorems
This is the same code as in https://github.com/jedisct1/libsodium/blob/4744636721d2e420f8bbe2d563f31b1f5e682229/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c#L1170
Source§fn is_canonical(&self, b: &[u8]) -> bool
fn is_canonical(&self, b: &[u8]) -> bool
[is_canonical()] determines whether the group element is canonical
Checks whether group element s is less than p, according to RFC8032§5.1.3.1 https://tools.ietf.org/html/rfc8032#section-5.1.3
The method accepts a buffer instead of calling marshal_binary() on the receiver
because that always returns a value modulo prime.
impl Copy for Point
impl Eq for Point
Auto Trait Implementations§
impl Freeze for Point
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnwindSafe for Point
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more