std.x.crypto.scrypt [x] std.x.crypto.scrypt.salsa20_8 pub fn salsa20_8(input: List[byte]) -> List[byte] — Salsa20/8 Core (RFC 7914 §3) of one 64-octet block: sixteen little-endian words in, sixteen out. std.x.crypto.scrypt.blockmix pub fn blockmix(b: List[byte], r: int) -> List[byte] — scryptBlockMix (RFC 7914 §4) of b, 2·r 64-octet blocks, with Salsa20/8 as H. std.x.crypto.scrypt.romix pub fn romix(b: List[byte], r: int, n: int) -> List[byte] ! {bad_n} — scryptROMix (RFC 7914 §5) of one 128·r-octet block with cost n. std.x.crypto.scrypt.pbkdf2_hmac_sha256 pub fn pbkdf2_hmac_sha256( password: List[byte], salt: List[byte], c: int, dk_len: int, ) -> List[byte] ! {bad_count, bad_dk_len} — PBKDF2-HMAC-SHA-256 (RFC 8018 §5.2): dk_len octets derived from password and salt with c iterations. std.x.crypto.scrypt.memory pub fn memory(n_log2: int, r: int, p: int, dk_len: int) -> int — The octets scrypt allocates at its peak for these parameters: 128·r·(N + 2p + 2) — V, B, the final PBKDF2's copy of B and the two scratch blocks X and Y — plus the dk_len octets of the key it returns and a fixed 16 KiB for Salsa's T and the HMAC states. std.x.crypto.scrypt.scrypt pub fn scrypt( password: List[byte], salt: List[byte], n_log2: int, r: int, p: int, dk_len: int, cap: int, ) -> List[byte] ! {bad_n, bad_rp, over_cap, bad_dk_len} — scrypt (RFC 7914 §6): dk_len octets derived from password and salt with N = 2^n_log2, block size r and parallelization p, refusing before it allocates anything when memory(n_log2, r, p, dk_len) exceeds cap octets. std.x.crypto.scrypt.to_hex pub fn to_hex(b: List[byte]) -> str — Lowercase hex of b, this module's own so that its tests and doc examples import exactly one module (sha2's precedent).