Digest Authentication is something like this:

  1. Server sends client a nonce.
  2. Client hashes username and password with nonce.
  3. Client sends hashed value back to server.
  4. Server validates hash.

However, it seems like this requires the server to have access to the password plaintext, otherwise it wouldn't be possible to verify each hash with unique nonce values.

Is there some way to follow this authentication protocol without requiring the server to have access to password plaintexts?

  • 4
  • 1
    $\begingroup$ If you're talking about the existing http digest auth protocol, there is no way to use this protocol together with secure password hashing. With custom protocols you can make it work (using two levels of hashing), and with SRP the client doesn't even have to send a hash during the login process. $\endgroup$ Feb 29, 2016 at 9:09
  • $\begingroup$ It's still pointless even with two levels of hashing, because then the hash becomes the plaintext, so someone could access the user's account just by knowing the hash. Following an asymmetric key exchange approach seems like the only viable option. $\endgroup$ Feb 29, 2016 at 16:04

1 Answer 1


The server doesn't need the plaintext. When the password was "saved" the server generated a nonce and concatenated that with the password and then hashed the combination. The server saves the nonce and the hash, not the password. Now, when client sends the hashed value to the server all the server does is compare that it against the saved value.

  • $\begingroup$ Which, without a strong password hash, may still be rather vulnerable though - just like the rest of the scheme is. Saving the password does seem to be an option in the protocol. $\endgroup$
    – Maarten Bodewes
    Feb 29, 2016 at 1:23
  • 3
    $\begingroup$ This is incorrect. Reusing a nonce would open the scheme to replay attacks, which would defeat the whole purpose. $\endgroup$ Feb 29, 2016 at 1:28
  • $\begingroup$ "nonce" is short for "number used once". if you reuse it, it's not a nonce. $\endgroup$
    – sneak
    Feb 29, 2016 at 6:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.