Calculator Inputs
Plotly Graph
The chart compares memory growth and total mix calls as N changes while keeping r and p fixed.
Example Data Table
| Profile | N | r | p | dkLen | Approx. Memory | Total Mix Calls |
|---|---|---|---|---|---|---|
| Light testing | 8192 | 4 | 1 | 32 | 4.00 MiB | 16,384 |
| Balanced default | 16384 | 8 | 1 | 32 | 16.00 MiB | 32,768 |
| Higher memory | 32768 | 8 | 1 | 32 | 32.00 MiB | 65,536 |
| Heavy parallel profile | 65536 | 8 | 2 | 64 | 64.00 MiB | 262,144 |
Formula Used
- Block size bytes = 128 × r
- Estimated memory = 128 × N × r bytes
- Parallel block bytes = 128 × r × p bytes
- Mix calls per lane = 2 × N
- Total mix calls = 2 × N × p
- Relative effort index = N × r × p
- Output bits = dkLen × 8
- Stored bytes = salt bytes + dkLen
This page estimates tuning cost and storage footprint. It does not generate a live derived key string.
How to Use This Calculator
- Enter a valid power-of-two value for N.
- Set r to control block size and memory demand.
- Set p to model parallel workload growth.
- Choose a derived key length in bytes.
- Add the salt length you plan to store.
- Press the calculate button.
- Review the result table above the form.
- Use the graph and downloads to compare profiles quickly.
Frequently Asked Questions
1. What does N control?
N is the main cost setting. Increasing it raises memory use and the number of mixing rounds, so the workload grows quickly.
2. Why must N be a power of two?
This structure keeps the tuning consistent with standard scrypt parameter rules and helps the internal indexing pattern remain valid.
3. What does r change?
r changes block size. Larger values increase memory usage and the byte volume processed during the mixing phase.
4. What does p change?
p raises total computational effort by adding parallel lanes. It increases total work, while the per-instance memory estimate mainly follows N and r.
5. Does a larger dkLen always mean stronger security?
Not always. dkLen controls output length. Core cost tuning mostly comes from N, r, and p rather than the final byte count.
6. Is this an exact performance benchmark?
No. It is a planning calculator. Real execution time depends on hardware, implementation details, memory bandwidth, and software libraries.
7. Why track salt length here?
Salt length affects storage needs and output packaging. It helps estimate how many bytes must be saved alongside the derived key.
8. How should I compare different setups?
Keep one variable fixed while changing another. The chart and exported results make it easier to compare memory growth and workload changes side by side.