Hitag2
NXP's 48-bit RFID stream cipher used in car immobilisers; practically broken
Source found and wired, correctness not fully proven. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.
About Hitag2
Hitag2 is a stream cipher. It uses a 6-byte (48-bit) key and an 8-byte nonce. NextSSL lists it in the unverified tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).
Overview
Hitag2 is a proprietary stream cipher used by NXP in RFID transponders, notably in vehicle immobilisers and remote keyless entry systems. Its 48-bit key and simple structure have been comprehensively broken.
Hitag2 uses a 48-bit linear feedback shift register filtered through a two-level non-linear Boolean function that combines 20 register bits into one output bit. During authentication the tag's identifier and a reader nonce are loaded into the register together with the secret key. The algorithm was reverse-engineered from the transponders.
NextSSL includes Hitag2 for security research and analysis of existing systems. Many vehicles that rely on Hitag2-based immobilisers remain in service, which is why tools for analysing it remain relevant to security research. Hitag2 is a standard example of why proprietary ciphers with short keys fail once their design is reverse-engineered.
Security notes
Hitag2 is broken: published attacks recover the 48-bit key from a small number of authentication traces in minutes, and have been demonstrated against real vehicle immobilisers. It must not be used to protect anything.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| key | 6 | Secret key |
| nonce | 8 | Nonce / IV |
Use it
from nextssl_demo import NextSSL
root = NextSSL(root=True) # tier 'unverified' is reachable from the root API only
ct = root.call("stream_apply", "hitag2", None, key, nonce, b"secret")[0] # same call decrypts
nextssl_root_stream_apply("hitag2", NULL, key, nonce, data, out);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let alg = reg::new_streamcipher_in(reg::all(), Policy::Any, "hitag2", &Params::new())?;
let ct = alg.apply_keystream(&key, &nonce, b"secret")?;
Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.
Similar names
Looking for something else?More stream ciphers
All 37Frequently asked questions
What is Hitag2?
Hitag2 is a stream cipher in the Hitag2 family. Hitag2 is a proprietary stream cipher used by NXP in RFID transponders, notably in vehicle immobilisers and remote keyless entry systems.
What are the Hitag2 sizes?
In NextSSL, Hitag2 uses: key 6 bytes, nonce 8 bytes.
Who designed Hitag2 and when?
Hitag2 belongs to the Hitag2 family, first published by NXP Semiconductors (Philips).
Is Hitag2 safe to use?
Hitag2 is in the unverified tier. Source found and wired, correctness not fully proven. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).