Cryptographic Hash Functions: One-Way Property, Collision Resistance Notes in Hindi & English : क्रिप्टोग्राफिक हैश फंक्शन्स: वन-वे प्रॉपर्टी और कोलिजन रेजिस्टेंस और 20 महत्वपूर्ण MCQ प्रश्न (Rajasthan IT Exam)

Post a Comment

PGDCA, BCA, B-Tech, MCA, M-Tech, B.Sc computer science राजस्थान सूचना सहायक व कंप्यूटर शिक्षक विशेष नोट्स: इस अध्याय में हम Cryptographic Hash Functions: One-Way Property, Collision Resistance (क्रिप्टोग्राफिक हैश फंक्शन्स: वन-वे प्रॉपर्टी और कोलिजन रेजिस्टेंस) की संपूर्ण थ्योरी, मुख्य तकनीकी बिंदु, तुलनात्मक तालिका और विगत परीक्षाओं के पैटर्न पर आधारित 20 अति-महत्वपूर्ण बहुविकल्पीय प्रश्न (MCQs) विस्तृत हिंदी व अंग्रेजी व्याख्या सहित पढ़ेंगे।

Overview: Cryptographic hash functions deterministically map arbitrary-length input data into a fixed-length digest, enforcing pre-image resistance, second pre-image resistance, and collision resistance for integrity verification.

अध्याय सार: क्रिप्टोग्राफिक हैश फंक्शन्स किसी भी आकार के इनपुट डेटा को एक निश्चित लंबाई के अद्वितीय डाइजेस्ट में बदलते हैं, और डेटा अखंडता सुनिश्चित करने के लिए प्री-इमेज, सेकंड प्री-इमेज तथा कोलिजन रेजिस्टेंस प्रदान करते हैं।

Cryptographic Hash Functions: One-Way Property, Collision Resistance: Detailed Notes & Architecture (क्रिप्टोग्राफिक हैश फंक्शन्स: वन-वे प्रॉपर्टी और कोलिजन रेजिस्टेंस)

1. Deterministic Fixed-Length Compression & Keyless Nature (निश्चित लंबाई कम्प्रेशन और कुंजी-रहित प्रकृति)

[EN] Unlike symmetric or asymmetric encryption, a pure cryptographic hash function uses NO secret key and is strictly one-way (non-invertible). Whether the input is a 1-byte character or a 10 GB ISO image, SHA-256 always outputs an identical 256-bit (64 hex character) fingerprint for identical bytes. Because an infinite input domain compresses into a finite output range (2^n digests), collisions mathematically exist by the Pigeonhole Principle, though finding one must remain computationally infeasible.

[HI] एन्क्रिप्शन के विपरीत, एक शुद्ध क्रिप्टोग्राफिक हैश फंक्शन में कोई गुप्त कुंजी नहीं होती और इसे उलटकर मूल डेटा वापस नहीं निकाला जा सकता। चाहे इनपुट 1 अक्षर का हो या 10 GB की फाइल, SHA-256 हमेशा निश्चित 256 बिट (64 हेक्सा अक्षर) का ही आउटपुट देता है। पिजनहोल सिद्धांत के कारण कोलिजन गणितीय रूप से अस्तित्व में होते हैं, पर उन्हें खोजना व्यावहारिक रूप से असंभव होना चाहिए।

2. Three Formal Security Properties (तीन प्रमुख सुरक्षा गुणधर्म)

[EN] Every secure cryptographic hash satisfies three criteria: (1) Pre-image Resistance (One-Wayness): given digest h, finding any input m with H(m) = h takes ~2^n work; (2) Second Pre-image Resistance (Weak Collision): given input m1, finding a distinct m2 with H(m2) = H(m1) takes ~2^n work; and (3) Collision Resistance (Strong Collision): finding ANY two distinct inputs m1 != m2 where H(m1) = H(m2) takes ~2^(n/2) work due to the Birthday Paradox.

[HI] मजबूत हैश के तीन अनिवार्य गुण हैं: (1) प्री-इमेज रेजिस्टेंस (वन-वे): दिए गए हैश h से मूल संदेश m खोजना (~2^n प्रयास); (2) सेकंड प्री-इमेज रेजिस्टेंस: किसी ज्ञात संदेश m1 के बराबर हैश वाला दूसरा संदेश m2 खोजना (~2^n प्रयास); तथा (3) कोलिजन रेजिस्टेंस: कोई भी दो अलग संदेश m1 व m2 ढूंढना जिनका हैश समान हो (~2^(n/2) प्रयास)।

