1
$\begingroup$

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?

$\endgroup$
  • 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$ – CodesInChaos Feb 29 '16 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$ – James Watkins Feb 29 '16 at 16:04
-2
$\begingroup$

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.

$\endgroup$
  • $\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 '16 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$ – James Watkins Feb 29 '16 at 1:28
  • $\begingroup$ "nonce" is short for "number used once". if you reuse it, it's not a nonce. $\endgroup$ – sneak Feb 29 '16 at 6:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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