आर्गन2: Difference between revisions

From Vigyanwiki
Line 19: Line 19:
== एल्गोरिथम ==
== एल्गोरिथम ==


<अवधि शैली = रंग: नीला; > समारोह  आर्गन2
<span style="color:blue;">'''Function'''</span> Argon2
     <अवधि शैली = रंग: नीला; > इनपुट्स:
     <span style="color:blue;">'''Inputs:'''</span>
       पासवर्ड (पी): बाइट्स (0..2<sup>32</sup>-1) <span style= color:green; >पासवर्ड (या संदेश) को हैश किया जाना है</span>
       password ('''P'''):       Bytes (0..2<sup>32</sup>-1)   <span style="color:green;">Password (or message) to be hashed</span>
       नमक (एस): बाइट्स (8..2<sup>32</sup>-1) <span style= color:green; > नमक (पासवर्ड हैशिंग के लिए अनुशंसित 16 बाइट्स)</span>
       salt ('''S'''):           Bytes (8..2<sup>32</sup>-1)   <span style="color:green;">Salt (16 bytes recommended for password hashing)</span>
       समांतरता (पी): संख्या (1..2<sup>24</sup>-1) <span style= color:green; >समानता की डिग्री (अर्थात थ्रेड्स की संख्या)</span>
       parallelism ('''p'''):   Number (1..2<sup>24</sup>-1)   <span style="color:green;">Degree of parallelism (i.e. number of threads)</span>
       टैगलेंथ (टी): संख्या (4..2<sup>32</sup>-1) <span style= color:green; >लौटाए गए बाइट्स की वांछित संख्या</span>
       tagLength ('''T'''):     Number (4..2<sup>32</sup>-1)   <span style="color:green;">Desired number of returned bytes</span>
       मेमोरीसाइजकेबी (एम): संख्या (8p..2<sup>32</sup>-1) <span style= color:green; >उपयोग की जाने वाली मेमोरी की मात्रा ([[किबिबाइट]] में)</span>
       memorySizeKB ('''m'''):   Number (8p..2<sup>32</sup>-1) <span style="color:green;">Amount of memory (in [[Kibibyte|kibibytes]]) to use</span>
       पुनरावृत्तियों (टी): संख्या (1..2<sup>32</sup>-1) <span style= color:green; >प्रदर्शन करने के लिए पुनरावृत्तियों की संख्या</span>
       iterations ('''t'''):     Number (1..2<sup>32</sup>-1)   <span style="color:green;">Number of iterations to perform</span>
       संस्करण (वी): संख्या (0x13)<sup>  </sup> <span style= color:green; >वर्तमान संस्करण 0x13 (19 दशमलव)</span> है
       version ('''v'''):       Number (0x13)<sup>  </sup>     <span style="color:green;">The current version is 0x13 (19 decimal)</span>
       कुंजी (के): बाइट्स (0..2<sup>32</sup>-1) <span style= color:green; >वैकल्पिक कुंजी (इरेटा: पीडीएफ 0..32 बाइट्स कहता है, आरएफसी 0..2 कहता है<sup>32</sup> बाइट्स)</span>
       key ('''K'''):           Bytes (0..2<sup>32</sup>-1)   <span style="color:green;">Optional key (Errata: PDF says 0..32 bytes, RFC says 0..2<sup>32</sup> bytes)</span>
       संबद्ध डेटा (एक्स): बाइट्स (0..2<sup>32</sup>-1) <span style= color:green; >वैकल्पिक स्वैच्छिक अतिरिक्त डेटा</span>
       associatedData ('''X'''): Bytes (0..2<sup>32</sup>-1)   <span style="color:green;">Optional arbitrary extra data</span>
       हैशटाइप (वाई): संख्या (0=आर्गन2d, 1=आर्गन2i, 2=आर्गन2id)
       hashType ('''y'''):       Number (0=Argon2d, 1=Argon2i, 2=Argon2id)
     <अवधि शैली = रंग: नीला; >आउटपुट:
     <span style="color:blue;">'''Output:'''</span>
       टैग: बाइट्स (टैग लंबाई)<sup>  </sup> <span style= color:green; >परिणामस्वरूप उत्पन्न बाइट, टैगलम्बाई बाइट लंबा</span>
       tag:               Bytes (tagLength)<sup>  </sup> <span style="color:green;">The resulting generated bytes, tagLength bytes long</span>
   
   
     <अवधि शैली = रंग: हरा; > प्रारंभिक 64-बाइट ब्लॉक एच उत्पन्न करें<sub>0</sub>.
     <span style="color:green;">''Generate initial 64-byte block H<sub>0</sub>.''
     सभी इनपुट मापदंडों को जोड़ा जाता है और अतिरिक्त एन्ट्रॉपी के स्रोत के रूप में इनपुट किया जाता है।
     All the input parameters are concatenated and input as a source of additional entropy.
     इरेटा: RFC का कहना है कि H<sub>0</sub> 64-बिट्स है; पीडीएफ कहते हैं एच<sub>0</sub> 64-बाइट है।
     Errata: RFC says H<sub>0</sub> is 64-bits; PDF says H<sub>0</sub> is 64-bytes.
     इरेटा: आरएफसी का कहना है कि हैश एच ^ है, पीडीएफ कहता है कि यह है (लेकिन दस्तावेज नहीं है कि क्या है)। यह वास्तव में ब्लेक2बी है।
     Errata: RFC says the Hash is H^, the PDF says it's ℋ (but doesn't document what is). It's actually Blake2b.
     वेरिएबल लेंथ आइटम्स को उनकी लंबाई के साथ 32-बिट लिट्ल-एंडियन इंटिजर के रूप में जोड़ा जाता है।
     Variable length items are prepended with their length as 32-bit little-endian integers.</span>
     बफर समांतरता टैग लंबाई स्मृति आकार केबी पुनरावृत्तियों संस्करण हैशटाइप
     buffer parallelism tagLength memorySizeKB iterations version hashType
           ∥ लंबाई (पासवर्ड) ∥ पासवर्ड
           ∥ Length(password)       Password
           ∥ लंबाई (नमक) ∥ नमक
           ∥ Length(salt)           salt
           ∥ लंबाई (कुंजी) ∥ कुंजी
           ∥ Length(key)           key
           ∥ लंबाई (एसोसिएटेड डेटा) ∥ संबद्ध डेटा
           ∥ Length(associatedData) ∥ associatedData
     एच<sub>0</sub> ← ब्लेक2बी(बफर, 64) <विस्तार शैली= रंग:हरा; > // ब्लेक2बी का डिफ़ॉल्ट हैश आकार 64-बाइट्स है
     H<sub>0</sub> ← Blake2b(buffer, 64) <span style="color:green;">''//default hash size of Blake2b is 64-bytes''</span>
   
   
     <अवधि शैली = रंग: हरा; > मेमोरीसाइज़केबी को 4*समानांतर किबिबाइट के निकटतम गुणक में राउंड डाउन करके 1 KB ब्लॉक की संख्या की गणना करें
     <span style="color:green;">Calculate number of 1&nbsp;KB blocks by rounding down memorySizeKB to the nearest multiple of 4*parallelism [[Kibibyte|kibibytes]]</span>
     ब्लॉककाउंट फ्लोर (मेमोरी साइजकेबी, 4*पैरेललिज्म)
     blockCount Floor(memorySizeKB, 4*parallelism)
   
   
     <अवधि शैली = रंग: हरा; >1 KiB ब्लॉक की द्वि-आयामी सरणी आवंटित करें (समानता पंक्तियां x कॉलमकाउंट कॉलम)
     <span style="color:green;">Allocate two-dimensional array of 1&nbsp;KiB blocks (parallelism rows x columnCount columns)</span>
     कॉलमकाउंट ब्लॉककाउंट / समांतरता; <अवधि शैली = रंग: हरा; >// RFC में, columnCount को 'q' कहा जाता है
     columnCount blockCount / parallelism;   <span style="color:green;">//In the RFC, columnCount is referred to as '''q'''</span>
   
   
     <अवधि शैली = रंग: हरा; > प्रत्येक लेन (यानी पंक्ति) के पहले और दूसरे ब्लॉक (यानी कॉलम शून्य और एक) की गणना करें
     <span style="color:green;">Compute the first and second block (i.e. column zero and one ) of each lane (i.e. row)</span>
     'के लिए' मैं ← 0 'से' समानता -1 'करो' <विस्तार शैली = रंग: हरा; >प्रत्येक पंक्ति के लिए
     '''for''' i ← 0 '''to''' parallelism-1 '''do''' <span style="color:green;">for each row</span>
       बी<sub>i</sub>[0] ← हैश (एच<sub>0</sub> ∥ 0 ∥ i, 1024) <span style= color:green; >//1024-बाइट डाइजेस्ट</span> जनरेट करें
       B<sub>i</sub>[0] ← Hash(H<sub>0</sub> ∥ 0 ∥ i, 1024) <span style="color:green;">''//Generate a 1024-byte digest''</span>
       बी<sub>i</sub>[1] ← हैश (एच<sub>0</sub> ∥ 1 ∥ i, 1024) <span style= color:green; >//1024-बाइट डाइजेस्ट</span> जनरेट करें
       B<sub>i</sub>[1] ← Hash(H<sub>0</sub> ∥ 1 ∥ i, 1024) <span style="color:green;">''//Generate a 1024-byte digest''</span>
   
   
     <अवधि शैली = रंग: हरा; >प्रत्येक लेन के शेष स्तंभों की गणना करें
     <span style="color:green;">Compute remaining columns of each lane</span>
     'के लिए' मैं ← 0 'से' समानता -1 'करो' <विस्तार शैली = रंग: हरा; >//प्रत्येक पंक्ति के लिए
     '''for''' i ← 0 '''to''' parallelism-1 '''do''' <span style="color:green;">//for each row</span>
       'for' j ← 2 'to' columnCount-1 'do' <span style= color:green; >//बाद के हर कॉलम के लिए</span>
       '''for''' j ← 2 '''to''' columnCount-1 '''do''' <span style="color:green;">//for each subsequent column</span>
           <अवधि शैली = रंग: हरा; >//i' और j' इंडेक्स निर्भर करते हैं यदि यह आर्गन2i, आर्गन2d, या आर्गन2id है (अनुभाग 3.4 देखें)
           <span style="color:green;">//i' and j' indexes depend if it's Argon2i, Argon2d, or Argon2id (See section 3.4)</span>
           i′, j′ ← GetBlockIndexes(i, j) <span style= color:green; >//GetBlockIndexes फ़ंक्शन परिभाषित नहीं है</span>
           i′, j′ ← GetBlockIndexes(i, j) <span style="color:green;">//the GetBlockIndexes function is not defined</span>
           बी<sub>i</sub>[जे] = जी (बी<sub>i</sub>[जे-1], बी<sub>i′</sub>[जे']) <विस्तार शैली = रंग: हरा; >//G हैश फ़ंक्शन परिभाषित नहीं है
           B<sub>i</sub>[j] = G(B<sub>i</sub>[j-1], B<sub>i′</sub>[j′]) <span style="color:green;">//the G hash function is not defined</span>
   
   
     <अवधि शैली = रंग: हरा; > पुनरावृति > 1 होने पर और पास हो जाता है
     <span style="color:green;">Further passes when iterations > 1</span>
     nIteration के लिए ← 2 पुनरावृत्तियों के लिए करते हैं
     '''for''' nIteration ← 2 '''to''' iterations '''do'''
       for i ← 0 to Parallelism-1 do <span style= color:green; >प्रत्येक पंक्ति के लिए</span>
       '''for''' i ← 0 '''to''' parallelism-1 '''do''' <span style="color:green;">for each row</span>
         j ← 0 के लिए columnCount-1 do <span style= color:green; >//बाद के हर कॉलम के लिए</span>
         '''for''' j ← 0 '''to''' columnCount-1 '''do''' <span style="color:green;">//for each subsequent column</span>
             <अवधि शैली = रंग: हरा; >//i' और j' इंडेक्स निर्भर करते हैं यदि यह आर्गन2i, आर्गन2d, या आर्गन2id है (अनुभाग 3.4 देखें)
             <span style="color:green;">//i' and j' indexes depend if it's Argon2i, Argon2d, or Argon2id (See section 3.4)</span>
             i′, j′ ← GetBlockIndexes(i, j)
             i′, j′ ← GetBlockIndexes(i, j)
             अगर जे == 0 तो
             '''if''' j == 0 '''then'''
               बी<sub>i</sub>[0] = बी<sub>i</sub>[0] एक्सोर जी (बी<sub>i</sub>[स्तंभ संख्या-1], बी<sub>i′</sub>[जे'])
               B<sub>i</sub>[0] = B<sub>i</sub>[0] xor G(B<sub>i</sub>[columnCount-1], B<sub>i′</sub>[j′])
             अन्य
             '''else'''
               बी<sub>i</sub>[जे] = बी<sub>i</sub>[जे] एक्सोर जी (बी<sub>i</sub>[जे-1], बी<sub>i′</sub>[जे'])
               B<sub>i</sub>[j] = B<sub>i</sub>[j] xor G(B<sub>i</sub>[j-1], B<sub>i′</sub>[j′])
   
   
     <अवधि शैली = रंग: हरा; > प्रत्येक पंक्ति के अंतिम कॉलम के XOR के रूप में अंतिम ब्लॉक C की गणना करें
     <span style="color:green;">Compute final block '''C''' as the XOR of the last column of each row</span>
     सी बी<sub>0</sub>[स्तंभ संख्या-1]
     C B<sub>0</sub>[columnCount-1]
     for i ← 1 to Parallelism-1 do
     '''for''' i ← 1 '''to''' parallelism-1 '''do'''
       सी सी एक्सोर बी<sub>i</sub>[स्तंभ संख्या-1]
       C C '''xor''' B<sub>i</sub>[columnCount-1]
   
   
     <अवधि शैली = रंग: हरा; > गणना आउटपुट टैग
     <span style="color:green;">Compute output tag</span>
     वापसी हैश (सी, टैग लम्बाई)
     '''return''' Hash(C, tagLength)


=== चर-लंबाई हैश फ़ंक्शन ===
=== Variable-length hash function ===


आर्गन2 एक हैश फ़ंक्शन का उपयोग करता है जो 2<sup>32</sup> तक डाइजेस्ट उत्पन्न करने में सक्षम है बाइट लंबा। यह हैश फ़ंक्शन आंतरिक रूप से [[ब्लेक 2]] पर बनाया गया है।
Argon2 makes use of a hash function capable of producing digests up to 2<sup>32</sup> bytes long. This hash function is internally built upon [[Blake2]].


  <अवधि शैली = रंग: नीला; >फ़ंक्शन हैश (संदेश, डाइजेस्ट आकार)
  <span style="color:blue;">'''Function'''</span> Hash(message, digestSize)
     <अवधि शैली = रंग: नीला; > इनपुट्स:
     <span style="color:blue;">'''Inputs:'''</span>
       संदेश: बाइट्स (0..2<sup>32</sup>-1) <span style= color:green; >संदेश हैश किया जाना है</span>
       message:         Bytes (0..2<sup>32</sup>-1)     <span style="color:green;">Message to be hashed</span>
       डाइजेस्टसाइज: पूर्णांक (1..2<sup>32</sup>) <span style= color:green; > लौटाई जाने वाली बाइट की वांछित संख्या</span>
       digestSize:     Integer (1..2<sup>32</sup>)     <span style="color:green;">Desired number of bytes to be returned</span>
     <अवधि शैली = रंग: नीला; >आउटपुट:
     <span style="color:blue;">Output:</span>
       डाइजेस्ट: बाइट्स (digestSize)<sup>  </sup> <span style= color:green; >परिणामस्वरूप उत्पन्न बाइट्स, डाइजेस्टसाइज़ बाइट्स लंबी</span>
       digest:         Bytes (digestSize)<sup>  </sup> <span style="color:green;">The resulting generated bytes, digestSize bytes long</span>
   
   
     <अवधि शैली = रंग: हरा; > हैश एक चर-लंबाई वाला हैश फ़ंक्शन है, जिसे ब्लेक2बी का उपयोग करके बनाया गया है, जो उत्पन्न करने में सक्षम है
     <span style="color:green;">'''Hash''' is a variable-length hash function, built using Blake2b, capable of generating
     2 तक पचता है<sup>32</sup> बाइट।
     digests up to 2<sup>32</sup> bytes.</span>
   
   
     <अवधि शैली = रंग: हरा; > यदि अनुरोधित डाइजेस्ट आकार 64-बाइट या उससे कम है, तो हम सीधे ब्लेक2बी का उपयोग करते हैं
     <span style="color:green;">If the requested digestSize is 64-bytes or lower, then we use Blake2b directly</span>
     if (digestSize <= 64) तब
     '''if''' (digestSize <= 64) '''then'''
       वापसी Blake2b(digestSize ∥ message, डाइजेस्टसाइज़) <span style= color:green; >//संदेश बाइट्स के साथ 32-बिट छोटे एंडियन डाइजेस्ट आकार को संयोजित करें</span>
       '''return''' Blake2b(digestSize ∥ message, digestSize) <span style="color:green;">//concatenate 32-bit little endian digestSize with the message bytes</span>
   
   
     <अवधि शैली = रंग: हरा; > 64-बाइट्स से अधिक वांछित हैश के लिए (उदाहरण के लिए आर्गन2 ब्लॉक के लिए 1024 बाइट्स),
     <span style="color:green;">For desired hashes over 64-bytes (e.g. 1024 bytes for Argon2 blocks),
     हम आवश्यक 64-बाइट ब्लॉकों की दोगुनी संख्या उत्पन्न करने के लिए ब्लेक2बी का उपयोग करते हैं,
     we use Blake2b to generate twice the number of needed 64-byte blocks,
     और उसके बाद प्रत्येक ब्लॉक से केवल 32-बाइट का उपयोग करें
     and then only use 32-bytes from each block</span>
   
   
     <अवधि शैली = रंग: हरा; > पूरे ब्लॉक की संख्या की गणना करें (यह जानते हुए कि हम प्रत्येक से केवल 32-बाइट का उपयोग करने जा रहे हैं)
     <span style="color:green;">Calculate the number of whole blocks (knowing we're only going to use 32-bytes from each)</span>
     आर सील (डाइजेस्ट साइज/32)-2;
     r Ceil(digestSize/32)-2;
   
   
     <अवधि शैली = रंग: हरा; > संपूर्ण ब्लॉक उत्पन्न करें।
     <span style="color:green;">Generate r whole blocks.</span>
     <अवधि शैली = रंग: हरा; >प्रारंभिक ब्लॉक संदेश से उत्पन्न होता है
     <span style="color:green;">Initial block is generated from message</span>
     वी<sub>1</sub> ← ब्लेक2बी (डाइजेस्टसाइज संदेश, 64);
     V<sub>1</sub> ← Blake2b(digestSize message, 64);
     <अवधि शैली = रंग: हरा; > बाद के ब्लॉक पिछले ब्लॉकों से उत्पन्न होते हैं
     <span style="color:green;">Subsequent blocks are generated from previous blocks</span>
     मैं ← 2 से आर करने के लिए
     '''for''' i ← 2 '''to''' r '''do'''
       वी<sub>i</sub> ← ब्लेक2बी (वी<sub>i-1</sub>, 64)
       V<sub>i</sub> ← Blake2b(V<sub>i-1</sub>, 64)
     <अवधि शैली = रंग: हरा; >अंतिम (संभवतः आंशिक) ब्लॉक उत्पन्न करें
     <span style="color:green;">Generate the final (possibly partial) block</span>
     partialBytesNeeded ← डाइजेस्टसाइज़ - 32*r;
     partialBytesNeeded ← digestSize – 32*r;
     वी<sub>r+1</sub> ← ब्लेक2बी (वी<sub>r</sub>, आंशिक बाइट्स की जरूरत है)
     V<sub>r+1</sub> ← Blake2b(V<sub>r</sub>, partialBytesNeeded)
   
   
     <अवधि शैली = रंग: हरा; > प्रत्येक ब्लॉक V के पहले 32-बाइट्स को सम्‍मिलित करें<sub>i</sub>
     <span style="color:green;">Concatenate the first 32-bytes of each block V<sub>i</sub>
(संभवतः आंशिक अंतिम ब्लॉक को छोड़कर, जिसे हम पूरी चीज़ लेते हैं)</span>
    (except the possibly partial last block, which we take the whole thing)</span>
     <अवधि शैली = रंग: हरा; > चलो ए<sub>i</sub> ब्लॉक वी के निचले 32-बाइट्स का प्रतिनिधित्व करें<sub>i</sub></अवधि>
     <span style="color:green;">Let A<sub>i</sub> represent the lower 32-bytes of block V<sub>i</sub></span>
     वापसी ए<sub>1</sub> ∥ <sub>2</sub> ∥ ... ∥ <sub>r</sub> ∥ वी<sub>r+1</sub>
     '''return''' A<sub>1</sub> ∥ A<sub>2</sub> ∥ ... ∥ A<sub>r</sub> ∥ V<sub>r+1</sub>
 
[[Category:Collapse templates]]
[[Category:Created On 11/05/2023]]
[[Category:Machine Translated Page]]
[[Category:Navigational boxes| ]]
[[Category:Navigational boxes without horizontal lists]]
[[Category:Pages with script errors]]
[[Category:Short description with empty Wikidata description]]
[[Category:Sidebars with styles needing conversion]]
[[Category:Template documentation pages|Documentation/doc]]
[[Category:Templates Vigyan Ready]]
 
== संदर्भ ==
== संदर्भ ==
{{reflist}}
{{reflist}}

Revision as of 11:44, 30 May 2023

आर्गन2 एक प्रमुख व्युत्पत्ति कार्य है जिसे 2015 पासवर्ड हैशिंग प्रतियोगिता के विजेता के रूप में चुना गया था।[1][2] यह