3. Avalanche Effect & Birthday Paradox Security Bounds (एवलांच इफेक्ट और बर्थडे पैराडॉक्स सीमा)

[EN] The Avalanche Effect dictates that flipping a single bit in the input completely scrambles the output so roughly 50% of all digest bits change unpredictably, preventing attackers from inferring input similarity. Under the Birthday Attack, an n-bit hash offers only n/2 bits of collision security: a 128-bit digest reaches 50% collision probability in ~2^64 evaluations (too weak today), whereas a 256-bit digest demands ~2^128 evaluations.

[HI] एवलांच इफेक्ट के अनुसार इनपुट में मात्र एक बिट बदलने पर आउटपुट हैश के लगभग 50% बिट पूरी तरह बदल जाते हैं। बर्थडे पैराडॉक्स हमले के कारण n-बिट हैश केवल n/2 बिट की कोलिजन सुरक्षा देता है—अर्थात 128-बिट हैश पर 2^64 प्रयासों में ही टकराव मिल सकता है, जबकि 256-बिट हैश पर 2^128 प्रयास लगते हैं।

4. Integrity, Password Hashing (KDFs) & HMAC Authentication (अखंडता जांच, पासवर्ड हैशिंग और HMAC प्रमाणीकरण)

[EN] Hashes verify software downloads, Git commit trees, and blockchain Merkle trees, yet bare fast hashes (MD5/SHA-256) must NEVER store passwords because GPUs compute billions of hashes per second against rainbow tables or brute force. Passwords require salted, memory-hard slow Key Derivation Functions such as Argon2id, bcrypt, or PBKDF2. Similarly, authenticating network messages requires HMAC: H((K' XOR opad) || H((K' XOR ipad) || m)), stopping length-extension attacks.

[HI] फाइल अखंडता व ब्लॉकचेन मर्कल ट्री में सामान्य हैश उपयोगी हैं, परंतु पासवर्ड संग्रहण के लिए तेज SHA-256 का सीधे उपयोग खतरनाक है—इसके लिए सॉल्ट (Salt) के साथ धीमे और मेमोरी-हार्ड Argon2id या bcrypt का उपयोग अनिवार्य है। नेटवर्क संदेश प्रमाणीकरण के लिए HMAC प्रयुक्त होता है जो लेंथ-एक्सटेंशन हमलों को रोकता है।

Syntax, Formula & Technical Example (Cryptographic Hash Functions: One-Way Property, Collision Resistance)

# Python hashlib: Avalanche Effect & Birthday Bound Reference
import hashlib, hmac
h1 = hashlib.sha256(b"Computersir").hexdigest()   # 256 bits = 64 hex chars
h2 = hashlib.sha256(b"computersir").hexdigest()   # 1 bit flipped ('C'->'c') -> ~50% bits change
# HMAC-SHA256: H((K' XOR opad) || H((K' XOR ipad) || message))
tag = hmac.new(b"shared-secret-key", b"Transfer Rs 5000", hashlib.sha256).hexdigest()
# Security Bounds for n-bit Hash:
#   Pre-image / 2nd Pre-image complexity = 2^n      (SHA-256 -> 2^256)
#   Collision complexity (Birthday Bound) = 2^(n/2) (SHA-256 -> 2^128)

Cryptographic Hash Functions: One-Way Property, Collision Resistance Quick Reference & Comparison Table

Hash Property / ConstructFormal Mathematical GuaranteeAttack Complexity & Exam Note
Pre-image ResistanceGiven h, cannot find any m with H(m) = hRequires ~2^n work (also called One-Way Property)
Second Pre-image ResistanceGiven m1, cannot find m2 != m1 with H(m2) = H(m1)Requires ~2^n work against target document forgery
Collision ResistanceCannot find any pair m1 != m2 where H(m1) = H(m2)Limited by Birthday Paradox to ~2^(n/2) evaluations
HMAC (RFC 2104)Two-pass keyed hash H((K' XOR opad) || H((K' XOR ipad) || m))Prevents length-extension attacks on Merkle-Damgard hashes

