2

In form based authentication the credentials are sent as such within the message, whereas in digest based authentication a digest of credentials, domain name and a random challenge is sent instead. Form based authentication requires a secure channel (https) by nature.

Why doesn't the form based authentication on web browsers use the digest scheme instead? Or is it so the digest challenge wouldn't provide any additional security over the form based authentication which requires TLS anyway?

Plus with the digest based authentication plain text password has to be stored in the server side repository instead of hashes. Is this the reason why (encrypted) plain text credentials are favored over the digest on web browsers? In which context would the digest based scheme actually be more secure than plain text over a secure channel?

2
  • I like "encrypted plain text credentials". It's a choice, it is possible to hash the password in the browser and transmit this hash to the server. Then the hashes are compared and if they match, authentication is successful.
    – Jeroen
    Jun 9, 2018 at 7:16
  • "plain text password has to be stored in the server side" - and that's a pretty big no-no. Jun 9, 2018 at 7:20

2 Answers 2

2

Why doesn't the form based authentication on web browsers use the digest scheme instead?

A HTML form by itself is no form of authentication at all but it simply is collecting data entered by the user and submitting it to the server. If the server then uses these data for authentication is up to the server. Contrary to this HTTP Basic Authentication and HTTP Digest Authentication are specifically designed for authentication.

It is still possible to implement the kind of Challenge-Response authentication Digest authentication provides using Javascript and there are systems which do it. For example the Fritz!Box router used (and maybe still uses) such a form of authentication even though it uses a HTML form to enter the password.

Or is it so the digest challenge wouldn't provide any additional security over the form based authentication which requires TLS anyway?

Form based authentication does not require TLS at all. But it is clearly recommended to do it and many browsers warn today when submitting passwords using plain HTTP.

Using Digest authentication over HTTPS has no advantage in most cases compared to using Basic authentication or HTML forms where the password is transmitted in plain text. Contrary, Digest authentication requires that the password or some password equivalent is stored at the server in plain, which increases the risk of password or identity compromise if the server got compromised. See also HTTP Digest Authentication: Does the server store plaintext passwords?.

Digest authentication might make sense if the authentication is not done directly at the server but that the server itself forwards the credentials to some other authentication system, for example a RADIUS server. In this scenario Digest authentication has the advantage that the web application itself never gets access to the plain password.

2

is it so the digest challenge wouldn't provide any additional security over the form based authentication?

It's actually the other way around: HTTP digest auth requires the server to store all passwords in it's database in plaintext or weakly hashed (e.g. MD5), because it needs to be able to calculate a digest on them. With Basic auth it's possible to store passwords in strongly hashed form (e.g. scrypt), so Basic auth is more secure (in the presence of TLS of course).

Why doesn't the form based authentication on web browsers use the digest scheme instead?

Form-based authentication isn't really a standard, it's just an approach in which the user is typically presented with a username and password HTML form fields and a Submit button, which triggers the submission of form data to the server via an HTTP POST. That's how HTML forms normally work.

However, you're free to augment this process any way you want, since it's possible to intercept button clicks in JavaScript and completely bypass the form submission. For example, you can implement digest-based authentication via Ajax (e.g. digest-ajax), as well as client-side PBKDF2, bcrypt, scrypt, or really anything else.

In which context would the digest based scheme actually be more secure than plain text over a secure channel?

It's more secure when for example using a proxy, because the proxy gets to see a digest instead of a plaintext password, thus making it possible to potentially even use a public proxy.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .