Is use of sha3 justifiable? Is sha3 better than sha2 in (m)any aspects?

P.S. I want to use hashing for passwords in a database


Is sha3 better than sha2 in (m)any aspects?

SHA3 is built on-top of a fundamentally different construction than SHA-2 which has many nice properties. So yes, in many hash-function relevant aspects it is indeed better. As for password-hashing, SHA-3 implementations (without hardware acceleration) also tend to be slower, which is good in this case.


Is use of sha3 justifiable?

NO. Do not use a fast hashing function for password hashing. Use a dedicated password hashing scheme (PHS) such as Argon2 or bcrypt. These have been heavily reviewed, analyzed and even been built around the idea of being used for password hashing. They do their job really well and give you and your users the best possible security to the standards threats that you have to deal with when handling passwords on standard modern CPUs with fast RAM access.

  • $\begingroup$ Would multiple iterations of some sha-x flavor be sufficient for password hashing? Provided it's slow enough. $\endgroup$ – Q-Club Jan 23 '18 at 2:40
  • $\begingroup$ @Q-Club You are describing PBKDF2, which is not memory hard like modern algorithms $\endgroup$ – Richie Frame Jan 23 '18 at 3:36
  • 1
    $\begingroup$ SHA3 is slow in software but fast in hardware, which makes it terrible for password hashing because the attacker has a tremendous advantage $\endgroup$ – Richie Frame Jan 23 '18 at 3:37
  • $\begingroup$ @RichieFrame Got it, what key size (assume random binary string) would you feel comfortable hashing with sha3? $\endgroup$ – Q-Club Jan 23 '18 at 5:11
  • $\begingroup$ @Q-Club 112 bits, which is 19 random alphanumeric characters, but passwords are seldomly random $\endgroup$ – Richie Frame Jan 24 '18 at 3:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy