What is the difference between Digest and Basic Authentication?

Dot Freelancer picture Dot Freelancer · Mar 2, 2012 · Viewed 99.7k times · Source

What is the difference between Digest and Basic Authentication ?

Answer

Andy picture Andy · Mar 2, 2012

Digest Authentication communicates credentials in an encrypted form by applying a hash function to: the username, the password, a server supplied nonce value, the HTTP method and the requested URI.

Whereas Basic Authentication uses non-encrypted base64 encoding.

Therefore, Basic Authentication should generally only be used where transport layer security is provided such as https.

See RFC-2617 for all the gory details.