Expand description
HKDF-SHA256, PBES2 (PBKDF2-HS256), and master-key derivation.
ConstantsΒ§
- MIN_
PBKD πF2_ ITERATIONS - The floor the web client enforces inside its PBKDF2 primitive, so a server cannot talk us into deriving a weaker key than the client would.
FunctionsΒ§
- derive_
master_ πkey - Derives the 32-byte master unlock key (kid
"mp"), dispatching on the algorithm prefix the way the web clientβsAuk.deriveKdfBytesdoes. - hkdf_
sha256 π - HKDF-SHA256 producing 32 bytes, with
methodas theinfoparameter. - legacy_
password π - The legacy
PBES2-stand-in for the password, hashed raw and never normalized. - normalize_
identity_ πusername - The only place the email is decomposed, not just trimmed and lowercased.
- normalize_
password π - normalize_
username π - pbes2 π
- PBKDF2-HMAC-SHA256 producing 32 bytes. Callers check the method first.
- validate_
pbes2 π - Rejects a PBES2 method this module cannot honour.