Cryptographic Hash Functions: One-Way Property, Collision Resistance Top 20 Bilingual MCQs with Answers

Q1. Why can a cryptographic hash NEVER be reversed back to recover the original file (even if you have the hash output)?

(आउटपुट हैश उपलब्ध होने पर भी क्रिप्टोग्राफिक हैश से मूल फाइल को वापस डिक्रिप्ट क्यों नहीं किया जा सकता?)

(A) Because hashes are encrypted with a hidden AES-256 key

(B) Hash functions are one-way lossy compression mappings from infinite inputs to fixed bits

(C) Because SHA-256 automatically deletes the input file

(D) Because hashes are stored inside read-only BIOS registers

Correct Answer: (B)

[EN] Arbitrarily long inputs collapse into a fixed number of bits (e.g., 256 bits), discarding information irreversibly unlike symmetric/asymmetric encryption.

[HI] हैश फंक्शन असीमित आकार के इनपुट को निश्चित छोटे बिट्स में संकुचित करते हैं जिससे मूल जानकारी नष्ट हो जाती है और इसे उलटा नहीं जा सकता।

Q2. According to the Birthday Paradox, approximately how many hash computations are needed to find ANY collision for an ideal n-bit cryptographic hash?

(बर्थडे पैराडॉक्स के अनुसार एक आदर्श n-बिट क्रिप्टोग्राफिक हैश में कोई भी कोलिजन खोजने के लिए लगभग कितने प्रयास लगते हैं?)

(A) 2^(n-1) evaluations

(B) 2^n evaluations

(C) n^2 evaluations

(D) 2^(n/2) evaluations

Correct Answer: (D)

[EN] Due to the square-root birthday bound across pairs of outputs, collision resistance provides only half the bit length (n/2 bits) of security.

[HI] बर्थडे पैराडॉक्स के कारण कोलिजन प्रतिरोध कुंजी की आधी बिट लंबाई अर्थात 2^(n/2) प्रयासों तक सीमित होता है।

Q3. What does 'Avalanche Effect' mean for a cryptographic hash function?

(क्रिप्टोग्राफिक हैश फंक्शन में 'एवलांच इफेक्ट' (Avalanche Effect) का क्या अर्थ है?)

(A) Two similar passwords produce nearly identical hashes

(B) Hash speed slows down exponentially for big files

(C) The digest size doubles every time a character is added

(D) Changing a single input bit alters approximately 50% of the output digest bits

Correct Answer: (D)

[EN] Strong avalanche diffusion ensures attackers cannot see statistical patterns between nearly identical plaintexts such as 'pass1' and 'pass2'.

[HI] एवलांच इफेक्ट का मतलब है कि इनपुट में 1 बिट का भी बदलाव करने पर आउटपुट के लगभग 50% बिट्स अप्रत्याशित रूप से बदल जाते हैं।

Q4. Which property specifically guarantees that given an already signed contract m1, an attacker cannot create a second fake contract m2 producing the same digest H(m1)?

(पहले से साइन किए गए अनुबंध m1 को देखकर हमलावर समान हैश वाला दूसरा नकली अनुबंध m2 न बना सके—यह कौन सा गुण सुनिश्चित करता है?)

(A) OAEP Padding

(B) Zero-Knowledge Proof

(C) Second Pre-image Resistance (Weak Collision Resistance)

(D) Symmetric Diffusion

Correct Answer: (C)

[EN] Second pre-image resistance prevents an attacker from crafting an alternative message matching a fixed known document's hash.

[HI] सेकंड प्री-इमेज रेजिस्टेंस यह रोकता है कि किसी ज्ञात दस्तावेज़ m1 के समान हैश वाला कोई दूसरा जाली दस्तावेज़ m2 तैयार किया जा सके।

Q5. Why do security standards forbid storing user passwords with plain, unsalted SHA-256?

(सुरक्षा मानकों में बिना सॉल्ट वाले तेज़ SHA-256 द्वारा यूज़र पासवर्ड स्टोर करने से मना क्यों किया जाता है?)

(A) SHA-256 runs too fast on GPUs/ASICs, enabling billions of guesses per second and rainbow-table lookups

(B) SHA-256 cannot hash special characters like '@'

