Keyless Entry & Immobilizers

From simple radio remotes to Passive Keyless Entry (PKE) and smartphone integration. Modern systems use rolling codes, encrypted communication, and UWB to prevent theft and relay attacks.

Period1949-Present

The Evolution of Car Keys

Before keyless entry, cars used simple metal keys that mechanically engaged tumblers in the ignition and door locks. Theft was as simple as hotwiring — bypassing the ignition switch entirely by connecting the starter wire to battery. The introduction of electronic security changed everything, making car theft significantly more difficult but also creating new attack surfaces.

Remote Keyless Entry (RKE)

The first remote keyless entry systems used a simple radio transmitter in the key fob sending a fixed code to a receiver in the car. Operating at 315 MHz (US) or 433 MHz (EU), these systems transmitted a binary code when the button was pressed. Pressing the button would unlock the doors. These systems were vulnerable to replay attacks — recording the signal and playing it back to unlock the car.

The fixed-code vulnerability was demonstrated in 2005 when researchers at Johns Hopkins University cloned a Mercedes key fob by capturing the 40-bit rolling code using a $40 radio transmitter and a laptop. The attack required capturing just one transmission from the legitimate key.

Rolling Codes

To defeat replay attacks, manufacturers introduced rolling codes (also called code hopping). The fob and car share a synchronized algorithm that generates a new pseudo-random code for each transmission. Even if an attacker records the code, it won't work again because the receiver only accepts the next code in the sequence. The system typically uses AES-128 encryption and advances the counter after each successful use.

The most widely used rolling code algorithm is KeeLoq, developed by Microchip Technology. KeeLoq uses a 64-bit encryption key and a 32-bit counter. The counter is encrypted using 528 rounds of a nonlinear feedback shift register (NLFSR) operation to produce the 32-bit hopping code. The receiver maintains a look-ahead window (typically 256 codes) to account for missed button presses.

Rolling Code (KeeLoq) Operation:

  Key Fob:
    1. Counter starts at N
    2. Code = KeeLoq_Encrypt(N, Key64)
    3. Transmit [Code, Button ID]
    4. Increment counter to N+1

  Receiver:
    1. Receive [Code, Button ID]
    2. For i = N to N+256:
         if Code == KeeLoq_Encrypt(i, Key64):
           Accept → increment stored counter to i+1
           Execute command
           break
    3. If no match → reject (possible replay attack)

Passive Keyless Entry (PKE)

PKE detects when the authorized key is near the vehicle (typically within 1–2 meters) and automatically unlocks doors when the driver touches the door handle. The car sends a low-frequency (125 kHz LF) challenge to the key, which responds with a high-frequency (315/433 MHz) cryptographic signature. The driver never needs to press a button — the system is always listening.

PKE systems use a challenge-response protocol:

  • Step 1 (Car → Key): Car transmits 125 kHz LF wake-up signal with a random challenge nonce
  • Step 2 (Key → Car): Key receives LF signal, authenticates it, computes a cryptographic response (AES-128 or proprietary), and transmits the response on 315/433 MHz UHF
  • Step 3 (Car): Car verifies the response. If valid, unlocks doors and enables push-to-start. The entire exchange completes in <100 ms

This convenience came with a new vulnerability: the relay attack. Because the LF field from the car is weak (limited to ~2m range), and the key only responds when it receives the LF signal, an attacker must bridge the gap between car and key using relay devices.

Relay Attacks

In a relay attack, thieves use a pair of radio devices to extend the PKE signal from the victim's key (inside their home) to the car parked outside. The car thinks the key is present and unlocks. This attack, costing UK insurers over £1.5 billion annually, led to new countermeasures.

