हैश/क्रिप्टो
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: यह एल्गोरिदम पासवर्ड हैशिंग प्रतियोगिता क्यों जीता
अक्सर पूछे जाने वाले प्रश्न
पासवर्ड्स के लिए Argon2 को MD5 या SHA-256 जैसे पुराने हैश की तुलना में क्यों सुझाया जाता है?
Argon2 जानबूझकर धीमा और मेमोरी-हार्ड है, जिससे ब्रूट-फोर्स और GPU/ASIC आधारित क्रैकिंग काफी महंगी हो जाती है — जबकि MD5 या SHA-256 जैसे तेज़ सामान्य-प्रयोजन हैश पासवर्ड स्टोरेज के लिए उपयुक्त नहीं हैं।
मेमोरी, इटरेशन्स और पैरेललिज़्म पैरामीटर क्या नियंत्रित करते हैं?
मेमोरी कॉस्ट तय करता है कि हर हैश प्रयास में कितनी RAM लगेगी, इटरेशन्स यह तय करते हैं कि कितने पास चलेंगे, और पैरेललिज़्म थ्रेड्स की संख्या तय करता है — इनमें से किसी को भी बढ़ाने से क्रैकिंग की लागत बढ़ती है, लेकिन हैशिंग धीमी होती है।
मुझे कौन-सा Argon2 वेरिएंट इस्तेमाल करना चाहिए — d, i, या id?
पासवर्ड हैशिंग के लिए Argon2id डिफ़ॉल्ट रूप से सुझाया जाता है, क्योंकि यह Argon2i के साइड-चैनल हमलों के प्रतिरोध को Argon2d के GPU क्रैकिंग प्रतिरोध के साथ जोड़ता है।
Argon2 स्टैंडर्ड के रूप में कहां से आया?
Argon2 ने 2015 की Password Hashing Competition जीती — क्रिप्टोग्राफ़र्स की एक खुली प्रतियोगिता, जिसका लक्ष्य पासवर्ड हैशिंग के लिए सबसे अच्छा एल्गोरिदम खोजना था। तभी से OWASP इसे bcrypt से ऊपर प्राथमिकता वाले विकल्प के रूप में सुझाता है।
क्या पैरेललिज़्म पैरामीटर सिर्फ़ हैशिंग तेज़ करता है?
नहीं, वही पैरामीटर मल्टी-कोर हार्डवेयर वाले हमलावर के लिए ब्रूट-फ़ोर्स को भी उतना ही तेज़ करता है, इसलिए पैरेललिज़्म को सर्वर के वास्तविक कोर की संख्या के अनुसार सेट करना चाहिए, बिना ज़रूरत बढ़ाए नहीं।