312-50V10 · Question #339
How does an operating system protect the passwords used for account logins?
The correct answer is A. The operating system performs a one-way hash of the passwords.. Operating systems protect passwords by running them through a one-way cryptographic hash function, making it computationally infeasible to recover the original password from the stored value.
Question
How does an operating system protect the passwords used for account logins?
Options
- AThe operating system performs a one-way hash of the passwords.
- BThe operating system stores the passwords in a secret file that users cannot find.
- CThe operating system encrypts the passwords, and decrypts them when needed.
- DThe operating system stores all passwords in a protected segment of non-volatile memory.
How the community answered
(56 responses)- A95% (53)
- B4% (2)
- C2% (1)
Why each option
Operating systems protect passwords by running them through a one-way cryptographic hash function, making it computationally infeasible to recover the original password from the stored value.
A one-way hash function (such as bcrypt or SHA-256 with salt) transforms the password into a fixed-length digest that cannot be reversed. When a user logs in, the OS hashes the entered password and compares it to the stored hash - the original plaintext is never stored or retrieved, which means even if the hash database is stolen, the original passwords remain protected.
Storing passwords in a hidden file relies on security through obscurity, which is not a cryptographic protection and is easily defeated by an attacker with sufficient access.
Symmetric encryption is reversible, meaning anyone who obtains the encryption key can decrypt and recover all stored plaintext passwords - this is fundamentally weaker than one-way hashing.
Storing passwords in non-volatile memory without cryptographic transformation still exposes them in plaintext if that memory is physically or logically accessed.
Concept tested: One-way password hashing for secure storage
Source: https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html
Topics
Community Discussion
No community discussion yet for this question.