πŸ“’ Too many exams? Don’t know which one suits you best? Book Your Free Expert πŸ‘‰ call Now!

  • google app store apple app store
  • βœ–

      Question

      What is a 'hash function' in cryptography and what

      property makes it suitable for password storage?
      A A function that encrypts data and can be reversed using a decryption key β€” suitable because of its reversibility Correct Answer Incorrect Answer
      B A function that converts input data of any size into a fixed-size output and is irreversible β€” suitable because the original password cannot be derived from the hash Correct Answer Incorrect Answer
      C A function that compresses data for efficient storage β€” suitable for its space efficiency as compressed data takes up less space Correct Answer Incorrect Answer
      D A function that generates random encryption keys β€” suitable for its unpredictability Correct Answer Incorrect Answer
      E A function that sorts data alphabetically β€” suitable for quick password lookup Correct Answer Incorrect Answer

      Solution

      Hash functions (SHA-256, bcrypt, Argon2) produce a fixed-length digest from any input. They are deterministic (same input β†’ same hash), one-way (cannot reverse the hash to get the password), and have avalanche effect (tiny input change β†’ completely different hash). Databases store password hashes, not plain text β€” if the database is breached, attackers cannot recover passwords. Salt (random string added before hashing) prevents rainbow table attacks.

      Practice Next

      Relevant for Exams:

      ask-question