해시/암호화
Argon2 Hash + Verify
Argon2로 비밀번호를 해시화합니다(Password Hashing Competition 우승, RFC 9106) — d/i/id 변형 지원, 기존 해시와의 대조 검증 포함.
Argon2 is the Password Hashing Competition winner and the algorithm recommended in RFC 9106 for hashing passwords. Unlike bcrypt, it deliberately demands a lot of memory, not just CPU time, which makes attacks on specialized hardware (GPUs, ASICs) much harder.
How to use it
- Hash: enter a password, pick a variant (Argon2d, Argon2i, or Argon2id), and set the parameters (memory, iterations, parallelism) to get a hash.
- Verify: paste a password and an existing Argon2 hash to check whether they match, without hashing manually yourself.
- Argon2id is the recommended default for most applications — it combines the strengths of Argon2i and Argon2d.
Common uses
- Checking that a backend generates correct Argon2 hashes with the expected parameters before a release.
- Tuning memory and iteration parameters to fit within a server's response-time budget (typically 250-500ms).
- Comparing Argon2 against bcrypt or PBKDF2 when choosing an algorithm for a new project.
Things to keep in mind
The memory parameter is Argon2's main defense: the more memory hashing requires, the more expensive it is for an attacker to parallelize an attack on a GPU with limited fast memory per chip.
Argon2id is recommended for most cases: Argon2i resists side-channel attacks better, Argon2d resists GPU attacks better, and id combines both approaches.
자주 묻는 질문
Argon2가 bcrypt나 PBKDF2보다 권장되는 이유는 무엇인가요?
Argon2는 Password Hashing Competition의 우승 알고리즘으로, 메모리 하드(memory-hard) 특성을 가져 GPU나 ASIC을 이용한 대규모 병렬 공격에 훨씬 강한 저항력을 제공합니다. 이런 이유로 현재 가장 권장되는 비밀번호 해싱 알고리즘입니다.
Argon2i, Argon2d, Argon2id는 어떻게 다른가요?
Argon2i는 부채널 공격(side-channel attack)에 강해 비밀번호 해싱에 적합하고, Argon2d는 GPU 크래킹에 더 강하지만 부채널에 취약합니다. Argon2id는 두 방식을 결합한 하이브리드로, 대부분의 경우 기본 권장 변형입니다.
해시 계산이 오래 걸리는데 정상인가요?
네, 정상입니다. Argon2는 메모리와 시간을 의도적으로 많이 소모하도록 설계되어 있으며, 이는 무차별 대입 공격 비용을 높이기 위한 것입니다. 메모리/반복 횟수 값이 클수록 더 안전하지만 계산 시간도 늘어납니다.
Argon2는 어떻게 표준이 되었나요?
Argon2는 2015년 Password Hashing Competition에서 우승했습니다 — 비밀번호 해싱에 가장 적합한 알고리즘을 찾기 위한 암호학자들의 공개 경연이었습니다. 이후 OWASP는 bcrypt보다 Argon2를 우선적으로 권장하고 있습니다.
병렬성 매개변수는 해싱 속도만 높이나요?
아니요, 같은 매개변수는 다중 코어 하드웨어를 가진 공격자의 무차별 대입 속도도 똑같이 높여줍니다. 따라서 병렬성은 불필요하게 늘리지 말고 실제 서버의 코어 수에 맞춰 설정해야 합니다.