Security

A Linux administrator is writing a script that checks candidate passwords against the Have I Been Pwned Pwned Passwords range API. Security policy forbids sending the password, or anything that identifies it, to a third party. Which value should the script send to the API?

Show the answer

Correct answerA. The first five characters of the password's SHA-1 hash

The range API uses k-anonymity: the script sends only the first five hex characters of the SHA-1 hash, receives matching hash suffixes, and compares them locally. A full hash can be looked up or cracked offline, and any plaintext sent, even partial, discloses the password.