DataStructures / Cyber Security Interview Questions
Why do we use Salting in password hashing?
Salting adds a unique, random value to each password before hashing, so that even if two users choose the identical password, their stored hashes come out completely different.
hash("password123" + salt_user1) -> "a1b2c3..." hash("password123" + salt_user2) -> "9f8e7d..."
- Defeats precomputed rainbow table attacks, which rely on matching hashes against a lookup table
- Forces an attacker to crack each password individually rather than all at once
- Costs almost nothing to implement since the salt is simply stored alongside the hash
Modern password hashing functions like bcrypt, scrypt, and Argon2 build salting in automatically, along with deliberately slow computation to further frustrate brute-force attempts.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
