0

I have a website that used to work only over http, so since the connection was not secure, I used a CHAP authentication scheme to make logins more secure (even if the passwords were hashed, those hashes would have been sent in the clear otherwise, and could be intercepted to login with them, so using CHAP prevented that).

Since some time we're using https, so connections are encrypted. Isn't it redundant to keep using CHAP or is it still a good idea to keep using this scheme? (even if it makes logins a little more complicated, since you need the first step of getting the "challenge string" before the users send their login details, then concatenating and re-hashing the password string in the client before sending to the server).

My question arises because I'm going to develop an API which uses this website's database for the login information, and I don't want to make it more difficult than necessary for users of said API.

OMA
  • 3,442
  • 2
  • 32
  • 39

2 Answers2

1

In my opinion, CHAP could increase the security if it is used in an appropiate way...

You should meet the next requirements:

  1. the server should only store the password's hash value
  2. in the challenge phase, both should use a strong hash function (i.e in 2023 sha3 could be a good option)

It has some benefits over PAP:

a) it could make a little bit more difficult automated password guessing attacks if the nonce is continuously changing in each request.

b) in some architectures https is used to secure the connection between the client and load balancers. CHAP protects the password's confidentialy if it were the case.

0

Based on the limited information I had about CHAP I'd say you wouldn't want to use it with HTTPS because: - it's not needed (your data are encrypted anyway) - it makes the authentication workflow more complex - the server needs to store a password in clear text

That's said, the Basic authentication scheme certainly isn't perfect and HTTPS only protects you from somebody else seeing the plain-text form of a password. The Basic Authentication scheme still suffers from various issues larger than necessary attack window (password repeatedly sent with every request), caching (Browser and other tools like git) can cache credentials, accidentally exposing username&password combination in URLs stored in configuration, etc.

Juraj Martinka
  • 3,991
  • 2
  • 23
  • 25
  • 1
    Hello Juraj. Thanks for your answer. As I myself wrote last year in that page in your first link, using.CHAP authentication "the server doesn't have to store the password in clear text, passwords can still be stored as SHA1 hashes" (unless you consider hashes as being "clear text" as well) – OMA Aug 05 '19 at 21:33