secure-passwords
v1.4.0
Published
An authtentication strategy that finally stops exposing users passwords on the wire.
Maintainers
Readme
secure-passwords
An authtentication strategy that finally stops exposing users passwords on the wire.
Explanation
https://medium.com/@wzrdtales/your-passwords-are-at-risk-why-ssl-is-not-enough-and-how-to-solve-it-75356a3fd762
Signature verifiers
With a shared verifier the stored hash is all it takes to answer a challenge, so anyone who can read the database can log in. Store a signature verifier instead and the database only holds an Ed25519 public key:
// on registration: store this instead of the hash the client sent
const verifier = SP.ed25519PublicKey(hash);auth() recognises the ed25519: prefix of the stored value and expects a
signature as the response. The client derives the key pair from the same hash
it would otherwise have used for the rounds:
seed = HKDF-SHA256(ikm = utf8(hash), salt = empty, info = 'secure-passwords/ed25519/v1', 32 bytes)
key pair = Ed25519 from seed (RFC 8032)
message = utf8(challenge + date + domain)
response = hex(signature)All of it is available in WebCrypto; test.js contains a reference client.
