Passphrase to Key Derivation
Generate a secure passphrase, hash it to derive a key, and use the key for HMAC signing.
何时使用此配方
Demonstrates passphrase-based key derivation for user-facing encryption. Users remember the passphrase, the system derives the cryptographic key.
步骤
Passphrase Generator
试用此工具 →Create a memorable passphrase
Password Strength Checker
试用此工具 →Verify passphrase entropy
Hash Calculator
试用此工具 →Derive encryption key
HMAC Generator
试用此工具 →Test the derived key
常见问题
Why use a passphrase instead of a random key?
Passphrases are human-memorable. A 6-word diceware passphrase has ~77 bits of entropy — strong enough for most applications while being something users can remember.
Should I use SHA-256 for key derivation in production?
No. Use PBKDF2, scrypt, or Argon2 which add computational cost (iterations/memory) to resist brute-force. This recipe uses SHA-256 for demonstration only.
相关配方
Secure Password Workflow
Generate a strong password, verify its strength, and hash it for storage — a complete password security pipeline.
Web Security Header Audit
Audit your website's security headers, generate a CSP policy, evaluate it, and configure CORS.
JWT Authentication Setup
Set up JWT-based authentication: generate tokens, create signing keys, and implement TOTP for 2FA.
API Security Hardening
Harden your API with HMAC request signing, secure secrets, and SRI for client-side integrity.