PBKDF2(Password-Based Key Derivation Function 2,基于密码的密钥派生函数2)是一种从密码生成加密密钥的算法。它通过重复迭代并通常配合盐(salt)来增加计算成本,从而提高抵抗暴力破解和字典攻击的能力。常用于密码哈希存储、加密密钥派生等场景。(另有相关的KDF方案,如 scrypt、Argon2 等。)
/ˌpiːbiːkeɪdiːɛfˈtuː/
We store passwords using PBKDF2 with a unique salt.
我们用 PBKDF2 加上唯一的盐来存储密码。
To slow down brute-force attacks, the system derives the encryption key from the user’s passphrase using PBKDF2 with a high iteration count.
为了减缓暴力破解,系统使用 PBKDF2 并设置较高的迭代次数,从用户口令派生加密密钥。
PBKDF2 是一个缩写,来自 Password-Based Key Derivation Function 2。它最早在 RSA 实验室的 PKCS 标准体系中被规范化,后来也被纳入 IETF 的 RFC 文档中;“2”表示该方案是同类设计中的第二代/第二个版本。