How secure is the hashing salting and stretching process in this diagram

0 votes

Looking at this diagram, I want to evaluate whether the approach used for hashing, salting, and stretching passwords is secure against modern attack methods.

  • Is the salt generated correctly and stored securely?
  • Does the stretching process (iterations) provide enough resistance to brute force attacks?
  • Are there any vulnerabilities in this specific implementation that could weaken the security?

Would love to hear thoughts on best practices or potential improvements.

Feb 6 in Cyber Security & Ethical Hacking by Nidhi
• 8,520 points
43 views

1 answer to this question.

0 votes

Evaluating the security of your password hashing, salting, and stretching implementation is crucial to protect against modern attack methods. Let's address each of your concerns:

1. Is the salt generated correctly and stored securely?

  • Generation: Ensure that each password is hashed with a unique, randomly generated salt. The salt should be generated using a Cryptographically Secure Pseudo-Random Number Generator (CSPRNG) to guarantee unpredictability. It's recommended that the salt be at least 16 bytes in length.

  • Storage: Salts do not need to be kept secret and can be stored alongside the hashed password in your database. This practice ensures that during authentication, the correct salt is used to hash the input password for comparison.

2. Does the stretching process (iterations) provide enough resistance to brute-force attacks?

Key Stretching: Employ key stretching techniques to make brute-force attacks computationally expensive. Algorithms like Argon2id, bcrypt, and PBKDF2 are designed for this purpose.

  • Argon2id: As the winner of the 2015 Password Hashing Competition, Argon2id is recommended for its resistance to both side-channel and GPU-based attacks. Configuration parameters can be adjusted to balance security and performance.

  • bcrypt: bcrypt incorporates a work factor (cost) that determines the number of iterations, making it adaptable to increasing computational power. A minimum work factor of 10 is recommended, but this should be adjusted based on your system's performance capabilities.

  • PBKDF2: This algorithm uses an iteration count to increase computational effort. For PBKDF2-HMAC-SHA256, a minimum of 600,000 iterations is recommended.

3. Are there any vulnerabilities in this specific implementation that could weaken the security?

  • Use of Weak Hash Functions: Avoid using fast hash functions like MD5 or SHA-1, as they are considered weak and vulnerable to attacks. Instead, use hashing algorithms specifically designed for password storage, such as Argon2id, bcrypt, or PBKDF2.

  • Predictable Salts: Ensure that salts are unique and randomly generated for each password. Using predictable salts or reusing the same salt across multiple passwords can make your system vulnerable to attacks.

Best Practices and Potential Improvements

  • Regularly Update Work Factors: As computational power increases, periodically increase the work factor or iteration count of your hashing algorithm to maintain security. This practice, known as adaptive hashing, helps ensure that your password storage mechanism remains resistant to evolving attack methods.

  • Implement Account Lockout Mechanisms: To further protect against brute-force attacks, consider implementing account lockout mechanisms that temporarily disable an account after a certain number of failed login attempts.

  • Monitor and Respond to Security Advisories: Stay informed about the latest security advisories related to your chosen hashing algorithms and be prepared to update your implementation if vulnerabilities are discovered.

By carefully implementing these practices, you can significantly enhance the security of your password storage system and protect against modern attack methods.

answered Feb 11 by CaLLmeDaDDY
• 16,200 points

Related Questions In Cyber Security & Ethical Hacking

0 votes
0 answers

What is the role of DNSSEC in footprinting, and how can I query it programmatically?

I’m currently working on a DNS footprinting ...READ MORE

Oct 17, 2024 in Cyber Security & Ethical Hacking by Anupam
• 10,090 points
258 views
+1 vote
1 answer

How do you decrypt a ROT13 encryption on the terminal itself?

Yes, it's possible to decrypt a ROT13 ...READ MORE

answered Oct 17, 2024 in Cyber Security & Ethical Hacking by CaLLmeDaDDY
• 16,200 points
337 views
+1 vote
1 answer

How does the LIMIT clause in SQL queries lead to injection attacks?

The LIMIT clause in SQL can indeed ...READ MORE

answered Oct 17, 2024 in Cyber Security & Ethical Hacking by CaLLmeDaDDY
• 16,200 points
388 views
+1 vote
1 answer

Is it safe to use string concatenation for dynamic SQL queries in Python with psycopg2?

The use of string concatenation while building ...READ MORE

answered Oct 17, 2024 in Cyber Security & Ethical Hacking by CaLLmeDaDDY
• 16,200 points
240 views
+1 vote
1 answer
0 votes
1 answer

How secure is the hashing/salting/stretching process as described in this diagram?

When storing passwords securely, employing a combination ...READ MORE

answered Feb 10 in Cyber Security & Ethical Hacking by CaLLmeDaDDY
• 16,200 points
35 views
+1 vote
1 answer

What is the role of WHOIS data in DNS footprinting and how can I automate retrieval?

WHOIS data is essential in DNS footprinting ...READ MORE

answered Oct 21, 2024 in Cyber Security & Ethical Hacking by CaLLmeDaDDY
• 16,200 points
277 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP