# Scrypt

scrypt is a password-based key derivation function (PBKDF) created by Colin Percival. The algorithm was specifically designed to make it costly to perform large-scale custom hardware attacks by requiring large amounts of memory. In 2016, the scrypt algorithm was published by IETF as RFC 7914. Enter the password in the input to generate its hash. Scrypt lives in the **Hashing** category of the `fx` menu.

## Parameters

| Parameter                  | Type   | Required | Default | Description                                            |
| -------------------------- | ------ | -------- | ------- | ------------------------------------------------------ |
| Input                      | string | yes      | —       | Value to transform. Previous step output or a literal. |
| Salt                       | string | no       | —       | Argument value for this operation.                     |
| Iterations (N)             | number | no       | `16384` | Numeric value. Default `16384`.                        |
| Memory factor (r)          | number | no       | `8`     | Numeric value. Default `8`.                            |
| Parallelization factor (p) | number | no       | `1`     | Numeric value. Default `1`.                            |
| Key length                 | number | no       | `64`    | Numeric value. Default `64`.                           |

`Input` is the primary value (previous step output or a literal).

## Returned value

| Type     | Description                          |
| -------- | ------------------------------------ |
| `string` | Result of the Scrypt transformation. |

## Limitations

- Wrong key, algorithm options, or malformed input typically raises an evaluation error — fix Input or options before re-running.

## Example

<details>
<summary>Run Scrypt</summary>

scrypt is a password-based key derivation function (PBKDF) created by Colin Percival. Adjust optional parameters when the defaults do not match your payload.

1. Set **Input** to the value to transform (previous step output or a literal).

2. Review **Salt**, **Iterations (N)**, **Memory factor (r)**, **Parallelization factor (p)**, **Key length** and keep defaults unless your format requires otherwise.

3. Confirm **Output value** shows the transformed result.

</details>
