Contents
- 1 What is the purpose behind storing password hashes rather than the passwords themselves?
- 2 Why do we hash passwords instead of encrypting them?
- 3 Why would you not want to store passwords using reversible encryption?
- 4 How does Firebase use scrypt to hash passwords?
- 5 Can a hacker look at a hash of a password?
What is the purpose behind storing password hashes rather than the passwords themselves?
Hashing a password is good because it is quick and it is easy to store. Instead of storing the user’s password as plain text, which is open for anyone to read, it is stored as a hash which is impossible for a human to read.
Why do we hash passwords instead of encrypting them?
Hashing and encryption both provide ways to keep sensitive data safe. However, in almost all circumstances, passwords should be hashed, NOT encrypted. Hashing is a one-way function (i.e., it is impossible to “decrypt” a hash and obtain the original plaintext value). Hashing is appropriate for password validation.
What is better for storing people’s passwords on a database hashing or encryption?
Hashing is almost always preferable to encryption when storing passwords inside databases because in the event of a compromise attackers won’t get access to the plaintext passwords and there’s no reason for the website to ever know the user’s plaintext password.
What is used to encrypt passwords?
Data Encryption Standard
Most Unicies (and Linux is no exception) primarily use a one-way encryption algorithm, called DES (Data Encryption Standard) to encrypt your passwords. This encrypted password is then stored in (typically) /etc/passwd (or less commonly) /etc/shadow.
Why would you not want to store passwords using reversible encryption?
Storing encrypted passwords in a way that is reversible means that the encrypted passwords can be decrypted. For this reason, never enable Store password using reversible encryption for all users in the domain unless application requirements outweigh the need to protect password information.
How does Firebase use scrypt to hash passwords?
Firebase Authentication uses an internally modified version of scrypt to hash account passwords.
When do I need to rehash my Firebase password?
Even when an account is uploaded with a password using a different algorithm, Firebase Auth will rehash the password the first time that account successfully logs in. Accounts downloaded from Firebase Authentication will only ever contain a password hash if one for this version of scrypt is available, or contain an empty password hash otherwise.
How is a hash function different from encryption?
A hash function is basically just one-way encryption: you convert the plaintext password to a secret code, but there’s no key to convert it back, meaning you can never derive the actual password from the hashed version. This is how most secure websites manage their passwords:
Can a hacker look at a hash of a password?
Hashes aren’t hackproof, though. All an attacker has to do is run a dictionary of potential passwords through the hash function, then compare those hashes to the hashes in the database. When two hashes match, the hacker can just look at which password generated that hash.