Lasse Huovinen
Department of Computer Science and Engineering
Helsinki University of Technology
Lasse.Huovinen@hut.fi
Tutor: Timo.Rinne@hut.fi
Definition 1.1
User authentication is the process whereby one party is assured (through acquisition of corroborative evidence) of the identity of a second party involved in a protocol, and that the second has actually participated (i.e. is active at, or immediately prior to, the time the evidence is acquired).
Using user authentication the service provider can supervise service users' access to the service. The service can be, e.g., access to computer system, ATM, physical entry to restricted area, or cellular telephone network.
From point of view of the verifier, the result of an authentication process can be either completion with acceptance (i.e. acceptance of the claimant as authentic) or termination without acceptance (i.e. rejection). The reference [1] defines more specific objectives of an authentication process in the following way.
Authetication protocols have many properties. The following lists some of the most important properties.[1] These are needed later in this paper.
Better result can be achieved by crypting password file or using one-way functions. In these cases, rather than saving the password itself the encrypted password, or the result of one-way function is saved to the file. When user enters a password, the system computes a result from it and compares the result with the saved result. Usually one-way function is considered preferable than encryption.
Some additional methods to achieve better security are password salting, passphrases, and one-time passwords.
1.2. Zero-knowledge identification
The idea behind zero-knowledge (ZK) protocol is that the verifier doesn't get any useful information of the claimant's secret. If the verifier gets claimant's secret, it can use it to impersonate A later. Althought challenge-response protocols are time-variant, some partial information may be revealed to the verifier, and it can strategically collecting material find out the whole secret. ZK protocols are designed to prevent this, by allowing a claimant to demostrate knowledge of the secret without relevealing any useful information to the verifier. The point is that only a single bit of information needed ; the claimant either knows the secret or not.
Generally speaking, a ZK protocol allows a proof of the truth of an assertion, while conveying no information whatsoever about the assertion itself other than its actual truth. So, it can be said that a ZK proof is similar to an answer obtained from a (trusted) oracle[1].
Some examples on zero-knowledge protocols are Fiat-Shamir, Feige-Fiat-Shamir (FFS), and Guillou-Quisquater (GQ).
2. Strong Authentication (Challenge-response identification)
This chapter describes the idea behind cryptographic challenge-response protocols. Also some protocols are introduced here and the general idea how to attack on cryptographic challenge-response protocols is described.
The main idea behind cryptographic challenge-response protocols is that the claimant proves its identity to the verifier without revealing the secret information during the protocol. In a way, one can think claimant demonstrates to the verifier it has the knowledge of the secret information (in some mechanisms, the secret is known by the verifier, and is used to verify the response; in other mechanisms, the secret is not actually known by the verifier).
Generally, challenge-response protocols work in the following way. The verifier sends a time-variant challenge to the claimant. The claimant computes a response from the challenge using some encryption algorithm (e.g. RSA or DES) and sends the response to the verifier. So, the response depends on the challenge and the secret information. Usually the challenge is a number which is selected randomly (and secretly) by the verifier. The response shouldn't leak useful information about the secret to an enemy from any execution of the protocol.
Before studying the protocols, let's study something on time-variant parameters. Time-variant parameters may be used in the identification protocols to counteract replay and interleaving attacks, to provide uniqueness to timeliness guanrantees, and to prevent certain chosen-text attacks[1]. These time-variant parameters are called usually nonces (or unique numbers, or non-repeating values). The reference [1] defines nonce in the following way.
Definition 2.1
A nonce is a value used no more than once for the same purpose. It typically serves to prevent (undetectable) replay.
Generally, nonces can be divided to the following three main categories:
When using timestamps in protocols some advantages are achieved; typically, one message less is needed and no pairwise long-term state information like with sequence numbers or per-connection short-term state information like with random numbers is needed. With timestamps a drawback is to synchronize the distributed clocks. If synchronizing algorithm is not secure then the authentication will become unsecure, too. Typically, timestamp can be replaced with random or sequence number and a return message.
2.1. Symmetric-key techniques
Symmetric-key techniques require that the verifier and the claimant have the same common symmetric key. Sharing the symmetric key can be done in different ways. For small number of users in a closed system key can be shared manually. For larger systems usually trusted on-line server is used. In the latter case both entities ask their symmetric key from the server.
The Needham-Schroeder shared-key protocol is the basis for many server-based authentication protocols (e.g. Kerberos). This protocol is not important anymore except for historical reasons. This protocol has a weakness since B has no possibility to know if the key k is fresh or not. So, B has no possibility to know if the session key k should be accepted. So, any party knowing k may both resend message and compute a correct message to impersonate A to B. Instead of this protocol, e.g., Kerberos should be used. (See 3.1)
Needham-Schroeder[1],[3]
Let's A denote claimant, B verifier and T trusted server. E is a symmetric encryption algorithm (e.g., DES), NA and NB are nonces chosen by A and B. A and T share a symmetric key KAT, B and T share a symmetric key KBT. T selects a session key k for A and B to share. With these markings, Needham-Schroeder protocol sends the next messages.
Consider the following user authentication method which is called ISO/IEC 9798-2. ISO/IEC 9798-2 includes three different kind of mechanisms.
ISO/IEC 9798-2 mechanisms[1]
Let's rA denote random number and tA denote a timestamp, which are generated by A. Here timestamp could be replaced by a sequence number, providing slightly different quarantees. EK denotes a symmetric encryption algorithm, with a key K shared by A and B. Alternatively distinct keys KAB and KBA could be used for uni-directional communication. It is assumed that both parties are aware of the claimed identity of the other, either by context or by additional (insecured) cleartext data fields. Optional message fields are denoted by an asterisk (it is used in the same meaning later, too).
When challenge-response protocols are used, some kind of computing device and a secure storage for long-term keying material is needed. Quite often, to achieve additional security, a device such as a chipcard can be used for both the key storage and response computation. Of course, a card reader is necessary. Other device (sometimes cheaper) is a passcode generator. Next, let's study how a simple passcode generator works.
The picture 2-1 shows a functional diagram of a simple passcode generator. Usually passcode generators are hand-held devices with size of a pocket calculator. The device contains a device-specific secret key. When user inputs challenge to the generator, it computes a response and shows it on the small display. The user inputs the response from the display to the system. The verifier then checks this response using information stored inside the system. The response is computed from the challenge and the secret key.
This kind of authentication mechanism can be done more secure using (optional) PIN -code. The PIN can be verified locally or the response can depend on it. The main security drawback in using passcode generators is the requirement to maintain the security on the system side. Of course, it's not very convenient to carry generator always with you, too.
2.2. Public-key techniques
Public-key techniques are based on secret/public key pair. In user authentication public-key techniques can be used so, that claimant demonstrates knowledge of its private key. There are two ways to do that:
Incorporating a self-generated random number (so called confounder) into the data over which the response is computed may be helpful with these problems. Such data may be made available to the verifier in cleartext to allow identification.[1]
Challenge-response based on public-key decryption.[1]
Let's study the following protocols.
Public-key decryption and witness.
Here PA denotes the public-key encryption (e.g. RSA) algorithm of A, and h denotes a one-way hash function.
Modified Needham-Schroeder public-key identification protocol.
The modified Needham-Schroeder public-key protocol provides mutual authentication and key transport of distinct keys k1,k2 from A to B and from B to A, respectively. If the key establishment feature is not required, k1 and k2 may be omitted. With PB denoting the public-key encryption algorithm for B (e.g. RSA), the messages in the modified protocol for user authentication are then as follows (keys are omitted):
Challenge-response based on digital signatures.[1]
Let's study the following protocols.
X.509 mechanisms based on digital signatures.
The ITU-T X.509 two and three-way strong authentication protocols specify identification techniques based on digital signatures and, respectively, timestamps and random number challenges. Optionally, these protocols can be used for transporting keys. Since key transporting is out of the scope of this paper, it is not presented here.
X.509 strong two-way protocol.
Let rA and rB denote never re-used numbers, and certA and certB denote certificates binding parties A and B to public keys which are suitable for both encryption and signature verification. SA(x) denotes the result of applying A's signature private key to x (respectively to B). Let's assume that both parties have their public key pairs for signatures and encryption. Also, A must have B's (authenticated) public key. With these markings and assumptions the next messages are sent during authentication:
Because the previous protocol doesn't specify inclusion of an identifier within the scope of the encryption PB within DA, one can't guarantee the signing party actually knows the plaintext key.[1]
X.509 strong three-way protocol.
ISO/IEC 9798-3 mechanisms.
ISO/IEC 9798-3 includes three challenge-response identification mechanisms based on digital signatures. These mechanisms are analogous to the ISO/IEC 9798-2 techniques which are based on symmetric keys (see 2.1). As in 9798-2, let's rA and tA, respectively, denote a random number and timestamp generated by A. SA denotes A's signature mechanism (e.g., DSA); if this mechanism provides message recovery, some of the cleartext fields listed below are redundant and can be omitted. certA denotes the public-key certificate containing A's signature public key. (In these mechanisms, if the verifier has the authentic public-key of the claimant a priori, certificates can be omitted; otherwise, it's assumed that the verifier has appropriate information to verify the validity of the public key contained in a received certificate).
2.3. Attacks on user authetication protocols
This chapter concerns attacks on user authentication protocols. The following lists some definitions of attacking which are given in reference [1].
Definition 2.2
When a system is wanted to be protected against attacks the following principles can be useful. At first, type of attack is described and then a way how to protect against it.
During all user authentication protocols between A and B, an attacker C may come on the communication line and simply relay (without modificating) the messages between legitimates parties A and B. So, A and B see C as a communication link. Usually this is not considered as an "attack", because it doesn't alter aliveness assurance delivered by the protocol. Some special applications may suffer this problem[1]. Since identification protocols do not provide assurances about the physical location of the authenticated party, the following can be possible is some special cases. This is known as grandmaster postal-chess problem. An attacker C attemps to impersonate B, is challenged (to prove it's B) by A, and is able to relay the challenge on to the real B, get a proper response from B, and passes this response along back to A. In this case, additional measures are necessary to prevent a challenged entity from elicting aid in computing responses. Also, keys shouldn't use for many purposes, because it may allow chosen-text attacks.
Quite often authentication protocols guarantee the identity only at a given instant in time. However, sometimes the identity should be guaranteed for a long time. For example, if an attacker comes on the line just after successful authentication and communication has begun, some additional methods are needed. Actually, there exist a couple of ways to handle this problem. Firstly, the system can perform re-authentication periodically or for each different resource. Secondly, the authentication process can be tied to an ongoing integrity service. In this case, the authentication process should be integrated with a key establishment mechanism, such that a by-product of successful identification is a session key appropriate for use in a subsequent ongoing integrity mechanism[1].
Finally let's see someting about required security level for on-line versus off-line attacks. Generally the required security level for identification protocol depends on the environment and the used application. The probability of success of guessing attacks should be considered, and distinguished from the amount of computation required to mount on-line or off-line attacks (using the best known techniques). The following lists some examples from the reference [1].
3. Case studies
This chapter contains case studies of some well-known user authentication systems which rely on encryption.
3.1. VeriSign [4],[5],[6],[12]
VeriSign Incorporation grew out of RSA Data Security in 1995. At that time leaders of the RSA Data Security realized digital authentication was different business from RSA's. So, at the moment VeriSign Inc. is well-doing incorporation and it's products are Digital ID public- and private-label certificates. This chapter explains something about VeriSing DigitalIDs.
VeriSing can be considered as a trusted third party. When the company wants to activate new public key certificates, seven authorized people have to be present. Each person has chip-embeded plastic key.
VeriSign offers four classes of digital certificates. The following lists classes and examples of them.
VeriSign has a DigitalID Center which issues ID Classes 1 and 2 for Internet email and WWW users (the Center is located in DigitalID.verisign.com). For ID classes 3 and 4 registration is online and verification is offline.
VeriSign's technology for checking certificates can be integrated to application software, e.g., web browsers and mailing software. After integration the system checks transparently public key codes associated with those files. The user gets information only if something is wrong with these codes. For encrypting VeriSign uses RSA public-key algorithm.
A rumour tells that there is some kind of back door in the VeriSign system. Obviously, if that is true, authentication is not legally valid.
3.2. Kerberos
Kerberos is an authetication protocol which uses secret-key cryptography. This protocol was created in Athena project in Massachusets Institute of Technology (MIT). Because strong cryptography is used this the protocol can be used across an insecure network connection. Kerberos is freely available from MIT.[3],[7] The rest of this chapter describes the implementation of Kerberos and some security holes are introduced. The presentation of Kerberos protocol is based on references [1],[3],[7], and [9].
In the Kerberos protocol a series of encrypted messages is used to prove to the verifier that the claimant is who it claims to be. Partly, Kerberos is based on the Needham-Schroeder authentication protocol (see 2.1). It can be thought that the client is running on behalf the user. To be more presice the client has knowledge of an secret key which is known only by the user and the authentication server. The user's encryption key is derived from a password. Similarly, each application server shares an encryption key with the authentication server and it is called server key.
When a message is sent in Kerberos, it calculates a checksum for each message. If encrypted message is tried to open with wrong key or the message is changed the checksum doesn't match the data anymore and so message is ignored. Kerberos uses DES for encryption.
Initially, the server doesn't have an encryption key for a particular user. When a client (a user) wants to become authenticated on a server, the client asks authentication server to create a new encryption key and to distribute it securely to both parties. This new encryption key is called a session key and the message which is used to distribute the key to verifier is called Kerberos ticket. This ticket is a certificate issued by an authentication server, encrypted using the server key. Among other information, the ticket contains the random session key that will be used for authentication of the principal to the verifier, the name of the principal to whom the session key was issued, and an expiration time after which the session key is no longer valid. The ticket is not sent directly to the verifier, but is instead sent to the client who forwards it to the verifier as part of the application request. Because the ticket is encrypted under the server key, known only by the authentication server and intended verifier, the client cannot modify the ticket without detection.
The picture 3-1 and the following message chart explain the basic Kerberos protocol. The following lists abbreviations usually used with Kerberos.
When the verifier (S) has received the message (3), it decrypts the ticket, extracts the session key, and uses the session key to decrypt the authenticator. Now, if the same key was used to encrypt and decrypt the authenticator, the checksum will match and the verifier can assume the authenticator was generated by the entity named in the ticket and to whom the session key was issued. However, this is not sufficient for authentication since an attacker can intercept an authenticator and replay it later to impersonate the user. For this reason the
verifier also checks the timestamp to make sure that the authenticator is fresh. If the timestamp is within a specified window (usually around 5 minutes), and if the timestamp has not been seen earlier within that window, the verifier accepts the request as authentic. Now the identity of the client has been verified by the server. Sometimes the client also wants to be sure of the server's identity. If such mutual authentication is required, the server generates an application response by extracting the client's time from the authenticator, and returns it to the client.
A separate ticket and session key are required for each client-verifier pair. When a client want to create a connection with a particular verifier, the client uses the authentication request and response ((1) and (2)) to obtain a ticket and session key from the authentication server (or Kerberos, K). In the request, the client sends the authentication server its claimed identity, the name of the verifier, a requested expiration time for the ticket, and a random number that will be used to match the authentication response with the request.
In response the session key, the assigned expiration time, the random number from the request, the name of the verifier are returned from authentication server. These all are encrypted with the user's password registered with the authentication server, together with a ticket containing similar information, and which is to be forwarded to the verifier as part of the application request. Together, the authentication request and response and the application request and response comprise the basic Kerberos authentication protocol.
When using the basic Kerberos authentication protocol, user must input the password every time she wants to become verified by a new verifier. Someone may find this quite irritating. The obvious solution is cache user's password to the workstation when she logs in. This system has a dangerous backward. Though a Kerberos ticket and the key associated with it are valid for only a short time, the user's password can be used to obtain tickets, and to impersonate the user until the password is changed. More sophisticated way to solve this problem is to cache only tickets and encryption keys which will be valid for a limited time. Tickets and encryption keys are called credentials.
The ticket granting exchange of the Kerberos protocol allows a user to obtain tickets and encryption keys using such short-lived credentials, without re-entry of the user's password. When the user first logs in, an authentication request is issued and a ticket and session key for the ticket granting service is returned by the authentication server. This ticket, called a ticket granting ticket, has a relatively short life (typically on the order of 8 hours). The response is decrypted, the ticket and session key saved, and the user's password forgotten.
In a system that crosses organizational boundaries, it is not appropriate for all users to be registered with a single authentication server. Instead, multiple authentication servers will exist, each responsible for a subset of the users or servers in the system. The subset of the users and servers registered with a particular authentication server is called a realm (if a realm is replicated, users will be registered with more than one authentication server). Cross-realm authentication allows a principal to prove its identity to a server registered in a different realm.
To prove its identity to a server in a remote realm, a Kerberos principal obtains a ticket granting ticket for the remote realm from its local authentication server. This requires the principals's local authentication server to share a cross-realm key with the verifier's authentication server. The principal next uses the ticket granting exchange to request a ticket for the verifier from the verifier's authentication server, which detects that the ticket granting ticket was issued in a foreing realm, looks up the cross-realm key, verifies the validity of ticket granting ticket, and issues a ticket and session key to the client. The name of the client, embedded in the ticket, includes the name of the realm in which the client was registered.
The Kerberos authentication protocol has many weaknesses. These are heavenly studied in the reference [8] and the rest of this chapter is based on the same reference.
The following lists some Kerberos' weaknesses:
3.3. Secure Shell (SSH)
Secure Shell (SSH) is a product of Data Fellows. Originally, SSH has been developed by Tatu Ylönen.
SSH offers transport -layer security -mechanism using packet mechanism and related authentication, key exchange, encryption, and integrity. An attacker is limited to only breaking the connection.[10] The rest of this chapter explains host authentication and user authentication methods used in SSH.
The SSH server sends its public RSA host key and another public RSA key, called server key, that changes every hour. Then the client compares the received host key against its own database of known host keys. Usually SSH server accepts the key of an unknown host and store it in its database for future reference (this makes use of SSH practical and flexible in most environments), but server can also be configured to refuse access to any hosts whose key is not known.
The picture 3-2 shows the message flowchart between client and server.
The client sends a message to the server. This message is formed in following way. The client generates a 256 bit random number (session key), chooses an encryption algorithm (e.g., IDEA or 3DES). Now the client encrypts the session key using RSA under both the host and the server keys. Now the message is ready.
With the host key the connection to the desired server host (only the server can decrypt the encrypted session key) is bound. The hourly changed server key is used to make decrypting recorded historic traffic impossible in the event that the host key becomes compromised. The host key is normally a 1024 bit RSA key, and the server key is 768 bits. Both keys are generated using a cryptographically strong random number generator.
When the server has received the message, it decrypts the message and recovers the session key. Now both entities start using the session key and the connection is encrypted. Finally, the server sends an encrypted confirmation to the client. When the client has received the confirmation it knows that the server was able to decrypt the key, and now it holds the proper private keys.
Now the server has been (successfully) authenticated, and encryption and integrity protection are in use on the transport-layer. Now the actual user authentication will start.
The actual user authentication can be done in many ways in SSH. The client starts the user authentication and it sends requests to the server. The server replies always "success" or "failure". In the latter case further authentication is needed.
The following lists current user authentication methods:[10]
In the local host runs a authetication agent. In the future this can be replaced with a smartcard. The meaning of the agent is to hold user's private RSA keys. The agent accepts authentication requests and gives back suitable answers. It never gives out the private keys. In the UNIX environments agents communicate with a SSH server using open file handles which are inherited by all children of the agent process. Other users cannot get access to the agent. Other OSs are using different mechanisms. The picture 3-3 shows this in UNIX. When the user connects to a SSH server the authentication requests are forwarded to the local machine where the authentication agent is running. This scheme offers possibility to take new connections and go through an arbitrarily long chain of hosts and still the authentication process will take place on the local machine and authentication keys need not be transmitted outside of the agent.
3.4. SecurID [11]
SecurID is a product of Metadigm Ltd. It is a credit sized device that displays a 6 digit number that changes in an unpredictable way every 60 seconds. When SecurID is used for user authentication, the user enters the number currently displayed when she logs in. The synchronized time and card codes are stored to an ACE server. The ACE server runs on a SPARC Solaris system. The ACE server can be accessed by other security systems and asked to verify a login attempt.
This system can be used to authenticate remote users on the Internet if Metadigm's FireWall-1 is used. Also, SecurID can be used to authenticate users on Post Offices, dial-up servers, and databases.
No more technical information were available on the Internet.
User authentication is becoming more and more important issue in security area. So far, most discussions of Internet have been focused on encryption, but now authentication is considered very important issue, too.
As we have seen, lot's of techniques have been developed to authenticate user's. For user authentication it is possible use passwords, encryption or zero-knowledge protocols. This paper described how symmetric key and public key techniques can be used for user authentication.
Instead of using secret passwords or passphrases, the "secret" can be obtained from a device. The device either computes the response or it knows a kind of password which is valid at the moment.
Encryption methods are preferable than passwords. However, in user authentication protocols which are based on encryption have security holes. For example, those protocols may leak some partial information and an attacker may be able to gather the secret from the partial information. So, ZK protocols are considered more secure than protocols which are based on encryption.