(C) SHA-256 is reversible with a public key

(D) SHA-256 outputs vary in length for different passwords

Correct Answer: (A)

[EN] GPUs compute tens of billions of SHA-256 hashes/sec; password storage requires unique per-user salts plus slow memory-hard functions like Argon2id or bcrypt.

[HI] SHA-256 बहुत तेज़ होने से आधुनिक GPU सेकंडों में अरबों पासवर्ड आज़मा सकते हैं; इसलिए पासवर्ड हेतु सॉल्ट व धीमे Argon2id/bcrypt चाहिए।

Q6. What fundamental mathematical theorem guarantees that collisions MUST exist for every hash function mapping arbitrary files to 256 bits?

(किस गणितीय सिद्धांत के कारण अनंत संभावित फाइलों को 256-बिट आउटपुट में मैप करने वाले प्रत्येक हैश में कोलिजन का अस्तित्व निश्चित होता है?)

(A) Fermat's Last Theorem

(B) Chinese Remainder Theorem

(C) The Pigeonhole Principle

(D) Bayes' Theorem

Correct Answer: (C)

[EN] Because there are infinitely many possible inputs and at most 2^256 distinct outputs, multiple inputs necessarily map to the same digest—though finding them must be infeasible.

[HI] इनपुट की संख्या अनंत है जबकि आउटपुट केवल 2^256 तक सीमित हैं, अतः पिजनहोल सिद्धांत के अनुसार समान हैश वाले जोड़े निश्चित रूप से मौजूद होते हैं।

Q7. How does adding a unique random 'Salt' per user protect hashed password databases?

(प्रत्येक उपयोगकर्ता के पासवर्ड के साथ अलग रैंडम 'सॉल्ट' (Salt) जोड़ने से डेटाबेस कैसे सुरक्षित होता है?)

(A) Identical passwords produce completely different hashes, defeating precomputed Rainbow Tables

(B) It encrypts the database disk using AES-128

(C) It makes password hashing 100x faster

(D) It replaces the need for HTTPS logins

Correct Answer: (A)

[EN] Even if two users pick 'Password123', distinct salts force an attacker to crack each user's hash individually without reusable lookup tables.

[HI] सॉल्ट जोड़ने से एक जैसे पासवर्ड रखने वाले दो उपयोगकर्ताओं के हैश भी बिल्कुल अलग बनते हैं, जिससे पहले से बनी रेनबो टेबल बेकार हो जाती है।

Q8. Why is naively hashing secret || message vulnerable to a Length-Extension Attack on SHA-256, and what solves it?

(SHA-256 में केवल H(secret || message) उपयोग करना लेंथ-एक्सटेंशन हमले के प्रति कमजोर क्यों है और इसका समाधान क्या है?)

(A) Merkle-Damgard hashes let attackers append data using the output as internal state; HMAC solves it

(B) Because secret keys must be shorter than 8 bits; MD5 solves it

(C) Because SHA-256 pads with zero bytes only; Base64 solves it

(D) Because SHA-256 uses a 64-bit block; ECB solves it

Correct Answer: (A)

[EN] In Merkle-Damgard constructions (MD5, SHA-1, SHA-256), knowing H(K||M) lets an attacker append M' and compute H(K||M||pad||M') without knowing K; HMAC prevents this.

[HI] मर्कल-डैमगार्ड हैश में आउटपुट को ही आंतरिक स्टेट मानकर हमलावर आगे डेटा जोड़ सकता है; HMAC दो-पास कुंजी हैशिंग से इसे पूरी तरह रोकता है।

Q9. What is the required collision resistance work factor for an ideal 256-bit cryptographic hash function?

(एक आदर्श 256-बिट क्रिप्टोग्राफिक हैश फंक्शन में कोलिजन खोजने के लिए लगभग कितनी गणना की आवश्यकता होती है?)

(A) 2^256 operations

(B) 2^64 operations

(C) 2^512 operations

(D) 2^128 operations (128-bit collision security)

Correct Answer: (D)

[EN] Per the Birthday Paradox bound 2^(n/2), a 256-bit hash provides 256 / 2 = 128 bits of collision resistance.

[HI] बर्थडे बाउंड 2^(n/2) के अनुसार 256-बिट हैश में कोलिजन खोजने की जटिलता 2^128 ऑपरेशंस (128-बिट सुरक्षा) होती है।

