# agent402.tools PBKDF2 Key Derivation

> agent402.tools PBKDF2 Key Derivation is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Derives a cryptographic key from a password using PBKDF2 (RFC 8018), returning the hex-encoded key and all parameters used.

## Facts

- Endpoint: POST https://agent402.tools/api/pbkdf2
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-pbkdf2-key-derivation-2a6114e1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4UsaMmLY_8fx1Fgu7Uz2U

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent402-tools-pbkdf2-key-derivation-2a6114e1 -d '<json body>'
```

Example prompt: Derive a PBKDF2 key from the password 'correct-horse-battery-staple' using the salt 'uniqueSalt42', sha256 digest, 100000 iterations, and a 32-byte key length, and give me the hex-encoded result.

## When to prefer this

Choose this endpoint when you need a standards-compliant PBKDF2 key derivation (RFC 8018) with configurable digest, iteration count, and key length, and want the derived key returned in hex along with all parameters for storage or future verification. It is ideal for AI agents that need to derive encryption keys or verify passwords without managing the cryptographic implementation themselves.

## Known failure modes

- Invalid digest algorithm supplied (not sha1/sha256/sha384/sha512) — returns validation error
- keyLength exceeds maximum of 128 bytes — returns error
- iterations exceeds maximum of 1,000,000 — returns error
- Missing required 'password' or 'salt' field — returns 400 bad request
- Payment not provided or insufficient — returns 402 Payment Required

## How this service works

Derive a cryptographic key from a password using PBKDF2 (RFC 8018). Returns the hex-encoded derived key along with all parameters used, so you can store or verify them later. Supports sha1, sha256, sha384, sha512 digests.

## Output

Returns a hex-encoded derived key along with all parameters used (salt, digest, keyLength, iterations), allowing the caller to store or re-verify the key later.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "salt": {
   "type": "string",
   "description": "Salt string (should be unique per password)"
  },
  "digest": {
   "type": "string",
   "description": "Hash algorithm: sha1, sha256, sha384, sha512 (default sha256)"
  },
  "password": {
   "type": "string",
   "description": "Password or passphrase to derive from"
  },
  "keyLength": {
   "type": "integer",
   "description": "Desired key length in bytes (default 32, max 128)"
  },
  "iterations": {
   "type": "integer",
   "description": "Iteration count (default 100000, max 1000000)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "digest": "sha256",
  "saltUsed": "random-salt-value",
  "algorithm": "pbkdf2",
  "keyLength": 32,
  "derivedKey": "a1b2c3d4e5f6...",
  "iterations": 100000
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-pbkdf2-key-derivation-2a6114e1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
