Skip to content

miniproto.crypto.native.scrypt_derive_native

miniproto.crypto.native.scrypt_derive_native

Section titled “miniproto.crypto.native.scrypt_derive_native”
scrypt_derive_native(password: bytes, salt: bytes, n: int, r: int, p: int, length: int) -> bytes

Derive Scrypt key material through explicit compiled Rust support.

Parameters:

  • password (bytes) – Secret input bytes.
  • salt (bytes) – Caller-selected salt bytes.
  • n (int) – Power-of-two CPU/memory cost greater than one.
  • r (int) – Block-size cost parameter.
  • p (int) – Parallelization cost parameter.
  • length (int) – Requested output length.

Returns:

  • bytes – Derived key bytes.

Raises:

This no-fallback variant does not choose safe parameter values or limit the resource cost requested by the caller.