Cryptography Tools

PBKDF2 Password Calculator

Generate derived keys using the Password-Based Key Derivation Function 2 (PBKDF2) safely and locally in your browser.

GPU Brute-Force Protection

By forcing thousands of iterations, PBKDF2 makes dictionary attacks computationally devastating for attackers.

Cryptographic Salting

Adding a unique Salt string ensures that even if two users have the same password, their derived keys are completely different.

100% Client-Side Engine

Powered by the browser's native Web Crypto API. Your raw password and derived keys never touch a network request.

OWASP recommends 210,000+ for SHA-512

How Zero-Knowledge Works

ZeroKey uses PBKDF2 to convert your password into an unbreakable 256-bit AES-GCM key.

Brute-forcing is cheaper than ever.

If you only hash a password once (like standard SHA-256), modern GPUs can crack it in milliseconds. PBKDF2 is non-negotiable for modern security.

ZeroKey automatically implements 100,000+ PBKDF2 iterations and salts on every single message you send, ensuring your payloads are mathematically impossible to brute-force.

Launch ZeroKey Vault

What is PBKDF2?

Password-Based Key Derivation Function 2 (PBKDF2) is a cryptographic standard designed to reduce vulnerabilities to brute-force attacks. It applies a pseudorandom function, such as HMAC, to an input password along with a salt value, repeating the process many times to produce a secure derived key.

Why is Password Stretching Important?

Modern graphics cards (GPUs) can guess billions of passwords per second. If an application only hashes a password once (e.g., a simple SHA-256 hash), an attacker can easily crack it using a dictionary attack. PBKDF2 mitigates this by introducing iterations (password stretching). By forcing the CPU to hash the password hundreds of thousands of times, it artificially slows down the derivation process. This millisecond delay is unnoticeable to a normal user logging in, but computationally devastating for an attacker trying to brute-force millions of hashes.

How to implement PBKDF2 in JavaScript

You can generate secure keys natively in the browser without importing massive NPM libraries by utilizing the Web Crypto API:

pbkdf2-derive.js
async function derivePBKDF2Key(password, saltString) {
    const encoder = new TextEncoder();
    
    // 1. Import the raw password
    const keyMaterial = await window.crypto.subtle.importKey(
        "raw",
        encoder.encode(password),
        { name: "PBKDF2" },
        false,
        ["deriveBits", "deriveKey"]
    );

    // 2. Derive the bits using 210,000 iterations
    const derivedBits = await window.crypto.subtle.deriveBits(
        {
            name: "PBKDF2",
            salt: encoder.encode(saltString),
            iterations: 210000,
            hash: "SHA-512"
        },
        keyMaterial,
        256 // Output 32 bytes (256 bits) for AES-256
    );

    return derivedBits;
}

Frequently Asked Questions

What is the recommended number of iterations for PBKDF2?
As hardware improves, the recommended iteration count increases. Currently, OWASP recommends at least 210,000 iterations for PBKDF2-HMAC-SHA512 and at least 600,000 for PBKDF2-HMAC-SHA256.
Why is Salting important?
A salt is a random string added to the password before hashing. It ensures that two users with the exact same password ("password123") will have completely different resulting hashes. This entirely defeats Rainbow Table attacks, where hackers pre-compute hashes for common passwords.

Privacy First

We use essential cookies & analytics strictly to improve our free tools. No PII or cryptography secrets are ever tracked.

Policy