skip to content

When an NFC card and a door reader complete a keyed challenge-response, why does mutual authentication not stop a relay, and what does?

level: seniorimportance: must knowfreq 38%

answer

  1. genuine card, genuine reader
  2. forwarded, not forged
  3. application-layer crypto is blind to time
  4. light sets a lower bound on delay
  5. when the card cannot change: add a person

basics

~10 s

Relay forwards a genuine exchange between a far-away card and a reader, so every cryptographic check passes. Only a distance-bounding measure on round-trip time, or a user-presence step, addresses it.

solid answer

~50 s

In a relay the card and the reader are both genuine; the exchange between them is carried over a larger distance, so the reader verifies a card that is actually far away. Hancke and Kuhn (2005) say relay attacks cannot easily be prevented by cryptographic protocols at the application layer, because the lower layers blur message arrival times. Their proposed defence is distance bounding: measure the round-trip delay of the radio signal, since nothing propagates faster than light, and so bound the card's distance; they note it needs sub-microsecond timing, tightly integrated in the physical layer. A deployed card base usually cannot gain that with a software change, since it lives in the radio hardware, so the practical controls are products that specify it, a user-presence step such as a PIN or phone unlock at high-value doors, and review of the access logs.

go deeper

for a junior

Recall that relay forwards a genuine exchange over a distance, so the reader thinks a far-away card is nearby.

for a middle

Explain why cryptography alone passes and what distance bounding measures: round-trip delay, bounded by the speed of light.

for a senior

Choose compensating controls per door for a card base that cannot gain distance bounding, and name the log pattern that suggests relay and what it cannot prove.

for a principal

Decide which doors must wait for hardware with timing support and which accept user presence as the residual-risk control, and who signs for that.

## What relay is, and why the cryptography passes A **relay** is a threat model, not a break of any algorithm. A genuine card and a genuine reader are made to behave as if they were adjacent, by forwarding the messages they exchange over a larger distance. Hancke and Kuhn describe the effect in the abstract of their 2005 paper: tokens used for proximity authentication are vulnerable because the limited range of the radio channel can be circumvented by forwarding exchanged signals over larger distances, and as a result the reader reports that it has verified the presence of a token that is actually far away. The paper notes this applies to tokens that implement cryptographic authentication over an ISO/IEC 14443 link. That is why mutual authentication does not help here. The reader sends a fresh challenge, the genuine card answers it with its secret key, and the answer is forwarded unchanged. Every check is satisfied, because nothing in the exchange is forged. What went wrong is the assumption that a successful exchange implies the card is nearby. Treating the short range as a security property is the design error; the design assumed physics would enforce proximity, and the protocol never checked it. ## Why the fix is in the timing, not in the cipher Hancke and Kuhn state that relay attacks cannot easily be prevented by cryptographic protocols that operate at the application layer of an RFID protocol stack. At that layer, information about arrival times of messages has already been blurred by synchronisation, collision-avoidance, demodulation, symbol-detection, error-detection and retransmission mechanisms in the lower layers. Their conclusion is that the only effective defence is a **distance-bounding** or secure-positioning protocol tightly integrated into the physical layer, to obtain high-resolution timing information about individual bits. The principle in four steps: 1. The reader sends a challenge and starts a clock. 2. The card's response comes back as quickly as the hardware allows. 3. The reader stops the clock and computes the round-trip delay. 4. No information can propagate faster than light (0.3 metres per nanosecond), so the delay sets an **upper bound** on the distance; a delay that is too long is rejected. The paper says only with sub-microsecond timing information can a cryptographic protocol rely directly on that law of physics. It proposes its own protocol, aimed at simple, low-power hardware in the token. That tells a product team what to ask for: a property of the card and reader hardware and their specification, not a setting to switch on. ## What an operator can do when the card cannot change | Control | What it does | What it leaves open | |---|---|---| | Products that specify distance bounding | Bounds the card's distance by timing | Needs new cards and readers; ask the vendor for the specification rather than assuming it | | User presence at the door | A PIN, a device unlock or another deliberate act ties the tap to a person | Does not prove the person is at the door | | Second factor at high-value doors | Raises the cost of an unattended tap | Adds friction and a failure path | | Log review | Looks for one credential used at two places, or at a door while its holder was elsewhere | Can suggest a relay; cannot prove one | | Shielded holders | Limits unattended reads of a card carried in a bag | Does nothing once the holder taps a reader that is being relayed | ## Reading the signals Relay leaves no cryptographic failure, so there is no "authentication failed" event to alert on. The usable signals are behavioural: a credential that appears at a door while the card's own most recent location was elsewhere, reads at a door at odd times with no matching entry on camera, or a holder reporting a card was not with them. Use them to prioritise doors for stronger controls, and say what they cannot show. ## What mutual authentication still buys It still defeats the other half of the picture: a copied identifier, a recorded answer replayed later, and a counterfeit reader that cannot prove the key. The review should record that relay is residual risk after those controls, and who accepts it per door. ## Interview framing A strong answer defines relay in one sentence, explains why the cryptography passes, names the physical-layer timing fix and its constraint (sub-microsecond timing, hardware), and then gives compensating controls for an installed base. A weak answer proposes longer keys or a shorter challenge timeout at the application layer, which do not address the problem. Payment-network controls for contactless cards are covered with the material on the payment exchange.

  • Why can an application-layer timeout not replace distance bounding?
    Application-layer messages have passed through synchronisation, collision handling, error detection and retransmission, which blur arrival times. Hancke and Kuhn say the defence has to be tightly integrated into the physical layer to get high-resolution timing. A timeout at the application layer is too coarse to bound distance.
  • Does requiring a PIN or device unlock stop relay?
    It reduces risk without bounding distance. A person must act, so a card in a bag cannot be used by an unattended tap, but the genuine exchange can still be forwarded while the person acts. Treat user presence as a compensating control and record what it leaves open.

  • Says longer keys or stronger AES prevent relay
  • Believes the reader will log an authentication failure for a relay
  • Treats the few-centimetre range as proof the card is nearby
  • Proposes a shorter application-layer timeout as the fix
  • Says mutual authentication measures distance