pub struct X25519PubKey(/* private fields */);Trait Implementations§
Source§impl AsRef<[u8]> for X25519PubKey
impl AsRef<[u8]> for X25519PubKey
Source§impl Clone for X25519PubKey
impl Clone for X25519PubKey
Source§fn clone(&self) -> X25519PubKey
fn clone(&self) -> X25519PubKey
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for X25519PubKey
Available on non-crate feature full only.The only meaningful debug information for a cryptograhpic secret is the literal bytes.
Also, encodings like base64 are not constant time so debugging could open some weird
side channel issue trying to be ‘human friendly’.
It seems better to never try to encode secrets.
impl Debug for X25519PubKey
full only.The only meaningful debug information for a cryptograhpic secret is the literal bytes. Also, encodings like base64 are not constant time so debugging could open some weird side channel issue trying to be ‘human friendly’. It seems better to never try to encode secrets.
Note that when using this crate with feature “subtle-encoding”, a hex representation will be used.
Source§impl<'de> Deserialize<'de> for X25519PubKey
impl<'de> Deserialize<'de> for X25519PubKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<X25519PubKey, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<X25519PubKey, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl From<[u8; 32]> for X25519PubKey
Trivial new type derivation.
Secrets should have private interiors and be constructed directly from fixed length
arrays of known length.
impl From<[u8; 32]> for X25519PubKey
Trivial new type derivation. Secrets should have private interiors and be constructed directly from fixed length arrays of known length.
Source§impl Hash for X25519PubKey
impl Hash for X25519PubKey
Source§impl PartialEq for X25519PubKey
Constant time equality check.
This mitigates timing attacks where a remote agent can reverse engineer data by
measuring tiny changes in latency associated with optimised equality checks.
More matching bytes = more latency = vulnerability.
This type of attack has been successfully demonstrated over a network despite varied latencies.
impl PartialEq for X25519PubKey
Constant time equality check. This mitigates timing attacks where a remote agent can reverse engineer data by measuring tiny changes in latency associated with optimised equality checks. More matching bytes = more latency = vulnerability. This type of attack has been successfully demonstrated over a network despite varied latencies.
Source§impl Serialize for X25519PubKey
impl Serialize for X25519PubKey
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,
Source§impl TryFrom<&[u8]> for X25519PubKey
impl TryFrom<&[u8]> for X25519PubKey
Source§type Error = SecurePrimitiveError
type Error = SecurePrimitiveError
Source§fn try_from(
slice: &[u8],
) -> Result<X25519PubKey, <X25519PubKey as TryFrom<&[u8]>>::Error>
fn try_from( slice: &[u8], ) -> Result<X25519PubKey, <X25519PubKey as TryFrom<&[u8]>>::Error>
Source§impl TryFrom<&X25519PubKey> for SerializedBytes
impl TryFrom<&X25519PubKey> for SerializedBytes
Source§type Error = SerializedBytesError
type Error = SerializedBytesError
Source§fn try_from(t: &X25519PubKey) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: &X25519PubKey) -> Result<SerializedBytes, SerializedBytesError>
Source§impl TryFrom<SerializedBytes> for X25519PubKey
impl TryFrom<SerializedBytes> for X25519PubKey
Source§type Error = SerializedBytesError
type Error = SerializedBytesError
Source§fn try_from(sb: SerializedBytes) -> Result<X25519PubKey, SerializedBytesError>
fn try_from(sb: SerializedBytes) -> Result<X25519PubKey, SerializedBytesError>
Source§impl TryFrom<X25519PubKey> for SerializedBytes
impl TryFrom<X25519PubKey> for SerializedBytes
Source§type Error = SerializedBytesError
type Error = SerializedBytesError
Source§fn try_from(t: X25519PubKey) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: X25519PubKey) -> Result<SerializedBytes, SerializedBytesError>
impl Copy for X25519PubKey
impl Eq for X25519PubKey
Auto Trait Implementations§
impl Freeze for X25519PubKey
impl RefUnwindSafe for X25519PubKey
impl Send for X25519PubKey
impl Sync for X25519PubKey
impl Unpin for X25519PubKey
impl UnsafeUnpin for X25519PubKey
impl UnwindSafe for X25519PubKey
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§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.