Zum Inhalt springen
uencoder

Derive ein cryptographic Schlüssel von ein Passwort mit ein KDF

Turn ein human-memorable Passwort in ein fixed-Länge Schlüssel suitable für AES oder HMAC mit PBKDF2, scrypt, oder bcrypt mit ein salt.

  1. 1

    Passwords are low-entropy and variable-length; cryptographic keys need high entropy and fixed length. A key derivation function (KDF) bridges this gap by stretching the password through many iterations, with a salt to defeat rainbow tables.

  2. 2
    PBKDF2-Schlüsselableitung →

    Enter the password, a random salt, iteration count (100k-600k for PBKDF2-SHA256), and output length (32 bytes for AES-256). The tool outputs the derived key as hex or Base64.

  3. 3
    scrypt-Schlüsselableitung →

    For stronger protection against GPU/ASIC attacks, use scrypt which is memory-hard. Parameters: N=2^16-2^20, r=8, p=1. The memory cost makes parallel brute force expensive.

  4. 4

    Store the salt and parameters (iterations, N/r/p) with the encrypted data — they are not secret. Only the password is secret. The same parameters + salt + password always reproduce the same key.

Häufige Fragen

PBKDF2 vs scrypt vs bcrypt — which should I use?
scrypt is strongest against hardware attacks (memory-hard). bcrypt is battle-tested for password storage. PBKDF2 is FIPS-standard and widely available. For key derivation specifically, scrypt or PBKDF2-SHA256 are standard choices; bcrypt is designed for password hashing, not key derivation.
Why is the salt not secret?
The salt's job is to ensure different users with the same password get different keys, and to defeat precomputed rainbow tables. It only needs to be unique and random, not secret. Store it alongside the derived key or ciphertext.

Verwandte Tools