Definition
Authentication is the process by which a verifier, the party that checks, obtains evidence that a claimed identity is genuine. Message authentication shows that a message was produced, unchanged, by a holder of a particular credential, typically a secret key. Entity authentication shows that a holder of that credential is taking part in the current exchange. In cryptographic protocols the evidence is a value that only a holder of the key can compute. Authentication establishes who stands behind a request, not what that party may do.
The idea
A door lock receives the radio command “open door 7”. The bytes say what to do; they say nothing reliable about who sent them, since anyone with a radio can transmit the same bytes. The lock needs evidence tied to something only the legitimate sender has. In digital systems that something is a secret key, and the evidence is a value computed from the message and the key, which nobody without the key can compute.
A wax seal on a letter is the old form of the idea. Only the owner of the signet ring can make the impression, and a broken seal shows that someone opened the letter. The picture is right in two respects: the seal shows which ring was used, and it reveals a change to the contents. It fails in two others. The seal shows that the ring was pressed, not who pressed it: whoever steals the ring makes perfect seals. And a sealed letter can be delivered twice. A cryptographic tag is equally valid on an exact copy of an old message, so authentication alone does not show that a message is new.
How it works
Every authentication scheme has four stages.
Enrollment §5.28: before any check, an identity is bound to a credential. A device receives a secret key at manufacture, or an authority certifies that a public key belongs to a named server.
Claim: the claimant, the party being authenticated, asserts an identity, for example by naming a key identifier in a message or at the start of a session.
Evidence: the claimant produces a value that requires the credential.
Verification: the verifier checks the evidence against the credential enrolled for the claimed identity, and accepts or rejects.
Credentials fall into three classes, called authentication factors: something the claimant knows, such as a password or a PIN (personal identification number); something it has, such as a key stored in a device or a smart card; and something it is, such as a fingerprint. Multi-factor authentication requires factors from at least two different classes, so that stealing one is not enough.
Between machines the evidence is cryptographic.
With a message authentication code §5.7 (MAC), sender and receiver share one secret key . The sender computes a tag over the exact message bytes and sends together with . The receiver recomputes the tag over the bytes it received, using its own copy of , and accepts if the two tags are equal. Every holder of can produce valid tags.
With a digital signature §5.14, the signer holds a private key that nobody else has, and every verifier holds the matching public key. A valid signature shows that the private key was used on these bytes. Verifiers cannot produce signatures, so a signature distinguishes the signer from every verifier, which a shared MAC key cannot do.
Entity authentication adds freshness, meaning proof that the evidence was made now and not recorded earlier. The verifier sends a challenge: an unpredictable value that it has never used before. Such a single-use value is called a nonce §5.18 (a number used once). The claimant answers with a tag or signature over the challenge and the context of the exchange, such as both parties’ identities. An answer recorded in an earlier exchange covers a different challenge, so it fails. When both sides authenticate each other this way, the exchange is called mutual authentication.
The comparison of tags must take the same time wherever the first wrong byte is. A comparison that stops at the first difference lets an attacker who measures response times §9.32 find the correct tag one byte at a time, through a timing side channel §1.29.
Worked example
A hypothetical lock and its controller share a key and use a MAC with 128-bit tags. The lock stores the last counter value it accepted, now 17. The controller sends = “open door 7, counter 18” with its tag . The lock recomputes the tag over , finds it equal to , checks that , carries out the command and stores 18. Four variations follow.
An attacker changes “door 7” to “door 8” and keeps . The correct tag over the changed bytes differs from , so the lock rejects the message. A blind guess at the correct 128-bit tag succeeds with probability .
An attacker records the genuine message and sends it again. The tag is valid, because nothing was changed: authentication alone accepts the copy. The counter check rejects it, because is false. Freshness is a separate check from authentication.
The controller sends “open door 7, counter 19”. The tag is valid and , so the message is authentic and fresh. Whether this controller may open door 7 at this hour is a third question, decided by authorization §1.7.
Alice and Bob both hold . A valid tag shows that Alice or Bob, or anyone else who obtained , produced the message. It cannot show which. If Alice instead signed with a private key that only Alice holds, a valid signature would show that Alice’s key was used.
Stated precisely
Let be a key, a message given as an exact byte string, and a tag; returns accept or reject. The security notion for a MAC is unforgeability under chosen-message attack §19.1.8: an attacker who does not know , and who may obtain valid tags on any messages it chooses, cannot produce an accepted pair for any message it did not obtain a tag for, except with negligible probability, about per attempt for a good MAC with -bit tags.
Acceptance of then establishes one fact under three named assumptions.
Unforgeability: the MAC is unforgeable in the sense above.
Key custody: is held only by a known set of parties, and none of them has leaked it.
Correct enrollment: the verifier checked against the key enrolled for the claimed identity.
The fact: some member of computed a tag on exactly the bytes , at some earlier time. The set includes the verifier itself, so a protocol must stop an attacker from sending the verifier’s own tagged messages back to it, for example by putting the sender’s identity or the direction of travel into . For a signature, is the single holder of the private key, and correct enrollment means a correct binding of the public key to that holder.
The fact says nothing about when the tag was computed, which member of computed it, whether that member is honest, whether the content is true, or whether the request is permitted. Entity authentication with a fresh challenge adds one fact: the answer over was computed after was chosen, so a holder of the credential took part in this exchange.
Limits and common mistakes
Authentication is not authorization. Knowing that a request comes from technician T says nothing about whether T may make it.
Authentication is not freshness. An exact copy of an old message authenticates perfectly. A counter, a timestamp or a challenge inside the authenticated bytes is needed to defeat a replay attack §1.26.
A stolen credential authenticates. Authentication proves that the key was used, not which person used it. The response to theft is key revocation §5.32: withdrawing the credential so that verifiers stop accepting it.
A shared key gives no individual accountability. Any holder can deny having sent a message, because another holder could have produced the same tag. Only a signature, whose private key one party holds, can tie a message to one key holder.
Encryption is not authentication. In counter mode §15.5, for example, flipping one bit of the encrypted message flips the same bit of the decrypted message, and the receiver cannot notice. Integrity §1.9 of the message needs a MAC, a signature or authenticated encryption §5.16.
The authenticated bytes must be the bytes that are used. If the receiver acts on a field the tag did not cover, or interprets the bytes differently from the sender, the tag protects nothing that matters.
Authenticating a channel is not authenticating an object. A secure connection such as TLS (Transport Layer Security) proves who is at the other end of the connection; it does not prove who created a file that the other end merely passes on.
Authentic does not mean safe. A program signed with a genuine key can still contain a bug or ask for something harmful.
Questions answered
What exactly does successful authentication prove about a sender?
Successful authentication proves that a holder of the credential that the verifier checked used that credential on exactly the bytes being verified, and nothing more. It does not prove that the sender, the party that delivered those bytes, holds the credential: anyone can pass on a valid message unchanged, or record one and send it again. With a message authentication code (MAC), a tag computed from the message and a shared secret key, it proves that some holder of that key computed the tag over exactly these message bytes, at some time. With a digital signature, it proves that the matching private key was used on exactly these bytes. With a fresh challenge, a new random value the sender had to answer, it proves that a holder of the credential took part in this exchange. These conclusions hold only if three conditions are met: the scheme cannot be forged without the key, the key has not leaked, and the verifier checked against the key enrolled for the claimed identity.
It does not prove which person acted, only which credential was used; with a shared key it does not even prove which holder. It does not prove that the message is new, since an exact copy of an old message passes. It does not prove that the sender is honest, that the content is true or safe, or that the sender may make the request; the last is the separate question of authorization.
Related entries: Authorization (§1.7), Replay attack (§1.26), Message authentication code (MAC) (§5.7), Digital signature (§5.14), Proof of possession (§5.30), Nonce (§5.18), Key revocation (§5.32), Authenticity versus authorship (§1.38), Channel confidentiality versus object authenticity (§7.34).