Expand description
Utilities for deterministic identifier derivation.
Provides a generic mechanism to generate reproducible identifiers (Id)
from a combination of:
- a base key (
Id) - an associated item (
Item) - a salt (
Salt)
using a hashing algorithm (via [Hash]).
The same input tuple (Id, Item, Salt) will always produce the same output,
enabling stable and namespaced key derivation.
§Components
KeySeedFor: Encodes the derivation inputs and produces a derived key.KeyGenFor: Trait providing a generic interface for key generation.
§Guarantees
- Deterministic: identical inputs yield identical outputs
- Domain separation via
(Item, Salt)inputs
§Notes
- Uniqueness depends on correct salt usage
- Decoding from hash output must succeed for valid key generation
Modules§
- test_
utils - Internal test utilities for validating
KeyGenForimplementations.
Structs§
- KeySeed
For - A seed structure for deterministic identifier derivation.
Traits§
- KeyGen
For - Trait for generating deterministic identifiers from a combination of key, item, and salt.