Expand description
A high-entropy secret is a wrapper around secret bytes that are guaranteed to be high-entropy, and therefore safe to use as input keying material for a cheap KDF (such as the one used by the crate::safe::SecretProtectedKeyEnvelope).
Examples of high-entropy secrets are a random URL-fragment secret, a derived key, or random bytes. They are unlike low-entropy secrets such as PINs or passwords, which can be brute-forced and therefore require a memory- or compute-hard KDF.
Structs§
- High
Entropy Secret - A secret that is guaranteed to be high-entropy, and therefore safe to use as input keying material for a cheap KDF.
Enums§
- High
Entropy Secret Error - Errors that can occur when constructing a
HighEntropySecret.
Constants§
- MIN_
SECRET_ 🔒LENGTH - Minimum accepted secret length in bytes. 16 bytes = 128 bits of headroom for a uniformly random secret, matching the security level a cheap KDF assumes.
Traits§
- High
Entropy Secret Source - A high entropy secret, generated from a CSPRNG or derived from a high-entropy key. This MUST NOT be: