Challenge-response authentication

Challenge-response authentication

In computer security, challenge-response authentication is a family of protocols in which one party presents a question ("challenge") and another party must provide a valid answer ("response") to be authenticated.[1]

The simplest example of a challenge-response protocol is password authentication, where the challenge is asking for the password and the valid response is the correct password.[1]

Clearly an adversary that can eavesdrop on a password authentication can then authenticate itself in the same way. One solution is to issue multiple passwords, each of them marked with an identifier. The verifier can pick any of the identifiers, and the prover must have the correct password for that identifier. Assuming that the passwords are chosen independently, an adversary who intercepts one challenge-response message pair has no more chance of responding correctly to a different challenge than an adversary who has intercepted nothing.

For example, when other communications security methods are unavailable, the U.S. military uses the AKAC-1553 DRYAD numeral cipher to authenticate and encrypt some communications. DRYAD includes a list of three-letter challenge codes, which the verifier is supposed to choose randomly from, and random three-letter responses to them. For added security, each set of codes is only valid for a particular time period which is ordinarily 24 hours.

Software in the 1980s and 1990s often used a similar method for copy protection: challenges would be questions like "What is the second word in the third paragraph on page 418 of the manual?". The security assumption was that copying the manual was more difficult than copying the software disk.


Other non-cryptographic protocols

Challenge-response protocols are also used to assert things other than knowledge of a secret value. CAPTCHAs, for example, are a sort of variant on the Turing test, meant to determine whether a viewer of a Web application is a real person. The challenge sent to the viewer is a distorted image of some text, and the viewer responds by typing in that text. The distortion is designed to make automated optical character recognition (OCR) difficult and preventing a computer program from passing as a human.

Cryptographic techniques

Non-cryptographic authentication was generally adequate in the days before the Internet, when the user could be sure that the system asking for the password was really the system they were trying to access, and that nobody was likely to be eavesdropping on the communication channel to observe the password being entered. To address the insecure channel problem, a more sophisticated approach is necessary. Many cryptographic solutions involve two-way authentication, where both the user and the system must each convince the other that they know the shared secret (the password), without this secret ever being transmitted in the clear over the communication channel, where eavesdroppers might be lurking.

One way this is done involves using the password as the encryption key to transmit some randomly-generated information as the challenge, whereupon the other end must return as its response a similarly-encrypted value which is some predetermined function of the originally-offered information, thus proving that it was able to decrypt the challenge. For instance, in Kerberos, the challenge is an encrypted integer N, while the response is the encrypted integer N + 1, proving that the other end was able to decrypt the integer N. In other variations, a hash function operates on a password and a random challenge value to create a response value.

Such encrypted or hashed exchanges do not directly reveal the password to an eavesdropper. However, they may supply enough information to allow an eavesdropper to deduce what the password is, using a dictionary attack or brute-force attack. The use of information which is randomly generated on each exchange (and where the response is different from the challenge) guards against the possibility of a replay attack, where a malicious intermediary simply records the exchanged data and retransmits it at a later time to fool one end into thinking it has authenticated a new connection attempt from the other.

Authentication protocols usually employ a cryptographic nonce as the challenge to ensure that every challenge-response sequence is unique. This protects against a replay attack. If it is impractical to implement a true nonce, a strong cryptographically secure pseudorandom number generator and cryptographic hash function can generate challenges that are highly unlikely to occur more than once. It is important not to use time-based nonces, as these can weaken servers in different time zones and servers with inaccurate clocks.

Mutual authentication is performed using a challenge-response handshake in both directions; the server ensures that the client knows the secret, and the client also ensures that the server knows the secret, which protects against a rogue server impersonating the real server.

Challenge-response authentication can help solve the problem of exchanging session keys for encryption. Using a key derivation function, the challenge value and the secret may be combined to generate an unpredictable encryption key for the session. This is particularly effective against a man-in-the-middle attack, because the attacker will not be able to derive the session key from the challenge without knowing the secret, and therefore will not be able to decrypt the data stream.

Simple Example mutual authentication sequence

  • Server sends a unique challenge value sc to the client
  • Client generates unique challenge value cc
  • Client computes cr = hash(cc + sc + secret)
  • Client sends cr and cc to the server
  • Server calculates the expected value of cr and ensures the client responded correctly
  • Server computes sr = hash(sc + cc + secret)
  • Server sends sr
  • Client calculates the expected value of sr and ensures the server responded correctly


  • sc is the server generated challenge
  • cc is the client generated challenge
  • cr is the client response
  • sr is the server response

Password storage

To avoid storage of passwords, some operating systems (e.g. Unix-type) store a hash of the password rather than storing the password itself. During authentication, the system need only verify that the hash of the password entered matches the hash stored in the password database. This makes it more difficult for an intruder to get the passwords, since the password itself is not stored, and it is very difficult to determine a password that matches a given hash. However, this presents a problem for challenge-response algorithms, which require both the client and the server to have a shared secret. Since the password itself is not stored, a challenge-response algorithm will usually have to use the hash of the password as the secret instead of the password itself. In this case, an intruder can use the actual hash, rather than the password, which makes the stored hashes just as sensitive as the actual passwords.

Often, the hashed password is retrieved from the actual password together with a password salt. Then, the hash together with the salt are stored. This makes brute-force-attacking harder as the search space is enlarged by the salt.


Examples of more sophisticated challenge-response algorithms are zero-knowledge password proof and key agreement systems (such as Secure Remote Password (SRP)), CRAM-MD5, and ssh's challenge-response system based on RSA [1].

See also


  1. ^ a b "What is CRAM". SearchSecurity. Retrieved 2 November 2011. 

Wikimedia Foundation. 2010.

Look at other dictionaries:

  • challenge-response authentication —    A method of authentication used by Microsoft Windows 2000 and other operating systems.    When a user contacts a server, the server responds with a challenge, upon which the user then performs a cryptographic operation and returns the result… …   Dictionary of networking

  • Challenge–response spam filtering — This article is about e mail. For other uses, see Challenge response authentication. A challenge–response (or C/R) system is a type of spam filter that automatically sends a reply with a challenge to the (alleged) sender of an incoming e mail. In …   Wikipedia

  • Challenge-Handshake Authentication Protocol — In computing, the Challenge Handshake Authentication Protocol (CHAP) authenticates a user or network host to an authenticating entity. That entity may be, for example, an Internet service provider. CHAP is specified in RFC 1994. CHAP provides… …   Wikipedia

  • Challenge-handshake authentication protocol — In computing, the Challenge Handshake Authentication Protocol (CHAP) authenticates a user or network host to an authenticating entity. That entity may be, for example, an Internet access provider. RFC 1994: PPP Challenge Handshake Authentication… …   Wikipedia

  • Challenge-response spam filtering — A Challenge response (or C/R) system is a type of spam filter that automatically sends a reply with a challenge to the (alleged) sender of an incoming e mail. In this reply, the sender is asked to perform some action to assure delivery of the… …   Wikipedia

  • Challenge-Response-Verfahren — Das Challenge Response Verfahren (übersetzt etwa Herausforderung Antwort Verfahren) ist ein sicheres Authentifizierungsverfahren eines Teilnehmers auf Basis von Wissen. Hierbei stellt ein Teilnehmer eine Aufgabe (engl. challenge), die der andere… …   Deutsch Wikipedia

  • Authentication — (from Greek αυθεντικός; real or genuine, from authentes; author) is the act of establishing or confirming something (or someone) as authentic , that is, that claims made by or about the thing are true. This might involve confirming the identity… …   Wikipedia

  • Challenge — A challenge is a general term referring to things that are imbued with a sense of difficulty and victory. Challenge may also refer to: Contents 1 Film and television 2 Music 3 …   Wikipedia

  • Chip Authentication Program — A GemAlto EZIO CAP Device Whitelabeled as Barclays PINSentry The Chip Authentication Program (CAP) is a MasterCard initiative and technical specification for using EMV banking smartcards for authenticating users and transactions in online and… …   Wikipedia

  • Remote Authentication Dial-In User Service — Pour les articles homonymes, voir Radius. Schéma d accès à un serveur RADIUS via un proxy RADIUS (Remote Authentication Dial In User Service …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”

We are using cookies for the best presentation of our site. Continuing to use this site, you agree with this.