danielkennedy1997
danielkennedy1997 May 31, 2026 • 20 views

Hashing Quiz: Test Your Knowledge of One-Way Functions

Hey everyone! 👋 Ready to put your computer science knowledge to the test? Hashing is super important in so many areas, from cybersecurity to data structures. This quiz will challenge what you know about one-way functions and their properties. Let's see if you can crack it! 🚀
💻 Computer Science & Technology
🪄

🚀 Can't Find Your Exact Topic?

Let our AI Worksheet Generator create custom study notes, online quizzes, and printable PDFs in seconds. 100% Free!

✨ Generate Custom Content

1 Answers

✅ Best Answer
User Avatar
herrera.lucas9 Mar 18, 2026

📚 Quick Study Guide: Hashing Fundamentals

  • ➡️ What is Hashing? Hashing is the process of converting an input (of any length) into a fixed-size string of bytes, typically a digest or hash value. This is done using a mathematical function called a hash function.
  • 🔑 One-Way Function: A crucial property of cryptographic hash functions is that they are 'one-way'. This means it's computationally infeasible to reverse the process and derive the original input data from the hash value.
  • 🛡️ Key Properties of Cryptographic Hash Functions:
    • 🚫 Pre-image Resistance: It's hard to find an input that hashes to a specific output.
    • Second Pre-image Resistance: Given an input and its hash, it's hard to find a *different* input that hashes to the *same* output.
    • 💥 Collision Resistance: It's hard to find two *different* inputs that hash to the *same* output. This is the strongest property.
  • 🔗 Applications: Hashing is used in data integrity checks, password storage (storing hashes instead of actual passwords), digital signatures, blockchain technology, and data structures like hash tables.
  • ⚙️ Common Algorithms:
    • 📉 MD5 (Message-Digest Algorithm 5): Produces a 128-bit hash value. Considered cryptographically broken due to known collision attacks.
    • 🔐 SHA (Secure Hash Algorithm) Family: Includes SHA-1 (160-bit, also considered weak), SHA-2 (SHA-256, SHA-512 – widely used and secure), and SHA-3 (Keccak – newer standard).
  • 💡 Hash Collisions: A collision occurs when two different inputs produce the same hash value. While unavoidable for any hash function mapping a larger input space to a smaller output space (due to the Pigeonhole Principle), strong hash functions make finding them computationally infeasible.
  • 🔢 Hash Function Formula (Conceptual): A hash function $H$ maps an input $M$ to a fixed-size hash value $h$: $h = H(M)$.

❓ Practice Quiz: Test Your Hashing Knowledge

Choose the best answer for each question.

  1. What is the primary characteristic of a cryptographic hash function?
    A. It can be easily reversed to retrieve the original data.
    B. It produces a variable-length output based on the input length.
    C. It is a one-way function, making it computationally infeasible to reverse.
    D. It encrypts data, ensuring confidentiality.
  2. Which of the following properties ensures that it is difficult to find two different inputs that produce the same hash output?
    A. Pre-image resistance
    B. Second pre-image resistance
    C. Collision resistance
    D. Deterministic output
  3. In which application is hashing commonly used to securely store user credentials?
    A. Encrypting email content before sending.
    B. Storing the plaintext password in a database.
    C. Generating a unique identifier for a user session.
    D. Storing a hash of the password instead of the password itself.
  4. Which hash algorithm is considered cryptographically broken due to known collision vulnerabilities?
    A. SHA-256
    B. SHA-3
    C. MD5
    D. SHA-512
  5. If a hash function produces the same output for two different inputs, what is this phenomenon called?
    A. Encryption failure
    B. Data corruption
    C. A collision
    D. A rainbow table attack
  6. Which of these is NOT a desirable property for a strong cryptographic hash function?
    A. Avalanche effect (a small change in input drastically changes the output)
    B. Deterministic (same input always produces same output)
    C. Reversibility (ability to reconstruct input from output)
    D. Fast computation (efficient to calculate the hash)
  7. Which principle explains why hash collisions are theoretically unavoidable for any hash function mapping a larger input space to a smaller output space?
    A. Turing Completeness
    B. The Birthday Paradox
    C. The Pigeonhole Principle
    D. Moore's Law
Click to see Answers

1. C
2. C
3. D
4. C
5. C
6. C
7. C

Join the discussion

Please log in to post your answer.

Log In

Earn 2 Points for answering. If your answer is selected as the best, you'll get +20 Points! 🚀