Subject: [http-auth] Proposal: usalt

From: Sophie Bremer <[email-masked]>
Date: Sun, 1 Dec 2013 12:49:55 +0100

Hello (again),

This is a proposal for the usalt value to hash the username, so that the username is not known by the server.

Best Regards
Sophie

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

Proposal: usalt

1 Introduction

   In the last years many large networks came under attack and millions
   of passwords and email addresses were captured. With HTTP Digest
   Authentication the passwords are protected by the hash part A1.
   Unfortunately user names like email addresses are not protected in
   the same way and need to be processed in plain text. A solution to
   make the plain user name unknown to the server is the usalt value.
   With usalt the client hashes the user name for the server.

2 Implementation

   The proposal describes an extension of the draft from October 7,
   2013.

2.1 The WWW-Authentication Response Header

   If the server needs a hashed user name, the server sends the usalt
   value which contains at least one salt for the required calculation.

         digest-challenge  = ... | [usalt]
         usalt             = "usalt" "=" <"> usalt-array <">
         usalt-array       = (usalt-value | [ "&" usalt-value ] | ...)
         usalt-value       = quoted-string

   usalt
      A server-specified data string of ampersand separated usalt
      values. The ampersand and quote characters MUST NOT be part of an
      usalt value.

2.2 The Authorization Request Header

   The client MUST hash the username-value with the usalt-value(s) and
   send the result as a string of digest-size hex digits.

2.3 The Authentication Info Header

   The server may change the usalt any time and inform the client with
   the info header.

2.4 Username Hash

   The usalt hash calculation for the user name MUST be made BEFORE any
   other processing. The number of usalt values is unlimited.

         username-value  = <"> H[x](     unq(username-value)
                                     ":" unq(realm-value)
                                     ":" unq(usalt-value[x])
                                   ) <">

         username-value  = <"> H[y](     unq(username-value)
                                     ":" unq(realm-value)
                                     ":" unq(usalt-value[y])
                                   ) <">

         username-value  = <"> H[z] ...

2.4 Example

   In this example the value of username and user password is "Salt".

   WWW-Authenticate: Digest realm="Salt Example",
                            nonce="1c660c85fdb043437841716ae64a3bac",
                            algorithm=MD5,
                            opaque="511be6ba675f68eb00e073ecc15d0fe7",
                            qop="auth",
                            charset="UTF-8",
                            usalt="d31ea9c494c0e1e7594d38c8a8a0d6c3
                                   &b95ba99df352c17afc80f03412b763e7"

   Authorization: Digest username="446965a0ad46a4f83363b87f6d45c938",
                         realm="Salt Example",
                         nonce="...",
                         uri="/Example.php",
                         response="...",
                         opaque="511be6ba675f68eb00e073ecc15d0fe7",
                         qop=auth,
                         nc=00000001,
                         cnonce="..."

   Authentication-Info: usalt="b95ba99df352c17afc80f03412b763e7
                               &d31ea9c494c0e1e7594d38c8a8a0d6c3"

3 Considerations

3.1 Benefits

   - The username is unknown to the server.

3.2 Drawbacks

   - Brute force attacks  are possible on the username.