pub struct SigningKey(/* private fields */);Expand description
A member’s validated Ed25519 public signing key (Appendix D). It is bound to a
stable MemberId by admin entries and is never that identity.
Implementations§
Source§impl SigningKey
impl SigningKey
Sourcepub fn from_bytes(bytes: [u8; 32]) -> Result<SigningKey, CryptoError>
pub fn from_bytes(bytes: [u8; 32]) -> Result<SigningKey, CryptoError>
Validate a public signing key, refusing invalid and weak Ed25519 points.
Sourcepub fn verify(
&self,
message: &[u8],
signature: &Signature,
) -> Result<(), CryptoError>
pub fn verify( &self, message: &[u8], signature: &Signature, ) -> Result<(), CryptoError>
Verify a detached signature against this public key (§12).
Sourcepub fn verify_object(
&self,
path: &str,
digest: &ObjectDigest,
signature: &Signature,
) -> Result<(), CryptoError>
pub fn verify_object( &self, path: &str, digest: &ObjectDigest, signature: &Signature, ) -> Result<(), CryptoError>
Verify an object’s signature after hashing all bytes before it (Appendix D.3). The domain and path are authenticated along with the SHA-256 digest. Panics if the storage path is empty.
Sourcepub fn verify_prefix(
&self,
path: &str,
prefix: &[u8],
signature: &Signature,
) -> Result<(), CryptoError>
pub fn verify_prefix( &self, path: &str, prefix: &[u8], signature: &Signature, ) -> Result<(), CryptoError>
Verify a snapshot prefix independently of its encrypted data (D9).
prefix is exactly kind, version and routing fields, without signatures.
Panics if the storage path is empty.
Sourcepub fn verify_write_header(
&self,
path: &str,
prefix: &[u8],
header: &[u8],
roots: &[[u8; 32]],
signature: &Signature,
) -> Result<(), CryptoError>
pub fn verify_write_header( &self, path: &str, prefix: &[u8], header: &[u8], roots: &[[u8; 32]], signature: &Signature, ) -> Result<(), CryptoError>
Verify a write’s header signature without its part chunks (D9): the exact cleartext prefix, the complete sealed header chunk and the part roots. Snapshots carry these to authenticate another member’s leaves. Panics if the storage path is empty.
Trait Implementations§
Source§impl Clone for SigningKey
impl Clone for SigningKey
Source§fn clone(&self) -> SigningKey
fn clone(&self) -> SigningKey
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SigningKey
impl Debug for SigningKey
Source§impl Hash for SigningKey
impl Hash for SigningKey
Source§impl Ord for SigningKey
impl Ord for SigningKey
Source§fn cmp(&self, other: &SigningKey) -> Ordering
fn cmp(&self, other: &SigningKey) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for SigningKey
impl PartialEq for SigningKey
Source§impl PartialOrd for SigningKey
impl PartialOrd for SigningKey
impl Copy for SigningKey
impl Eq for SigningKey
impl StructuralPartialEq for SigningKey
Auto Trait Implementations§
impl Freeze for SigningKey
impl RefUnwindSafe for SigningKey
impl Send for SigningKey
impl Sync for SigningKey
impl Unpin for SigningKey
impl UnsafeUnpin for SigningKey
impl UnwindSafe for SigningKey
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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