Q10. Which password hashing algorithm won the 2015 Password Hashing Competition and is recommended by OWASP today?

(2015 की पासवर्ड हैशिंग प्रतियोगिता किसने जीती और वर्तमान में OWASP द्वारा पासवर्ड स्टोरेज के लिए किसे सर्वोत्तम माना जाता है?)

(A) CRC32 checksum

(B) Plain SHA-1

(C) Argon2id (memory-hard key derivation function)

(D) MD5 with double iteration

Correct Answer: (C)

[EN] Argon2id resists both GPU/ASIC cracking (via configurable RAM hardness) and side-channel cache attacks.

[HI] Argon2id मेमोरी-हार्ड होने के कारण GPU व ASIC क्रैकिंग का मजबूती से विरोध करता है और वर्तमान OWASP अनुशंसित मानक है।

Q11. In blockchain and Git version control, how do Merkle Trees use cryptographic hashes?

(ब्लॉकचेन और Git वर्जन कंट्रोल सिस्टम में मर्कल ट्री (Merkle Tree) क्रिप्टोग्राफिक हैश का उपयोग कैसे करते हैं?)

(A) They assign IPv6 addresses to peers

(B) Leaf transaction hashes combine pairwise upward into a single Merkle Root guaranteeing tamper-proof verification

(C) They compress video frames using DCT

(D) They encrypt every block using RSA-2048

Correct Answer: (B)

[EN] Changing a single byte in any transaction alters its parent branch all the way up to the Merkle Root, enabling O(log N) inclusion proofs.

[HI] किसी भी एक ट्रांजैक्शन में बदलाव करने पर ऊपर के सभी पैरेंट हैश और अंतिम Merkle Root तुरंत बदल जाता है, जिससे O(log N) में सत्यापन संभव होता है।

Q12. Why is CRC32 (Cyclic Redundancy Check) NOT considered a cryptographic hash function?

(CRC32 (Cyclic Redundancy Check) को क्रिप्टोग्राफिक हैश फंक्शन क्यों नहीं माना जाता?)

(A) CRC32 outputs variable-length strings

(B) CRC32 takes too much CPU time on gigabyte files

(C) CRC32 requires a 2048-bit private key

(D) CRC32 is linear and trivial to reverse or deliberately forge colliding inputs (zero collision resistance)

Correct Answer: (D)

[EN] CRC32 detects accidental transmission bit errors using polynomial division mod 2, so an attacker can easily flip bits to match the exact same CRC32 value.

[HI] CRC32 केवल आकस्मिक नेटवर्क त्रुटियाँ पकड़ने के लिए है; यह रैखिक है जिससे हमलावर आसानी से मनचाहा डेटा बदलकर वही CRC32 मान प्राप्त कर सकता है।

Q13. Can a cryptographic hash function alone authenticate the sender of a message over an untrusted network if the hash is sent alongside plaintext?

(यदि असुरक्षित नेटवर्क पर प्लेनटेक्स्ट के साथ केवल उसका SHA-256 हैश भेजा जाए, तो क्या यह संदेश भेजने वाले की पहचान प्रमाणित कर सकता है?)

(A) Yes, because SHA-256 is mathematically one-way

(B) No; an attacker can modify both the plaintext and recompute the public SHA-256 hash

(C) Yes, if the hash length is 512 bits

(D) Yes, because attackers cannot run SHA-256

Correct Answer: (B)

[EN] Because anyone can run SHA-256 on altered data, authentication requires a shared secret (HMAC) or private-key Digital Signature.

[HI] नहीं; कोई भी हमलावर संदेश बदलकर नया सार्वजनिक SHA-256 हैश जोड़ सकता है। प्रमाणीकरण के लिए HMAC या डिजिटल सिग्नेचर आवश्यक है।

Q14. How many hexadecimal characters represent a 256-bit hash digest and a 512-bit hash digest respectively?

(क्रमशः 256-बिट और 512-बिट हैश डाइजेस्ट को हेक्साडेसिमल (Hex) रूप में लिखने पर कितने अक्षर (Characters) होते हैं?)

(A) 256 hex characters and 512 hex characters

(B) 32 hex characters and 64 hex characters

