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<Self, CryptoError>
pub fn from_bytes(bytes: [u8; 32]) -> Result<Self, 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 more