The attack works in three steps:

  • Relay device 1 (near key): A wideband antenna captures the 125 kHz LF wake-up signal from the car and retransmits it near the victim's key. The key receives the LF signal and responds with the 315 MHz UHF authentication code
  • Relay device 2 (near car): Captures the 315 MHz UHF response from the key and retransmits it near the car. The car receives the valid authentication code and unlocks
  • Total delay: The relay typically adds 10–50 ms of latency, well within the PKE system's tolerance. The entire attack takes seconds and can be executed without the owner's knowledge

Relay devices are readily available online for $50–200. They are small enough to conceal in a backpack or jacket pocket, making the attack unnoticeable.

Ultra-Wideband (UWB) PKE

The latest generation of PKE uses Ultra-Wideband (UWB) technology to prevent relay attacks. UWB operates across a wide frequency spectrum (6–8.5 GHz in IEEE 802.15.4z) and measures the precise time-of-flight of radio signals, enabling accurate distance measurement:

  • Time-of-flight measurement: UWB measures signal propagation time with sub-nanosecond precision, enabling centimeter-level distance accuracy. A relay attack adds measurable delay (propagation through cables and electronics), which UWB detects as an anomalous distance
  • Scrambled Timestamp Sequence (STS): IEEE 802.15.4z adds a cryptographic STS to UWB packets, preventing signal manipulation and ensuring the distance measurement is authentic
  • Distance bounding: The car measures the round-trip time to the key and compares it to the expected distance. If the measured distance exceeds a threshold (typically 2–3 meters), authentication fails

Apple (AirTag, iPhone), Samsung (Galaxy SmartTag), and BMW have deployed UWB digital car keys. The Digital Key Consortium (CCC — Car Connectivity Consortium) defines the standard for UWB-based car keys, ensuring cross-manufacturer interoperability.

Immobilizers

Immobilizer systems prevent the engine from starting unless the correct transponder chip is present in the key. When the driver turns the ignition to "ON", the car's immobilizer antenna (a coil around the ignition barrel) sends a 125 kHz challenge to the transponder chip in the key. The chip responds with a cryptographic code. If the code matches, the engine control module (ECM) enables fuel injection and ignition. If not, the ECM disables the fuel pump and injector drivers.

  • VATS (1986): GM's Vehicle Anti-Theft System used a resistor-coded key. The ignition key contained a 10Ω resistor pellet. The car measured the resistance — if it didn't match the expected value, the starter was disabled. Crude but effective against hotwiring
  • PATS (1996): Ford's Passive Anti-Theft System used a transponder chip in the key head. 40-bit encryption. The transponder is passive (no battery) — powered by the LF field from the ignition coil
  • Hitag2/Hitag Pro: NXP transponder chips with 48-bit or 96-bit challenge-response authentication. Used in most European vehicles since 2000. Vulnerable to cryptanalytic attacks if the key can be cloned via OBD-II
  • AES-128 immobilizers: Modern systems (post-2015) use 128-bit AES for immobilizer authentication. The key and car share a secret key (programmed during manufacturing or dealer key learning). Cloning requires physical access to the OBD-II port and specialized tools

Since their introduction, vehicle theft in equipped countries dropped significantly — in the UK, vehicle theft fell by 50% between 1995 and 2005, largely attributed to immobilizer adoption. However, sophisticated thieves adapted by focusing on relay attacks (bypassing the immobilizer by extending the key's signal) and key programming attacks (using OBD-II tools to register new keys to the car's immobilizer system).

Timeline

1949Chrysler introduces first car remoteCode Hopping receiver technology
1982Ford PATS (Passive Anti-Theft System)Transponder-based immobilizer
1986GM VATS (Vehicle Anti-Theft System)Resistor-coded ignition key
1995Remote Keyless Entry (RKE) widespreadPKE begins appearing on luxury vehicles
1998Rolling codes mandated by law in some regionsTo prevent replay attacks
2003Immobilizers standard on most vehiclesEurope mandates since 1998
2016Smartphone-as-key appearsDigital car keys from BMW, Tesla
2020sUWB for secure PKEUltra-Wideband prevents relay attacks