(C) 16 hex characters and 32 hex characters

(D) 64 hex characters and 128 hex characters

Correct Answer: (D)

[EN] Each hex digit encodes 4 bits: 256 / 4 = 64 hex characters, and 512 / 4 = 128 hex characters.

[HI] प्रत्येक हेक्स अक्षर 4 बिट दर्शाता है: इसलिए 256/4 = 64 और 512/4 = 128 हेक्साडेसिमल अक्षर बनते हैं।

Q15. In HMAC(K, m), why does the algorithm combine the key with two distinct constants, ipad (0x36) and opad (0x5c)?

(HMAC(K, m) में कुंजी को दो अलग-अलग स्थिरांकों ipad (0x36) और opad (0x5c) के साथ क्यों जोड़ा जाता है?)

(A) To convert UTF-8 text into ASCII uppercase

(B) To derive two independent inner and outer keys that eliminate length-extension vulnerabilities

(C) To double the output digest from 256 to 512 bits

(D) To make HMAC compatible with DES parity bits

Correct Answer: (B)

[EN] Nesting H(K_outer || H(K_inner || m)) hides the inner compression state so an attacker cannot extend the message.

[HI] ipad और opad से अलग-अलग आंतरिक व बाहरी कुंजियाँ बनाकर दो बार हैश करने से आंतरिक स्टेट छिप जाती है और लेंथ-एक्सटेंशन हमला विफल होता है।

Q16. Which statement about Cryptographic Hash Functions is FALSE?

(क्रिप्टोग्राफिक हैश फंक्शन्स के बारे में निम्नलिखित में से कौन सा कथन असत्य (FALSE) है?)

(A) Collision resistance is harder to uphold than pre-image resistance due to the Birthday Bound

(B) Two inputs of different lengths always produce digests of correspondingly different lengths

(C) Cryptographic hashes are deterministic for identical inputs

(D) Password hashing should use salted slow KDFs like Argon2id instead of raw SHA-256

Correct Answer: (B)

[EN] A defining property of cryptographic hashes is fixed-length output regardless of whether the input is 0 bytes or 100 gigabytes.

[HI] क्रिप्टोग्राफिक हैश में इनपुट की लंबाई कुछ भी हो, आउटपुट डाइजेस्ट हमेशा एक निश्चित लंबाई का ही रहता है।

Q17. Within Cryptographic Hash Functions: One-Way Property, Collision Resistance, which hash property / construct directly maps to: "Given h, cannot find any m with H(m) = h"?

(Cryptographic Hash Functions: One-Way Property, Collision Resistance में कौन सा Hash Property / Construct सीधे "Given h, cannot find any m with H(m) = h" से संबंधित है?)

(A) Pre-image Resistance

(B) Collision Resistance

(C) HMAC (RFC 2104)

(D) Second Pre-image Resistance

Correct Answer: (A)

[EN] In Cryptographic Hash Functions: One-Way Property, Collision Resistance, 'Pre-image Resistance' handles 'Given h, cannot find any m with H(m) = h' (Requires ~2^n work (also called One-Way Property)).

[HI] Cryptographic Hash Functions: One-Way Property, Collision Resistance में 'Pre-image Resistance' का कार्य/विवरण 'Given h, cannot find any m with H(m) = h' (Requires ~2^n work (also called One-Way Property)) है।

Q18. Which option accurately describes 'Second Pre-image Resistance' in Cryptographic Hash Functions: One-Way Property, Collision Resistance?

(Cryptographic Hash Functions: One-Way Property, Collision Resistance के संदर्भ में 'Second Pre-image Resistance' की सही विशेषता कौन सी है?)

(A) Given h, cannot find any m with H(m) = h

(B) Given m1, cannot find m2 != m1 with H(m2) = H(m1)

(C) Two-pass keyed hash H((K' XOR opad) || H((K' XOR ipad) || m))

(D) Cannot find any pair m1 != m2 where H(m1) = H(m2)

Correct Answer: (B)

[EN] 'Second Pre-image Resistance' provides 'Given m1, cannot find m2 != m1 with H(m2) = H(m1)' — key point: Requires ~2^n work against target document forgery.

[HI] 'Second Pre-image Resistance' का मुख्य विवरण 'Given m1, cannot find m2 != m1 with H(m2) = H(m1)' है (Requires ~2^n work against target document forgery)।

