API & MCP

Everything a person can do on Key Derivation Lab, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Key Derivation Lab

Derives keys from a password and salt with PBKDF2 (SHA-1/256/512), scrypt, Argon2id and HKDF using the parameters you choose, and compares their memory and work settings with the OWASP Password Storage recommendations. With JavaScript on, the page shows real timings for PBKDF2, HKDF and scrypt.

Inputs of Key Derivation Lab
FieldTypeDefaultDescription
password (required)text—Password or input key material
passwordFormatselect (utf8, hex, base64)"utf8"Password is
salt (required)text—Salt. Use a random, unique salt of 16 bytes per password in real systems.
saltFormatselect (utf8, hex, base64)"utf8"Salt is
algorithmsmultiselect (pbkdf2-sha1, pbkdf2-sha256, pbkdf2-sha512, scrypt, argon2id, hkdf-sha256, hkdf-sha512)["pbkdf2-sha256","scrypt","argon2id","hkdf-sha256"]Functions
keyLengthinteger32Output length
pbkdf2Iterationsinteger—PBKDF2 iterations. Empty = OWASP value for each hash (SHA-1 1,300,000; SHA-256 600,000; SHA-512 210,000).
scryptLogNinteger17scrypt cost N = 2^…
scryptRinteger8scrypt block size r
scryptPinteger1scrypt parallelism p
argon2MemoryKiBinteger19456Argon2 memory
argon2Passesinteger2Argon2 passes (t)
argon2Parallelisminteger1Argon2 parallelism (p)
hkdfInfotext—HKDF info (context)
outputEncodingselect (hex, base64)"hex"Output

Example request

OWASP defaults: PBKDF2-SHA-256, scrypt, Argon2id, HKDF

curl -X POST https://keyderivationlab.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"password":"correct horse battery staple","salt":"c2FsdHNhbHRzYWx0c2FsdA==","saltFormat":"base64"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "key-derivation-lab": { "type": "http", "url": "https://keyderivationlab.usefulweb.site/mcp" }
  }
}