News for hackers. Stuff that matters.
Re:Pwned Passwords, Version 6 by taf2 on Friday June 19, 2020 @10:43AM (#23574994)
You don’t have to send the password to determine if it’s pwned... they have a hashing scheme to determine if a password was in any leaks.

See https://haveibeenpwned.com/API/v3#SearchingPwnedPasswordsByR...

Re:Pwned Passwords, Version 6 by laegooose on Friday June 19, 2020 @11:26AM (#23575409)
How can a regular user validate this? A malicious or compromised site could have same explanations and API page but would actually collect passwords.
Re:Pwned Passwords, Version 6 by goda90 on Friday June 19, 2020 @11:34AM (#23575480)
It lets you search based on the first 5 characters of a SHA-1 password hash. So you use a trusted tool on your own computer to hash the password you want to search, and pass in just part of it. You get multiple results, and you can then compare against the hashes yourself to see if yours is in there. There's no way for them to collect your password that way.
Re:Pwned Passwords, Version 6 by Yetanfou on Friday June 19, 2020 @05:26PM (#23579021)
This works, it doesn't send the password or hash to the server:

   #!/bin/bash
   
   baseurl="https://api.pwnedpasswords.com/range/"
   read -s pass
   hash=$(echo -n "$pass"|sha1sum)
   hashhead=${hash:0:5}
   hashtail=${hash:5:35}
   
   curl -s ${baseurl}/${hashhead}|grep ${hashtail^^}
It'll dump the hash and the number of times the given password was found. If the password is not found it won't return anything.
Re:Pwned Passwords, Version 6 by E5JBK7UJPT on Friday June 19, 2020 @11:59AM (#23575741)
You could use the API directly instead of using the webpage.

> GET https://api.pwnedpasswords.com/range/{first 5 hash chars}

The service is only receiving the first 5 hash chars and thus could not collect your password.

Or you could read the javascript code of the page when you visit it.

> var i = sha1(n).toUpperCase(),

> r = i.substring(0, 5);

> $.get('https://api.pwnedpasswords.com/range/' + r).done(function (n) ...

Or you could download the file and check it locally.

Re:Pwned Passwords, Version 6 by fudged71 on Friday June 19, 2020 @12:54PM (#23576289)
I suppose someone could build a bare basic UI in something like JsFiddle that is transparently auditable and has crystal clear comments for non-technical people to see what the code does
Re:Pwned Passwords, Version 6 by timothy-quinn on Friday June 19, 2020 @10:47AM (#23575041)
Exactly - but the reactions I saw when he first released Pwned Passwords was "this is a malicious tool, don't give your password to anyone". Even if you're hitting the API from your own service, you need the entire password first to submit the partial hash to the API.

We who understand what's going on know it's perfectly fine, but it's hard to get that message across. Just like the first time you try to explain what a hash is to a non-technical person.