Expand description
§Core 32-byte newtypes and cryptographic primitive wrappers
The “nouns” of the hashiverse protocol. Every one of these is a transparent newtype
over a fixed-size byte array or an underlying crypto library type, so that
function signatures throughout the crate can encode their intent in the type system
rather than relying on correctly-named [u8; 32] parameters.
§Addressing
Id— 32-byte opaque identifier used pervasively (peer IDs, client IDs, post IDs, bucket location IDs, Kademlia keys). Ordered by natural byte comparison so it plays well with XOR-distance routing.Hash— 32-byte Blake3 digest. Structurally equivalent toIdbut semantically distinct — “a hash of something” vs “a handle to something”.
§Cryptography
SignatureKey/VerificationKey— Ed25519 secret and public halves.VerificationKeyBytes— the wire-format serialisation of a public key.Signature— a 64-byte Ed25519 signature.PQCommitmentBytes— the 32-byte post-quantum commitment (seecrate::tools::keys_post_quantum).
§Proof-of-work
Pow— a leading-zero-bit count, effectively a difficulty level.Salt— the random bytes searched over during PoW.
Every type exposes from_hex_str / to_hex_str, from_slice, and from_buf
constructors so they can be produced from URLs, wire bytes, or bytes::Buf streams
with consistent error handling.
Structs§
- Bucket
Key - Hash
- A 32-byte cryptographic hash, the standard hash output throughout the protocol.
- Id
- A 32-byte opaque identifier used pervasively throughout the protocol.
- PQCommitment
Bytes - Pow
- A proof-of-work difficulty level, expressed as the number of leading zero bits required on the PoW hash output.
- Salt
- An 8-byte nonce used to vary the input of a proof-of-work search.
- Signature
- A 64-byte Ed25519 signature.
- Signature
Key - A private Ed25519 signing key held by a single client identity.
- Signature
KeyBytes - Verification
Key - Verification
KeyBytes