Module signer

Module signer 

Source

Structs§

Blake3KeyedSigner
BLAKE3 keyed signer for authenticated high-throughput content.
Blake3Signer
BLAKE3 digest signer for high-throughput self-certifying content.
Ed25519Signer
Ed25519 signer using ed25519-dalek.
HmacSha256Signer
HMAC-SHA256 signer for symmetric (pre-shared key) authentication.

Constants§

BLAKE3_RAYON_THRESHOLD
Threshold above which BLAKE3 hashing switches from single-thread Hasher::update to multi-thread Hasher::update_rayon. The blake3 crate documents 128 KiB as the rule-of-thumb crossover on x86_64 — below that the rayon thread-spawn overhead beats the per-byte savings, so we always take the single-thread path. Per-packet signing of normal NDN signed portions (a few hundred bytes to a few KB) never reaches this threshold; bulk content publication (multi-MB Data) does.
SIGNATURE_TYPE_DIGEST_BLAKE3_KEYED
Signature type code for keyed BLAKE3. Analogous to SignatureHmacWithSha256 (type 4) — requires a 32-byte shared secret; provides both integrity and authentication of the source. Distinct from the plain-digest code on purpose: see the plain-vs-keyed rationale above. See SignatureBlake3Keyed in blake3-signature-spec.md.
SIGNATURE_TYPE_DIGEST_BLAKE3_PLAIN
Signature type code for plain BLAKE3 digest. Analogous to DigestSha256 (type 0) — provides content integrity / self-certifying names but no authentication. Anyone can produce a valid signature. See DigestBlake3 in blake3-signature-spec.md.

Traits§

Signer
Signs a region of bytes and produces a signature value.

Functions§

blake3_hash_auto
Compute an unkeyed BLAKE3 hash, automatically dispatching to the multi-thread update_rayon path when the input is large enough to benefit. See BLAKE3_RAYON_THRESHOLD. Used by both Blake3Signer (sign side) and Blake3DigestVerifier (verify side) so that a single-call API “just gets faster” on large inputs without callers needing to pick a code path.
blake3_keyed_hash_auto
Compute a keyed BLAKE3 hash, automatically dispatching to update_rayon when the input is large enough to benefit. See BLAKE3_RAYON_THRESHOLD.