When using CHAP authentication, passwords are stored in plaintext, then I used reversible encryption to store password.

However, I recently found Citrix states " storing passwords using reversible encryption is essentially the same as storing plaintext versions of the passwords." (http://support.citrix.com/static/oldkc/CTX114488.html)

So what is security best practices for storing plaintext during CHAP authentication ?

2 Answers 2


The CHAP authentication schemes requires both client and server to share a common plain text secret. However, the secret never enters the network.

So it is the responsibility of the client and server to ensure the confidentiality of the password.

The article you link is saying that password should not be stored encrypted as it does not add any additional layer of security, unless you have some specific needs for it to be encrypted (company policy, regulation, ...). The fact that CHAP cannot use a password which have been encrypted makes the encryption void anyway.

  • Normally you would hash the PW somehow on the server for safe storage. Couldn't the server tell the client how it was hashed, then the client could apply the same procedure to the cleartext password and then use the derivative to create the CHAP response? Would using the hash somehow compromise the secrecy of the password itself?
    – Chris
    Apr 11, 2018 at 13:32

every time the user logs in, you know the password and can pre-generate lots of challenges and store these instead, with a hash of the expected response. That way you don't need to store the password. If for some reason you would run out of challenges for a user (rate limiting etc can help + on every successful login you can add new challenges to your list), require this user to login in somewhere that does not require chap, so you can add new challenges

  • This is still functionally storing a plaintext-equivalent, or many of them, as the case happens to be. Clever approach though. The criteria is (IMHO) basically: "Do you store anything that, if learned by an attacker, would tell them what information the server expects from an authentic user?" CHAP can't avoid doing that, so the requester will need a different protocol. Storing salted hashes and expecting the original password from the client does meet the requirement, as it is not possible to reverse a hash into a strong password without an rainbow table. Apr 4, 2020 at 1:32
  • 1
    You should store the challenge with a hash of the expected response. That way you cannot reverse the password or the expected response. It's a hack, but the most secure thing you can do as a workaround, I guess.
    – tvlooy
    Apr 5, 2020 at 6:01

You must log in to answer this question.

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