Q19. In Cryptographic Hash Functions: One-Way Property, Collision Resistance, identify the correct parameter for the specification: "Cannot find any pair m1 != m2 where H(m1) = H(m2)".

(Cryptographic Hash Functions: One-Way Property, Collision Resistance में "Cannot find any pair m1 != m2 where H(m1) = H(m2)" विवरण किस विकल्प के लिए सही है?)

(A) Second Pre-image Resistance

(B) HMAC (RFC 2104)

(C) Collision Resistance

(D) Pre-image Resistance

Correct Answer: (C)

[EN] 'Collision Resistance' corresponds to 'Cannot find any pair m1 != m2 where H(m1) = H(m2)' (Limited by Birthday Paradox to ~2^(n/2) evaluations).

[HI] 'Collision Resistance' का संबंध 'Cannot find any pair m1 != m2 where H(m1) = H(m2)' (Limited by Birthday Paradox to ~2^(n/2) evaluations) से है।

Q20. Considering Cryptographic Hash Functions: One-Way Property, Collision Resistance, what key behavior defines 'HMAC (RFC 2104)'?

(Cryptographic Hash Functions: One-Way Property, Collision Resistance में 'HMAC (RFC 2104)' की मुख्य भूमिका या मान क्या है?)

(A) Two-pass keyed hash H((K' XOR opad) || H((K' XOR ipad) || m))

(B) Given h, cannot find any m with H(m) = h

(C) Cannot find any pair m1 != m2 where H(m1) = H(m2)

(D) Given m1, cannot find m2 != m1 with H(m2) = H(m1)

Correct Answer: (A)

[EN] 'HMAC (RFC 2104)' represents 'Two-pass keyed hash H((K' XOR opad) || H((K' XOR ipad) || m))' (Prevents length-extension attacks on Merkle-Damgard hashes).

[HI] 'HMAC (RFC 2104)' का अर्थ/मान 'Two-pass keyed hash H((K' XOR opad) || H((K' XOR ipad) || m))' है (Prevents length-extension attacks on Merkle-Damgard hashes)।

Cryptographic Hash Functions: One-Way Property, Collision Resistance — Exam FAQs

Q1: What is the difference between encryption and hashing?

एन्क्रिप्शन और हैशिंग में मुख्य अंतर क्या है?

[EN] Encryption is two-way (reversible with the decryption key) to protect confidentiality, whereas hashing is strictly one-way (irreversible) to verify integrity and index data.

[HI] एन्क्रिप्शन दो-तरफ़ा होता है जिसे कुंजी से वापस डिक्रिप्ट किया जा सकता है (गोपनीयता हेतु), जबकि हैशिंग एक-तरफ़ा (अपरिवर्तनीय) प्रक्रिया है (अखंडता जांच हेतु)।

Q2: Why do hashes sometimes collide if they are supposed to be unique?

यदि हैश को अद्वितीय माना जाता है, तो उनमें कभी-कभी कोलिजन क्यों संभव होता है?

[EN] Because an infinite number of possible files map to a finite set of bit strings (like 2^256), collisions must theoretically exist—good hashes simply make finding any collision computationally impossible.

[HI] असीमित संभावित फाइलों को एक सीमित संख्या (जैसे 2^256) में बदलने के कारण कोलिजन सैद्धांतिक रूप से मौजूद होते हैं; मजबूत हैश इन्हें ढूंढना असंभव बनाते हैं।

Q3: When should I use HMAC instead of a regular SHA-256 hash?

सामान्य SHA-256 हैश के बजाय HMAC का उपयोग कब करना चाहिए?

[EN] Use regular SHA-256 to check accidental file corruption against a trusted checksum, and use HMAC whenever you must prove to a receiver that an authenticated sender sharing a secret key generated the digest.

[HI] फ़ाइल के आकस्मिक बदलाव जांचने के लिए SHA-256 पर्याप्त है, परंतु जब कुंजी द्वारा संदेश के स्रोत को प्रमाणित करना हो और टैम्परिंग रोकनी हो तो HMAC उपयोग करें।

Related Posts

  • Loading related posts...

Post a Comment

Search Topic Notes & 20 MCQs (Hindi / English)