해시/암호화
PBKDF2 Hash + Verify
비밀번호로부터 PBKDF2(RFC 8018), HMAC-SHA1/256/384/512로 키를 유도하며, 반복 횟수를 조정할 수 있습니다.
PBKDF2 (RFC 8018) applies HMAC to a password and salt repeatedly to deliberately slow down computation — it's the oldest of the standardized algorithms for password hashing and encryption key derivation.
How to use it
- Derive: enter a password, pick an HMAC algorithm (SHA-1/256/384/512), and set the iteration count to get a derived key of the requested length.
- Verify: paste a password and an existing PBKDF2 hash to check whether they match, without recomputing it manually.
- More iterations means slower, more secure computation — tune the value to your server's response-time budget.
Common uses
- Deriving an encryption key from a user's password for a file container or a custom protocol.
- Checking a PBKDF2 implementation for compatibility across programming languages (the parameters must match exactly).
- Hashing passwords in systems that require a FIPS-compliant algorithm (PBKDF2 is NIST-approved).
Things to keep in mind
Unlike bcrypt and Argon2, PBKDF2 isn't memory-hard — it only requires CPU time, so it's less resistant to attacks on GPUs with many parallel compute units.
The recommended iteration count rises over time in NIST and OWASP guidance as hardware gets faster — check against current recommendations periodically.
자주 묻는 질문
비밀번호 해싱에서 PBKDF2는 bcrypt나 Argon2와 어떻게 다른가요?
PBKDF2는 브루트포스를 늦추기 위해 HMAC 해시 함수를 반복적으로 적용하지만, bcrypt나 Argon2와 달리 메모리 집약적이지 않아 GPU로 크랙하는 비용이 상대적으로 저렴합니다. 여전히 널리 사용되고 FIPS 승인을 받았지만, 새 시스템에는 일반적으로 Argon2가 선호됩니다.
반복 횟수는 무엇을 제어하며 얼마나 높아야 하나요?
반복 횟수는 기본 해시가 몇 번 적용되는지를 정하며, 속도와 브루트포스 저항성을 직접적으로 맞바꿉니다. 현재 지침은 SHA-256에 대해 수십만 회의 반복을 권장하며, 하드웨어가 빨라짐에 따라 시간이 지나면서 늘려야 합니다.
PBKDF2에 솔트가 필요한 이유는 무엇인가요?
솔트는 동일한 비밀번호가 서로 다른 출력을 생성하도록 보장하여, 공격자가 미리 계산된 레인보우 테이블을 사용하지 못하게 하고 각 해시를 개별적으로 공격하도록 강제합니다.
PBKDF2가 사용하는 기본 해시 함수가 중요한가요?
네. 예전 구현은 기본값으로 HMAC-SHA1을 사용하는 경우가 많았습니다 — HMAC 구조 안에서는 치명적인 취약점이 아니지만, 현대의 권장 사항은 체감할 만한 속도 저하 없이 더 큰 안전 여유를 위해 HMAC-SHA256 이상을 명확히 권장합니다.
PBKDF2는 비밀번호 저장 외에 어디에 사용되나요?
PBKDF2는 비밀번호로부터 암호화 키를 유도하는 데도 널리 사용됩니다 — 예를 들어 Wi-Fi의 WPA2/WPA3나 많은 암호화된 파일 컨테이너 형식에서 사용됩니다.