1. Home
  2. Explore
  3. Computer Science
  4. Securing Stored Passwords

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Securing Stored Passwords

  • 88Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Password Storage
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

Why is storing users’ passwords in plaintext dangerous?

Tap to flipClick to flipspace

If an attacker steals the database, they immediately obtain the users’ passwords and may use them in credential-stuffing attacks on other services.

Or swipe the card

88 cards

  1. Why is storing users’ passwords in plaintext dangerous?

    If an attacker steals the database, they immediately obtain the users’ passwords and may use them in credential-stuffing attacks on other services.

  2. What does hashing a password mean?

    Applying a hash function to the password to produce a hash value that can be stored instead of the password itself.

  3. What is a typical property of a cryptographic hash value?

    It is a fixed-length value that usually looks unlike the input and does not directly reveal the password.

  4. Why is hashing a password based only on its first letter a poor method?

    It reveals information about the password and gives the same result to many passwords beginning with the same letter.

  5. What should a password database store when passwords are properly hashed?

    Each user’s username and the hash of their password, rather than the password itself.

  6. What happens to a password during account registration in a properly hashed system?

    The server hashes the submitted password, stores the username and hash, and discards the plaintext password.

  7. How does a server check a password during login if it stores only a hash?

    It hashes the submitted password using the same process and compares the resulting hash with the stored hash.

  8. What does it mean to call a password hash function “one-way”?

    It is designed to be easy to compute from an input but not to reliably recover the original input from the hash.

  9. Why can different inputs produce the same hash value?

    A hash function maps a very large input space to a finite set of fixed-length outputs, so some inputs must share an output.

  10. What is a collision in password hashing?

    A collision occurs when two different inputs produce the same hash value.

  11. What is a salt in password hashing?

    An additional value combined with a password as input to the hash function.

  12. How should salts generally be chosen for users?

    The system should generate a different random salt for each user.

  13. Must a password salt be kept secret, and where can it be stored?

    No. It need not be secret and can be stored with the hash, including as part of the stored hash value.

  14. How does a server use a stored salt to verify a salted password?

    It retrieves the salt associated with the user, hashes the submitted password with that salt, and compares the result with the stored hash.

  15. What does NIST recommend for storing memorized secrets such as passwords?

    Salt and hash them with a suitable one-way key derivation function that makes each offline guessing attempt expensive.

  16. What evidence suggests that a website may be storing a password insecurely?

    It can email the original password to the user.

  17. Why is password reuse dangerous after a service is breached?

    Attackers may try the stolen username and password on other websites and apps, an attack known as credential stuffing.

  18. How can an attacker use a dictionary attack against stolen password hashes?

    Hash likely passwords from a word list and compare those hashes with the stolen hashes.

  19. How does a brute-force attack attempt to find a password?

    It systematically tries possible passwords, hashes each one, and compares the results with the stolen hash.

  20. What is a rainbow table?

    A precomputed collection of candidate passwords and their hash values that an attacker can compare with stolen hashes.

  21. How does salting limit the usefulness of precomputed password-hash tables?

    A table computed without the user’s salt will not directly match the salted hash; candidates must be computed using the relevant salt.

  22. What can identical password hashes reveal when a database has no distinct salts?

    They can reveal that two users have the same password, which may help an attacker guess it.

  23. Does hashing make a password database completely safe from attack?

    No. It raises the cost of recovering passwords but does not prevent guessing attacks or guarantee that passwords cannot be found.

  24. Why can a weak password remain vulnerable even when its hash is very long?

    An attacker can try common or simple passwords first, such as short digit sequences.

  25. Does password hashing protect a password intercepted before it is hashed?

    No. If an attacker captures the plaintext password before hashing, password hashing does not protect it.

  26. Why is a leaked password hash not normally “reversed” directly?

    Hash functions are designed to be one-way; attackers generally try candidate passwords and compare their hashes instead.

  27. What is a code in cryptography?

    A mapping between code words and the actual messages or meanings they represent.

  28. What is a cipher, and how does it differ from a code?

    A cipher applies an algorithmic process, often to individual letters or bits; a code maps words or phrases to other words or phrases.

  29. What does it mean to encode and decode a message using a code?

    Encoding maps plaintext to codetext; decoding uses the codebook to recover the plaintext.

  30. What do encrypt and encipher mean, and what are their reverse processes?

    Encrypting or enciphering converts plaintext to ciphertext; decrypting or deciphering converts ciphertext back to plaintext.

  31. What are plaintext and ciphertext?

    Plaintext is the readable original message; ciphertext is the transformed output of encryption.

  32. What is a cryptographic key?

    A value, typically a large number represented digitally, that configures or controls a cryptographic algorithm.

  33. Why should cryptographic algorithms generally be public rather than secret?

    Security should depend on protecting the key, not on hiding the algorithm.

  34. How does hashing differ from encryption?

    Hashing is generally one-way and loses information; encryption is designed to be reversible with the appropriate key.

  35. Why should developers generally use established cryptographic standards rather than inventing their own?

    Established standards have been extensively tested and analyzed, while a homemade system may contain overlooked weaknesses.

  36. What are SHA-2 and SHA-3 examples of?

    They are families of cryptographic hash functions.

  37. What is symmetric-key encryption?

    Encryption in which the sender and recipient use the same secret key.

  38. Why is symmetric encryption also called secret-key encryption?

    Its security depends on both communicating parties keeping their shared key secret.

  39. What key-distribution problem does symmetric encryption face?

    The parties need a secure way to share a secret key before they can communicate securely.

  40. How does a Caesar cipher transform letters?

    It rotates each letter of the alphabet by a fixed number of positions.

  41. What does ROT13 do?

    It rotates each letter by thirteen positions in the alphabet.

  42. Why does a Caesar cipher with a shift of 26 provide no secrecy?

    With a 26-letter alphabet, shifting every letter by 26 leaves the message unchanged.

  43. Why is a Caesar cipher easy to break?

    It has only a small number of possible shifts, so an attacker can try them all, even by hand.

  44. Name two established symmetric encryption algorithms discussed as commonly used standards.

    AES and triple DES.

  45. What is asymmetric, or public-key, cryptography?

    A cryptographic approach that uses a mathematically related public key and private key rather than one shared key.

  46. What is the intended role of a public key and a private key?

    The public key can be shared openly; the private key must be kept secret by its owner.

  47. How does public-key encryption let someone send a private message to a key’s owner?

    The sender encrypts the message with the recipient’s public key, and the recipient decrypts it with the corresponding private key.

  48. How does public-key cryptography address the shared-secret problem of symmetric encryption?

    It allows someone to encrypt a message using a recipient’s public key without first agreeing on a shared secret.

  49. What is RSA’s basic mathematical idea for generating a key pair?

    Choose large primes ppp and qqq, multiply them to get n=pqn=pqn=pq, and use values derived from them in the encryption and decryption mathematics.

  50. What is a prime number?

    A number divisible only by itself and 111.

  51. What role does modular arithmetic play in the simplified description of RSA?

    It uses remainders after division by nnn in the encryption and decryption calculations.

  52. What is the goal of Diffie–Hellman key exchange?

    To let two parties derive the same shared secret over a channel where an observer may see their exchanged values.

  53. What values do the parties agree on in the described Diffie–Hellman process?

    A generator ggg and a large prime number ppp.

  54. How do Alice and Bob form a shared secret in the described Diffie–Hellman exchange?

    They exchange values derived from their private values and use those received values with their own private values to calculate the same secret, g^{AB} mod p.

  55. What does a passive observer learn from the described Diffie–Hellman exchange?

    The observer can see the exchanged values but, under the security assumptions of the method, cannot readily derive the shared secret.

  56. What can the parties do with a shared secret established through key exchange?

    Use it as the key for a symmetric cipher, such as AES.

  57. What is a digital signature intended to establish?

    That a message or document was signed by the holder of a particular private key and has not changed since signing.

  58. How is a digital signature created in the described process?

    Hash the message, then use the signer’s private key and the hash to produce a signature.

  59. How does a recipient verify a digital signature?

    Hash the received message, use the signer’s public key to verify or recover the signature’s hash, and check that the hashes match.

  60. Does a digital signature make the signed message confidential?

    No. Signing authenticates the message; it does not by itself encrypt or conceal it.

  61. What must remain secure for digital signatures to be trustworthy?

    The signer’s private key must remain private and uncompromised.

  62. How can a recipient determine whether a public key really belongs to the claimed signer?

    Rely on a trusted registry or another trusted source, such as a verified website or email identity.

  63. What is a passkey?

    A passwordless authentication method based on a public–private key pair, commonly implemented through web authentication standards.

  64. What may a device ask a user to provide when creating or using a passkey?

    A fingerprint, face scan, or PIN to help establish that the user is authorized to use the device.

  65. What does a device send to a website when registering a passkey?

    The public key for that website and identifying information such as a user ID or username.

  66. How does a passkey login authenticate a user?

    The website sends a challenge; the device signs it with the private key, and the website verifies the signature with the stored public key.

  67. What is an important requirement for continued access to passkey-protected accounts?

    The user must retain access to the device or to a secure system that synchronizes the passkeys across devices.

  68. What is a current limitation of passkeys?

    They are not yet available on every website or service.

  69. What does encryption in transit protect?

    Data while it is traveling between a sender and a recipient or service.

  70. Why does an encrypted connection from a user to an email provider not necessarily protect messages from the provider?

    The connection may protect data only between the user and the provider; the provider may still be able to access the data.

  71. What is end-to-end encryption?

    Encryption that protects data so that only the communicating endpoints can read it, even if it passes through intermediary systems.

  72. How does end-to-end encryption differ from encryption only in transit to a service?

    With end-to-end encryption, the service in the middle should not be able to read the content; with transit encryption alone, it may be able to.

  73. What are examples of services described as offering end-to-end encrypted communication?

    Apple’s iMessage and WhatsApp.

  74. What usually happens when a file is moved to the Trash or Recycle Bin?

    The operating system marks it for deletion or changes how it tracks the file; the data may remain on the storage device.

  75. What usually happens to file data when the Trash or Recycle Bin is emptied?

    The system generally forgets the file’s location and makes its space available for reuse rather than immediately erasing all its data.

  76. Why might fragments of a deleted file still be recoverable?

    The storage space may not yet have been overwritten, so some of the old bits can remain.

  77. What is secure deletion intended to do?

    Overwrite the file’s data so the original contents cannot be recovered from the stored bits.

  78. What is encryption at rest?

    Encryption of data while it is stored on a device rather than being transmitted.

  79. How does full-disk encryption protect a locked or stolen device?

    It keeps the stored data encrypted so that someone without the required password or biometric access should not be able to read it.

  80. Why can full-disk encryption help when a device is sold or donated?

    If the data was encrypted and the new owner lacks the credentials, the old data should remain inaccessible.

  81. Why is it useful to enable full-disk encryption when a device is new?

    Storage hardware can wear out and may later prevent some bits from being overwritten; encrypting data from the start helps protect data left behind.

  82. What usability trade-off can full-disk encryption create?

    If the user loses the necessary password or access credentials, they may also lose access to their data.

  83. What is ransomware?

    Malicious software or an attack that encrypts a victim’s data and demands payment for the decryption key.

  84. How is a qubit different from a classical bit in the account presented here?

    A classical bit is either 000 or 111, while a qubit can represent a combination of both states.

  85. How many states can nnn qubits represent at once in the simplified explanation?

    2n2^n2n states.

  86. Why could quantum computing threaten current cryptographic systems?

    Its potential to process many states at once could greatly accelerate some attacks that rely on searching large spaces.

  87. Does the possibility of quantum attacks mean all current cryptography is already broken?

    No. The concern is a potential future threat; cryptographic methods will need to evolve as quantum technologies develop.

  88. What is the general security response to advances in quantum computing?

    Develop and adopt cryptographic algorithms that remain secure against the capabilities of quantum computers.

Card 1 of 88
Card 1 of 88

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent