Expand description
PBKDF2 (RFC 8018) passwords: the hash-independent half of the PBKDF2
surface. The password resource minted here parameterizes derivations
through the per-hash prepare interfaces (pbkdf2-sha2,
pbkdf2-sha1), so one imported password serves either hash family.
Security:
- No operation returns a
password’s bytes, under any grant: WebCrypto’s forced non-extractability on PBKDF2 base keys, made structural. - The implementation holds an imported password in memory for the resource’s construction-to-drop lifetime; that window is the secret’s exposure to memory side channels. Import late, drop early. Dropping releases (and, in scrubbing implementations, zeroizes) it.
Structs§
- Password
- A password: consumable only by
prepare, never readable. Usage grants are fixed at import and copied to every input prepared from it.
Functions§
- import_
password - Import a password.
- unwrap_
password - Mint a password from unwrapped bytes (see the
wrappinginterface), subject toimport-password’s contract. Seehkdf.unwrap-ikmfor the model — the grants come fromoptionsalone, and non-extractability stays structural.inputis consumed.