Re:A Decade of Have I Been Pwned
by adameasterling on Monday December 04, 2023 @05:16PM
(#38523950)
Oh, I see the issue. The HIBP database is SHA-1 hashed with no salt. It was created from unhashed passwords. You can't download the unhashed version (you could of course compute it, if you really wanted to; but there's no need).
So, the procedure you need to implement is, on login/registration/pw reset, you SHA-1 hash the user's unhashed password and do a indexed lookup on your copy of HIBP's database. Or if you don't want to maintain that copy, you can use HIBP's API to do something similar.
Re:A Decade of Have I Been Pwned
by santiagobasulto on Monday December 04, 2023 @05:37PM
(#38524154)
Ah! Thanks a lot, it now makes sense. So at some point HIBP has the unhashed passwords, they obviously don’t make those public, good trick. How do you handle this from a UX perspective? Just tell the user that password is “not strong enough”?
Sorry, I still don't understand the procedure you mentioned and I'm genuinely curious.