pub struct Blake3Signer { /* private fields */ }Expand description
BLAKE3 digest signer for high-throughput self-certifying content.
Uses signature type code SIGNATURE_TYPE_DIGEST_BLAKE3_PLAIN (6),
reserved on the NDN TLV SignatureType registry. Analogous to
DigestSha256 (type 0) but uses BLAKE3, which is 3–8× faster on modern
CPUs due to SIMD parallelism.
The “signature” is a 32-byte BLAKE3 hash of the signed region. There is no
secret key — this provides integrity (content addressing) but not
authentication. For keyed BLAKE3 (authentication), use Blake3KeyedSigner,
which uses a distinct type code so verifiers cannot be downgraded from
keyed to plain mode via a substitution attack.
Implementations§
Trait Implementations§
Source§impl Signer for Blake3Signer
impl Signer for Blake3Signer
fn sig_type(&self) -> SignatureType
fn key_name(&self) -> &Name
fn sign<'a>( &'a self, region: &'a [u8], ) -> Pin<Box<dyn Future<Output = Result<Bytes, TrustError>> + Send + 'a>>
Source§fn sign_sync(&self, region: &[u8]) -> Result<Bytes, TrustError>
fn sign_sync(&self, region: &[u8]) -> Result<Bytes, TrustError>
Synchronous signing — avoids
Box::pin and async state machine overhead. Read moreSource§fn cert_name(&self) -> Option<&Name>
fn cert_name(&self) -> Option<&Name>
The certificate name to embed as a key locator in SignatureInfo, if any.
Source§fn public_key(&self) -> Option<Bytes>
fn public_key(&self) -> Option<Bytes>
Return the raw public key bytes, if available.
Auto Trait Implementations§
impl !Freeze for Blake3Signer
impl RefUnwindSafe for Blake3Signer
impl Send for Blake3Signer
impl Sync for Blake3Signer
impl Unpin for Blake3Signer
impl UnwindSafe for Blake3Signer
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
Mutably borrows from an owned value. Read more