b a c k t o t o p

Smart Card Technologies Compared: 125kHz, MIFARE Classic, MIFARE DESFire EV3

Access Control & Security Technology

Introduction

Contactless smart cards appear everywhere today — from office access control to public transport ticketing and cashless payments. However, not all cards offer equal protection. In fact, choosing the right card technology determines whether your system remains secure and future-proof, or instead becomes a vulnerability waiting for exploitation.

Therefore, in this article we compare the most widely used contactless card technologies: 125kHz proximity cards, MIFARE Classic, and MIFARE DESFire EV3. Specifically, we examine their security features, cryptographic capabilities, key management strategies, and also their real-world multi-application use cases.

1. 125kHz Proximity Cards (EM4100, HID Prox)

In summary, Frequency: 125 kHz • Standard: Proprietary (e.g. EM4100/EM4102, HID Prox, AWID, Indala — the list is far from exhaustive) • Memory: Read-only UID / fixed ID number, the exact length depending on the format (e.g. 40-bit EM4100 UID, 26-bit Wiegand H10301 on HID Prox) • Security: ❌ None

How It Works

Among contactless technologies, the 125kHz card ranks as the oldest and most widespread. In essence, the reader energizes the card through electromagnetic induction. As a result, the card then broadcasts a fixed, hardcoded ID number. Because of this simple design, there is consequently no authentication or encryption whatsoever.

Security Analysis

Feature125kHz Prox
Encryption❌ None
Mutual Authentication❌ None
Clone Protection❌ None
Eavesdrop Resistance❌ None
Key Diversification❌ N/A
The brutal truth: In fact, anyone can clone a 125kHz card in under 10 seconds with a $20 device such as a Proxmark3 or T5577 blank card. Because the ID travels in plaintext with zero authentication, any access control system that still relies solely on this technology therefore operates with a critical security gap.

2. MIFARE Classic (1K / 4K)

Frequency: 13.56 MHz • Standard: ISO/IEC 14443 Type A (partially) • Memory: 1KB or 4KB, organized in sectors • Security: ⚠️ Weak — fundamentally broken

How It Works

Historically, NXP introduced MIFARE Classic in the 1990s. Essentially, it relies on a proprietary stream cipher called CRYPTO1. Although this design initially appeared secure, researchers later exposed critical weaknesses in the underlying algorithm. Consequently, each sector's two keys (Key A and Key B) no longer provide meaningful protection.

Memory Structure

  • First, the 1K variant organizes data into 16 sectors × 4 blocks × 16 bytes
  • Similarly, the 4K variant provides 40 sectors in total
  • Moreover, Key A and Key B independently protect each sector
  • In addition, Block 0 (Sector 0) stores manufacturer data and the UID

Security Analysis

FeatureMIFARE Classic
Encryption⚠️ CRYPTO1 (proprietary, broken)
Mutual Authentication⚠️ Yes, but compromised
Clone Protection❌ UID cloneable
Eavesdrop Resistance❌ Vulnerable
Key Diversification✓ Possible (app-level)
Known vulnerabilities: Notably, the Darkside Attack, PRNG weakness, and nested authentication vulnerabilities (all publicly documented since 2008–2012) allow attackers to recover MIFARE Classic keys within seconds. Consequently, tools like Proxmark3 or Android-based cracking apps exploit these flaws with ease.

Key Usage on MIFARE Classic

Despite its weaknesses, some better implementations did use key diversification. In particular, the approach worked as follows:

  • The system stores a master key securely in the reader (ideally in a SAM) or in the backend
  • Then, it derives diversified keys for each card: DiversifiedKey = KDF(MasterKey, UID)
  • As a result, a single cloned card does not directly reveal the master key

However, because CRYPTO1 itself is fundamentally broken, diversification consequently only improves security marginally against a sophisticated attacker.

3. MIFARE DESFire EV3

Frequency: 13.56 MHz • Standard: ISO/IEC 14443-4, ISO 7816-4 • Security: ✓ High assurance when properly configured

How It Works

Currently, NXP positions DESFire EV3 as its mainstream high-security smart card platform. Essentially, it functions as a full multi-application, multi-file card with a genuine operating system running on a secure element. Unlike older technologies, it therefore relies on standard cryptographic primitives rather than proprietary algorithms.

Supported Cryptography

AlgorithmKey SizeUse Case
DES / 2K3DES56 / 112-bitLegacy, not recommended
3K3DES168-bitLegacy migration only
AES-128128-bitRecommended for all new deployments
AES-256—❌ Not supported by DESFire EV3
ECC / asymmetric PKI—❌ Not supported by DESFire EV3 — see MIFARE DUOX (2024) or HID SEOS
Common misconception: DESFire EV3 is a purely symmetric-crypto product. Its symmetric key types are DES/2K3DES, 3K3DES and AES-128 — there is no AES-256 and no elliptic-curve support. Asymmetric cryptography (ECC, ECDSA, certificate-based authentication) arrived with MIFARE DUOX in 2024; that gap in EV3 is precisely why DUOX exists. If your project genuinely requires PKI on the card, choose DUOX, HID SEOS or a JavaCard/PIV-style platform instead.

Security Features

FeatureDESFire EV3
Encryption✓ AES-128 (plus legacy DES/3DES)
Mutual Authentication✓ Full mutual auth (AuthenticateEV2First)
Clone Protection✓ Secure element, random UID option
Eavesdrop Resistance✓ Encrypted channel
Replay Attack Protection✓ Session keys, nonces, command counter
Key Diversification✓ Built-in support (AN10922)
Transaction MAC✓ Introduced in EV2, retained in EV3
Proximity Check✓ Introduced in EV2, retained in EV3
SUN / Secure Dynamic Messaging✓ EV3
The UID is not a credential — not even on EV3: Reading the chip UID (or a “CSN”) requires no authentication on any ISO 14443 card, and it can be replayed by any NFC-capable phone or emulator. Consequently, a system that authorises on the UID of a DESFire EV3 card is exactly as weak as a 125kHz installation, no matter how strong the chip is. Always store the credential inside an AES-protected application file and authenticate before reading it. Where the reader supports it, enable the random UID feature as well.

Key Management on DESFire EV3

Importantly, the card uses a hierarchical key structure with three distinct levels:

  1. First, the PICC Master Key controls the card itself, including application creation and deletion
  2. Second, the Application Master Key manages each application independently
  3. Third, up to 14 Application File Keys per application handle different file operations

Key Diversification in Practice

In addition, Key Diversification functions as a first-class feature on DESFire EV3:

DiversifiedKey = AES-CMAC(MasterKey, [DivConstant || UID || AID || SysID || padding])

By using NXP’s AN10922 diversification scheme (or alternatively a custom KDF), each card therefore receives unique, mathematically derived keys. Consequently, compromising one card reveals nothing about other cards. Note, however, that this protects the cards, not the master key itself — see the SAM discussion below.

Multi-Application Architecture: One Card, Many Systems

The Limits of Older Technologies

A 125kHz proximity card broadcasts a single fixed number, so it can realistically serve only one identity. MIFARE Classic is more capable than it is often given credit for: each sector has its own Key A / Key B, and the MAD (MIFARE Application Directory) was designed precisely to let several applications coexist on one card. Multi-application Classic deployments (campus card = door access + canteen + library) have run for decades. The real problem is not capability but strength: because CRYPTO1 is broken, one operator's compromised sector key can be used to attack the rest of the card, so the cryptographic separation between applications is illusory.

DESFire EV3 Application Model

Card (PICC)
├── PICC Master Key
├── Application 1 (AID: 0x000001) — Building Access
│   ├── App Master Key
│   ├── Key 1 (Read access rights)
│   ├── File 1: Access level data
│   └── File 2: Card metadata
├── Application 2 (AID: 0x000002) — Canteen / Cashless Payment
│   ├── App Master Key (different key!)
│   ├── Key 1 (Read balance)
│   ├── Key 2 (Debit)
│   ├── Key 3 (Credit — only terminal has this)
│   └── File 1: Value file (balance)
├── Application 3 (AID: 0x000003) — Time & Attendance
│   └── ...
└── Application 4 (AID: 0x000004) — Parking
    └── ...
How many applications? The often-quoted limit of 28 applications is the DESFire EV1 figure. From EV2 onwards that hard cap was removed: the practical limit is the available free memory (so hundreds or thousands of small applications are possible), and EV2/EV3 additionally support 2-byte and 3-byte AIDs plus Delegated Application Management (DAM), which lets a third party create and manage its own application on an already-issued card.

Key Isolation Between Applications

Each application benefits from cryptographic isolation. In practice, this means the following:

  • First, the canteen operator knows only the canteen application keys
  • Meanwhile, the access control system knows only its own keys
  • Because of this separation, neither party can therefore read or interfere with the other’s application
  • In addition, the card issuer retains exclusive control over the PICC Master Key
Principle of least privilege — in other words, every operator accesses only what they need, and this rule is enforced at the hardware level.

Practical Deployment Example

ApplicationAIDKeys UsedOperator
Door Access0x010001Diversified AES-128Facilities Team
Lunch Canteen0x010002Diversified AES-128Catering Vendor
Gym Entry0x010003Diversified AES-128HR / Wellness
Parking0x010004Diversified AES-128Parking Management
IT Asset Tracking0x010005Diversified AES-128 (PKI would require DUOX or SEOS)IT Security

Head-to-Head Comparison

Feature125kHz ProxMIFARE ClassicDESFire EV3
Frequency125 kHz13.56 MHz13.56 MHz
Encryption❌ None⚠️ CRYPTO1 (broken)✓ AES-128
Authentication❌ None⚠️ Broken✓ Full mutual auth
Anti-Clone❌❌✓ Secure element
Key Diversification❌⚠️ Possible, but undermined by CRYPTO1✓ Built-in
Multi-Application❌⚠️ Yes via MAD, but no real isolation✓ Memory-limited, plus DAM
Key Isolation❌❌✓ Per-app keys
Standards Compliance❌ Proprietary⚠️ Partial ISO✓ Full ISO 14443/7816
Proximity Check❌❌✓ (since EV2)
Transaction MAC❌❌✓ (since EV2)
Asymmetric crypto (ECC/PKI)❌❌❌ (see MIFARE DUOX / SEOS)
Cloning DifficultyTrivialEasyInfeasible (if the UID is not used as the credential)
Card Cost~€0.30~€0.80~€3–6

When to Use What

Use 125kHz only if:

  • You need to replace legacy systems where cost represents the only constraint
  • Alternatively, the application carries no security risk (for example, loyalty cards with no financial value)

Use MIFARE Classic only if:

  • Your organization remains locked into legacy infrastructure with no migration budget
  • However, you should also add a PIN or biometric secondary factor for additional protection

Use MIFARE DESFire EV3 when:

  • You deploy any new access control system, since this is the current industry standard
  • Similarly, multi-tenant or multi-application environments require this level of isolation
  • Likewise, financial transactions on the card (for example, canteen, vending, or parking) demand strong cryptography
  • Furthermore, compliance requirements such as GDPR, ISO 27001, or PCI-DSS adjacent standards necessitate it
  • Finally, you plan a long-term investment, because cards typically last 5–10 years

Because EV3 is fully backward compatible with EV1 and EV2 applications, a reader platform that supports EV3 can also serve an existing EV1/EV2 card population — which makes EV3 the sensible default for new procurement.

Conclusion

Overall, the evolution from 125kHz to MIFARE Classic to DESFire EV3 represents three distinct generations of security philosophy:

  1. “Security through obscurity” — 125kHz simply broadcasts an ID number, while hoping no one intercepts it
  2. “Proprietary equals secure” — MIFARE Classic relied on a secret algorithm, although researchers broke it within a decade
  3. “Open standards plus proper cryptography” — DESFire EV3 consequently delivers transparent, auditable, and genuinely secure protection

For these reasons, any modern deployment should therefore treat DESFire EV3 with AES-128 key diversification, SAM-protected keys and application-level (never UID-based) credentials as the minimum viable security baseline.


Historical Timeline of Contactless Card Technologies

1.1 The Magnetic Stripe Era (1960s–1990s)

Naturally, access control history begins with magnetic stripe technology, which IBM developed in 1960 [1]. By the 1970s, banks had consequently adopted it widely. Although organizations started using magnetic stripes for physical security during the 1980s, users had to physically swipe each card through a reader. As a result, high throughput was impossible, and in addition the cards suffered from mechanical wear.


1.2 125 kHz Proximity Technology (1990s)

Subsequently, a major breakthrough arrived with 125 kHz proximity cards in the early 1990s. Specifically, Swiss company EM Microelectronic launched the EM4100 chip in 1993 — essentially a simple, read-only identifier [2]. Nearly simultaneously, HID Global (formerly Hughes Identification Devices) also released the ProxCard II series, which used a proprietary protocol [3].

Key Characteristics

  • These cards operate at 125 kHz with a read range of 5–15 cm
  • However, they offer no security whatsoever, because the card passively broadcasts its ID without any encryption or authentication
  • Consequently, cloning is trivial — for instance, a Proxmark3 copies the card to a T5577 blank in just 10 seconds

Common Formats (examples, not an exhaustive list)

  • EM4100/EM4102: a 40-bit UID that is completely open and therefore easily readable by anyone
  • HID ProxCard II: uses a 26-bit Wiegand format (H10301) with proprietary FSK modulation
  • AWID: offers similar 125 kHz technology, although it uses a different proprietary format
  • Indala: developed by Motorola/HID, likewise with proprietary encoding
  • Further formats (Nedap, Cotag, Keri, various OEM variants) exist as well — the market has never been standardised at this frequency

1.3 The 13.56 MHz Revolution: MIFARE Classic (1994)

Philips Semiconductors (now NXP Semiconductors) launched the MIFARE Classic chip in 1994. Notably, it represented one of the first implementations of the ISO/IEC 14443 Type A standard [4][5]. Furthermore, it became the first widely adopted contactless card to promise encryption, although that promise later proved hollow.

MIFARE Classic Specifications

  • In terms of memory, the 1 KB variant has 16 sectors × 4 blocks × 16 bytes, while the 4 KB variant offers 40 sectors
  • For encryption, it relies on CRYPTO1 — a proprietary stream cipher that researchers later cracked
  • Moreover, Key A and Key B protect each sector independently, and the MAD allows several applications to share the card
  • However, the maximum read range reaches only approximately 10 cm

The Fall of CRYPTO1

In 2007, Nohl et al. at the University of Virginia began reverse-engineering CRYPTO1. Subsequently, in 2008, Garcia et al. at Radboud University completed the full analysis [6][7]. Because both the 48-bit key length and the weak PRNG contained fundamental flaws, the "nested authentication attack" could consequently crack all sector keys in mere minutes.


1.4 MIFARE Ultralight (2001)

Meanwhile, NXP also released MIFARE Ultralight, a low-cost variant with limited memory, primarily intended for single-use tickets such as public transit passes [8].

  • Memory ranges from 64 bytes (Ultralight) to 192 bytes (Ultralight C)
  • Notably, Ultralight C added 3DES encryption in 2005 for improved security
  • Later, Ultralight EV1 offered 128/640 bytes along with OTP (One-Time Programmable) support
  • Most recently in 2020, Ultralight Nano introduced 48 bytes in the smallest NFC inlay form factor

1.5 iCLASS — HID's Response (2002)

In response to growing demand for secure 13.56 MHz cards, HID Global launched the iCLASS platform in 2002. Specifically, it built upon the ISO/IEC 15693 standard, which offered a longer read range [9]. Unfortunately, however, researchers later also cracked its proprietary encryption (Meriac, 2010; Garcia et al., 2012) [10].

  • Available memory options were 2 kbit, 16 kbit or 32 kbit — that is roughly 256 bytes, 2 KB and 4 KB respectively (the figures are quoted in bits in HID literature, which is a frequent source of confusion)
  • Although iCLASS Standard (SE) relied on DES, attackers subsequently compromised it
  • Even iCLASS Elite, which added a proprietary layer, eventually fell to similar attacks as well

1.6 MIFARE DESFire EV1 (2006)

After the MIFARE Classic failure, NXP consequently developed the DESFire platform. For the first time, this brought the ISO/IEC 7816-4 application structure to contactless cards [11]. In particular, it offered the following features:

  • First, it provides full ISO/IEC 14443-4 (T=CL) protocol support for broad compatibility
  • Moreover, both 3DES and AES-128 encryption use industry-standard algorithms
  • In addition, an application-based structure supports up to 28 independent applications per card (this limit applies to EV1 only)
  • Additionally, mutual authentication provides strong integrity guarantees (Transaction MAC, however, only arrived with EV2)
  • Furthermore, Common Criteria EAL4+ certification also confirms the security design

1.7 MIFARE Plus (2008)

Accordingly, MIFARE Plus served as NXP's bridge solution for migrating from Classic to DESFire [12]. In particular, it defines four security levels:

  • Security Level 0: the initial, un-personalised delivery state, in which the card is prepared and the AES keys are loaded before it is switched to a higher level
  • Security Level 1: a Classic-compatible mode that still uses CRYPTO1
  • Security Level 2: Classic communication combined with AES authentication for improved security
  • Security Level 3: full AES-128 encryption and CMAC for maximum protection

Importantly, it maintained the same sector-based memory structure as Classic. As a result, this simplified the migration process considerably.


1.8 HID iCLASS SE and SEOS (2012–2014)

After attackers compromised iCLASS, HID Global consequently developed an entirely new platform in response.

iCLASS SE (Secure Element, 2012)

  • This version introduced SIO (Secure Identity Object) — essentially a signed and encrypted data object on the card [13]
  • In addition, administrators can combine it with DESFire EV1/EV2/EV3 chips for added flexibility

HID SEOS (2014)

  • HID built SEOS as a custom applet on JavaCard or NXP JCOP
  • Moreover, it supports both AES-128/256 and ECC (Elliptic Curve Cryptography) for robust encryption
  • Furthermore, it provides native mobile credential support through BLE and NFC
  • Finally, Common Criteria EAL5+ certification at chip level confirms its high security standard

1.9 LEGIC advant (2010s)

Separately, Swiss LEGIC Identsystems gained widespread adoption in Europe, particularly in the DACH region [14]. Their product line consequently includes several options:

  • LEGIC prime: a proprietary 13.56 MHz technology that is now considered legacy and crackable
  • LEGIC advant: uses AES-128/256 with ISO 14443 + ISO 15693, and also supports multi-application deployments
  • In addition, a Master-Token system streamlines key management for administrators
  • Furthermore, a strong OEM ecosystem includes partners such as Kaba/dormakaba and Siemens

1.10 MIFARE DESFire EV2 (2016)

Subsequently, building on EV1, the EV2 version consequently introduced several important enhancements [15]:

  • Transaction MAC: this provides MAC-based transaction authentication toward the host system, thereby enabling offline validation — a genuinely new EV2 feature
  • Similarly, MACed, Encrypted, and Full enciphered communication modes offer flexible security options
  • Moreover, Proximity Check prevents relay attacks through time-based distance verification — also introduced here, in EV2
  • In addition, Delegated Application Management allows third parties to manage their own application on the card
  • The rigid 28-application limit of EV1 was removed; the number of applications is now bounded by free memory, and 2-byte / 3-byte AIDs became available
  • Finally, Virtual Card Architecture enables a single chip to host multiple virtual card profiles

1.11 MIFARE DESFire EV3 (2020)

Most importantly, the EV3 currently adds several cutting-edge capabilities [16]:

  • SUN (Secure Unique NFC): this enables web-based authentication via URL with a unique cryptographic signature
  • Moreover, Secure Dynamic Messaging (SDM) ensures the card's NDEF message contains a different cryptographic MAC on every single read
  • In addition, full ISO/IEC 14443-4 support ensures broad device compatibility
  • Furthermore, Common Criteria EAL5+ certification at chip level confirms the highest security tier
  • Both ANSSI and BSI have also independently certified this technology
  • Finally, it maintains full backward compatibility with all existing EV1/EV2 applications
  • What EV3 does not add is asymmetric cryptography: it remains an AES-128 (plus legacy 3DES) product

1.12 MIFARE DUOX (2024) and the arrival of on-card PKI

In 2024 NXP introduced MIFARE DUOX, the first MIFARE-branded product to combine the familiar DESFire command set with asymmetric cryptography (ECC, ECDSA, certificate-based authentication). This closes precisely the gap left by EV3 and is the correct choice where digital signatures, on-card key pairs or PKI-based attestation are required.


1.13 Mobile Credentials and BLE (2018–Present)

Most recently, the industry trend has shifted toward replacing physical cards with smartphones. Consequently, several solutions now compete in this space:

  • HID Mobile Access combines BLE and NFC, and it builds on the SEOS platform [17]
  • Similarly, Apple Wallet Employee Badge emerged through an Apple and HID collaboration in 2022 [18]
  • Likewise, Google Wallet Smart Tap offers NFC-based access using NDEF + SE
  • Meanwhile, NXP MIFARE 2GO delivers cloud-based DESFire credential provisioning to mobile devices [19]

Detailed Card Format Comparison

Technology Summary Table

TechnologyManufacturerYearFrequencyStandardEncryptionMemorySecurity (1-5)
EM4100/4102EM Micro.1993125 kHzProprietaryNone40-bit UID⭐ (1)
HID ProxCard IIHID Global~1994125 kHzProprietaryNone26-bit Wiegand⭐ (1)
IndalaMotorola/HID~1995125 kHzProprietaryNone26/37-bit⭐ (1)
MIFARE Classic 1KNXP (Philips)199413.56 MHzISO 14443A (partial)CRYPTO1 (broken)1 KB⭐⭐ (2)
MIFARE Classic 4KNXP199413.56 MHzISO 14443A (partial)CRYPTO1 (broken)4 KB⭐⭐ (2)
MIFARE UltralightNXP200113.56 MHzISO 14443ANone / 3DES (UL-C)64–640 B⭐–⭐⭐ (1-2)
iCLASS (Standard)HID Global200213.56 MHzISO 15693DES (broken)2/16/32 kbit ≈ 256 B – 4 KB⭐⭐ (2)
MIFARE DESFire EV1NXP200613.56 MHzISO 14443A-43DES + AES-1282/4/8 KB⭐⭐⭐⭐ (4)
MIFARE PlusNXP200813.56 MHzISO 14443AAES-128 (SL3)1/4 KB⭐⭐⭐ (3)
iCLASS SE (SIO)HID Global201213.56 MHzISO 14443AAES-128 + SIOVariable⭐⭐⭐⭐ (4)
LEGIC advantLEGIC~201013.56 MHzISO 14443 + 15693AES-128/256Variable⭐⭐⭐⭐ (4)
HID SEOSHID Global201413.56 MHz + BLEISO 14443AES-128/256, ECCApplet⭐⭐⭐⭐⭐ (5)
MIFARE DESFire EV2NXP201613.56 MHzISO 14443A-4AES-128 + TMAC2/4/8 KB⭐⭐⭐⭐½ (4.5)
MIFARE DESFire EV3NXP202013.56 MHzISO 14443A-4AES-128 + SUN/SDM2/4/8 KB⭐⭐⭐⭐⭐ (5)
MIFARE DUOXNXP202413.56 MHzISO 14443A-4AES-128 + ECC/ECDSAVariable⭐⭐⭐⭐⭐ (5)

Cryptographic Comparison

Feature125 kHzMIFARE ClassicDESFire EV1DESFire EV3SEOS
Authentication❌ None⚠️ CRYPTO1 (48-bit)✓ 3DES/AES✓ AES-128✓ AES/ECC
Key lengthN/A48 bit112/168 bit (3DES), 128 bit (AES)128 bit (AES)128/256 bit
Mutual auth.❌⚠️ (compromised)✓✓✓
Data encryption❌⚠️✓ AES-CBC✓ AES-CBC✓ AES
Message integrity❌❌✓ CMAC✓ CMAC + TMAC (since EV2)✓
Relay protection❌❌❌✓ Proximity Check (since EV2)✓
Clone protection❌❌✓ (random UID)✓ (random UID)✓ (SE)
Key diversification❌⚠️ Manual✓ AES CMAC✓ AES CMAC✓ Native
Asymmetric crypto❌❌❌❌ (see DUOX)✓ ECC
Multi-application❌⚠️ MAD, no isolation✓ Max 28✓ Memory-limited + DAM✓ Applet
Certification——CC EAL4+CC EAL5+CC EAL5+ (chip)

Key Technological Shifts

Shift 1: Analog → Digital (125 kHz → 13.56 MHz)
This transition introduced memory and sector-based access control. As a result, encryption became possible for the first time — although it was initially weak.

Shift 2: Proprietary → Open-Standard Cryptography (Classic → DESFire)
After researchers broke CRYPTO1 in 2008, it became clear that "security through obscurity" simply does not work [6][7]. Consequently, AES-128 emerged as the industry standard for card-level encryption.

Shift 3: Passive ID → Active Mutual Authentication
Previously, cards simply broadcast identifiers without any verification. In contrast, modern cards now prove their identity through cryptographic challenge-response protocols.

Shift 4: Symmetric → Asymmetric (DESFire → DUOX / SEOS)
Symmetric keys always have to exist somewhere in the field. On-card key pairs and certificate-based authentication remove that constraint, which is the direction the newest products are taking.

Shift 5: Physical → Mobile (card → phone)
Thanks to Secure Element and Host Card Emulation (HCE) technologies, cloud-based credential management platforms such as MIFARE 2GO and HID Origo have since made mobile access mainstream.


End-to-End Encryption — LenelS2 OnGuard System

Architecture Overview

Essentially, a modern LenelS2 OnGuard access control system consists of four layers. Crucially, each layer therefore maintains its own independent encryption channel [20][21]:

┌──────────────┐     mTLS (TLS 1.2/1.3)        ┌──────────────┐
│   OnGuard    │ ◄──────────────────────────►  │  LNL-M4420   │
│   Server     │    TCP/IP, X.509 certs        │  M-Series ISC│
└──────────────┘                               └──────┬───────┘
                                                      │
                                              OSDP v2 │ AES-128
                                              (RS-485)│ Secure Channel
                                                      │
                                              ┌───────▼───────┐
                                              │  HID Signo 40 │
                                              │  Reader       │
                                              └───────┬───────┘
                                                      │
                                             RF (NFC) │ DESFire EV3
                                             ISO 14443│ AES-128 Auth
                                                      │
                                              ┌───────▼───────┐
                                              │  Card         │
                                              │  (DESFire EV3)│
                                              └───────────────┘

Note: the current generation of LenelS2 / Mercury controllers is the M-Series (e.g. LNL-M4420); the older X-Series (LNL-X4420) is shown here only for reference in existing installations.

Layer 1: Server ↔ Panel — mTLS (Mutual TLS)

LenelS2 OnGuard 8.x and newer versions support mutual TLS between the server and Intelligent System Controller (ISC) panels [20]. Specifically, the process works through four steps:

  1. Certificate Generation: First, the OnGuard server CA generates root certificates, from which the system then derives both client and server certificates
  2. Mutual Authentication: Next, both server and panel present their X.509 certificates — consequently, communication begins only after both parties verify valid certificates from the internal CA
  3. Encryption: After successful authentication, TLS 1.2 (or 1.3) session key negotiation therefore encrypts all traffic with AES-256-GCM
  4. Certificate Revocation: In addition, a CRL (Certificate Revocation List) enables immediate exclusion of any compromised panel

Why mTLS Matters

In a traditional system, panel-to-server communication travels in clear-text. Therefore, a man-in-the-middle attack can consequently compromise the entire system. However, mTLS prevents any rogue panel from connecting to the server, because it lacks a valid certificate.

Layer 2: Panel ↔ Reader — OSDP v2

OSDP stands for Open Supervised Device Protocol, which the SIA (Security Industry Association) standardized. Moreover, in 2020 it also became international standard IEC 60839-11-5 [22][23].

Wiegand vs. OSDP Comparison

FeatureWiegandOSDP v2
DirectionUnidirectional (reader → panel)Bidirectional
Encryption❌ None✓ AES-128 Secure Channel
Tamper detection❌✓ Built-in
Cable distanceMax ~150 mMax ~1200 m (RS-485)
Firmware update❌✓ Remote
StandardNone (de facto)IEC 60839-11-5
LED/buzzer/display control❌✓ Full

OSDP v2 Secure Channel Protocol (SCP)

  1. Session Key Establishment: First, reader and panel negotiate an AES-128 session key from a shared SCBK (Secure Channel Base Key) [24]
  2. Message Encryption: Then, AES-128-CBC mode consequently encrypts all messages between the devices
  3. Message Integrity: Additionally, AES-128-CMAC protects every packet against tampering
  4. Replay Protection: Moreover, a monotonically increasing sequence counter also prevents replay attacks
  5. Install Mode: During initial setup, key negotiation occurs in protected mode, after which the system subsequently overwrites the SCBK
Wiegand Attack — Demonstration: On a Wiegand interface, the card number travels as a simple pulse sequence (DATA0, DATA1) without any encryption. Because of this weakness, an ESP32 or Raspberry Pi connected to the Wiegand wires can consequently eavesdrop on every card read. In addition, it can replay previously captured card numbers and also inject forged data through bit manipulation [25].

Layer 3: Reader ↔ Card — DESFire EV3 Authentication

The third encryption layer covers RF communication between reader and card. Specifically, with DESFire EV3, both parties engage in a full mutual authentication protocol [16][26]:

Reader                              Card
  │                                    │
  │── AuthenticateEV2First ──────────►│
  │   (KeyNo, Length)                  │
  │                                    │
  │◄── E_K(RndB) ────────────────────│
  │                                    │
  │── E_K(RndA || RndB') ────────────►│
  │   RndB' = RndB rotated left        │
  │                                    │
  │◄── E_K(RndA' || TI || ...) ──────│
  │   Transaction Identifier           │
  │                                    │
  ├── EV2 session keys (CMAC-based KDF)┤
  │   SV1 = A5h 5Ah 00h 01h 00h 80h    │
  │         RndA[15..14]               │
  │         (RndA[13..8] XOR RndB[15..10])
  │         RndB[9..0] RndA[7..0]      │
  │   K_ses.Enc = CMAC(K, SV1)         │
  │   (SV2 = 5Ah A5h ... → K_ses.MAC)  │
  │                                    │
  │══ Secure Messaging Channel ═══════│
  │   (AES-CBC encrypt + CMAC + CmdCtr)│

After authentication, the session key consequently encrypts every read and write operation, while CMAC authenticates each one. Moreover, because the random nonces differ each time, the session key therefore remains unique per transaction.

Note on legacy authentication: The older Enc(RndA[0..3] || RndB[0..3] || RndA[12..15] || RndB[12..15]) construction belongs to the EV1 / D40 (legacy) scheme used by AuthenticateISO / AuthenticateAES. It must not be confused with the CMAC-based KDF shown above, which applies after AuthenticateEV2First.

High-Security Site Configuration — NATO-Level Access Control

Design Principles

According to NATO Allied Communications Publication AC/322-D (2006) and NIST SP 800-116 Rev. 1 (2018) [27][28], a high-security access control system must therefore rest on five pillars:

  1. Defense in depth: if any single layer fails, the system as a whole consequently remains secure
  2. Least privilege: every user therefore receives only the minimum access needed for their role
  3. Zone segmentation: concentric security zones divide the entire facility into distinct areas
  4. Fail-secure: during power failure, doors consequently remain locked rather than defaulting to open
  5. Auditability: finally, the system logs every event with integrity-protected audit trails

Zone Architecture Example

┌─────────────────────────────────────────────────┐
│                   ZONE 0                         │
│              Public Area                          │
│         (parking, reception lobby)               │
│                                                   │
│  ┌───────────────────────────────────────────┐   │
│  │              ZONE 1                        │   │
│  │        General Office                      │   │
│  │    Card + PIN (DESFire EV3)               │   │
│  │                                            │   │
│  │  ┌─────────────────────────────────────┐  │   │
│  │  │            ZONE 2                    │  │   │
│  │  │      Restricted Area                 │  │   │
│  │  │  Card + PIN + Escort Required        │  │   │
│  │  │                                      │  │   │
│  │  │  ┌───────────────────────────────┐  │  │   │
│  │  │  │          ZONE 3              │  │  │   │
│  │  │  │   NATO SECRET / TOP SECRET   │  │  │   │
│  │  │  │  Card + Biometrics + PIN     │  │  │   │
│  │  │  │  Man-trap airlock             │  │  │   │
│  │  │  │  Dual-auth (2-person rule)   │  │  │   │
│  │  │  └───────────────────────────────┘  │  │   │
│  │  └─────────────────────────────────────┘  │   │
│  └───────────────────────────────────────────┘   │
└─────────────────────────────────────────────────┘

OnGuard Configuration Step-by-Step

Step 1: Network Segmentation

  • First, the access control system runs on a dedicated VLAN, firewalled from the IT network [29]
  • In addition, mTLS secures all communication between panels and the OnGuard server
  • Furthermore, administrators assign static IP addresses to panels and also enable MAC filtering on network switches
  • Moreover, 802.1X port-based authentication consequently protects every network port

Step 2: OSDP v2 Deployment

  • Every reader communicates via OSDP v2 Secure Channel, because Wiegand use is strictly prohibited in this configuration
  • In addition, each reader receives a unique SCBK (Secure Channel Base Key), which therefore eliminates shared keys across the system
  • Specifically, in OnGuard System Administration → Reader Configuration → OSDP Settings, administrators set Secure Channel to Enabled and Install Mode to Off

Step 3: Card Technology

  • The system accepts only DESFire EV3 (or HID SEOS) cards for all readers
  • Consequently, readers reject 125 kHz and MIFARE Classic reads, since administrators have disabled those legacy technologies
  • Moreover, diversified keys protect each application independently for maximum isolation
  • Importantly, the card number must not be the UID — instead, AES-protected application-level data stores the actual credential, and random UID is enabled wherever the reader supports it

Step 4: Multi-Factor Authentication (MFA)

ZoneFactor 1Factor 2Factor 3Other
1DESFire EV3 cardPIN (4-8 digit)——
2DESFire EV3 cardPIN—Escort required
3DESFire EV3 cardBiometrics (iris/fingerprint)PINDual-auth + man-trap

Step 5: Anti-Passback and Flow Control

  • Hard anti-passback: the system consequently blocks entry for anyone who has not yet exited (and vice versa)
  • Timed anti-passback: in addition, the system enforces a minimum time between two consecutive entries
  • Global anti-passback: moreover, cross-zone consistency checking also prevents location conflicts
  • Mustering: finally, this feature enables emergency headcount during evacuations [20]

Step 6: Tamper Protection

  • Reader tamper switch: any removal attempt consequently triggers an immediate alarm
  • Cable line supervision: meanwhile, the panel continuously monitors RS-485 line integrity for any anomalies
  • Panel tamper: when someone opens the enclosure, the system therefore triggers an alarm and optionally erases all keys
  • Interconnect cables: in addition, armored conduit with traceable paths protects all physical connections

Step 7: Offline Operation (Graceful Degradation)

  • M-Series controllers (e.g. LNL-M4420) have local decision-making capability, which therefore allows continued operation during outages [21]
  • Specifically, during a server outage, each panel decides based on its local cache of last synchronized permissions
  • Meanwhile, the panel also logs all events and synchronizes them after the server reconnects
  • In particular, administrators configure this in OnGuard → Panel Configuration by setting Offline Mode to Enabled and Max Offline Duration to 24h

NATO-Specific Requirements

According to the NATO INFOSEC Technical Centre (NITC) and AC/35-D(2002) [30], several additional measures therefore apply:

  • TEMPEST protection: EMI-shielded enclosures (SDIP-27 Level A/B) must consequently house all readers and panels
  • Two-Person Rule: as a result, critical zones require two simultaneously authenticated persons for entry
  • Positive identification: the card stores biometric data locally, and the reader then verifies it on-site — importantly, this data never leaves the card/reader
  • Card revocation: moreover, the server pushes revocation commands to all panels immediately, rather than relying on pull-based updates
  • Audit trail: finally, all logs require minimum 90-day retention and must also carry digital signatures

Key Protection & Key Diversification

The Problem: Why You Cannot Use the Same Key in Every Reader

Consider this scenario: an access control system has 200 readers, and they all share the same AES-128 master key. If an attacker then physically removes a single reader (for example, from a remote parking garage) and extracts the key, the entire system — all 200 readers — consequently becomes compromised.

Indeed, this threat goes far beyond theory. In practice, organizations often place readers in public areas such as parking garages, stairwells, and exterior walls. Furthermore, side-channel attacks like DPA (Differential Power Analysis) can also extract AES keys from chips [31]. Therefore, one compromised reader means attackers can consequently clone all cards in the system.

The Solution: Key Diversification — but only together with a SAM

Key diversification means that a single master key exists only on the server or inside a SAM module. From this master key, the system then mathematically derives individual card keys [32][33].

Important caveat, often stated incorrectly: diversification on its own does not protect the master key against reader theft. A reader must be able to compute the diversified key for any card UID it encounters — which means the master key (or the ability to use it) has to be present in the reader. If it is held in ordinary reader firmware or flash, extracting it compromises the whole population. This is exactly why the master key must live inside a SAM (or be computed server-side): the SAM performs the derivation internally and never exposes the key. Diversification protects the cards from each other; the SAM protects the master key.

How It Works (AES CMAC-based derivation — AN10922)

Master Key (K_master)  — only on server / inside SAM
         │
         ▼
┌─────────────────────────────┐
│  Diversification Input:     │
│  • Card UID (7 bytes)       │
│  • Application ID (3 bytes) │
│  • System Identifier (opt.) │
│  • Padding                  │
└─────────────────────────────┘
         │
         ▼
   AES-CMAC(K_master, input)
         │
         ▼
   K_card_i  — unique key for this specific card

The Formal Derivation

K_diversified = AES-CMAC(K_master, 0x01 || UID || AID || SysID || padding)

In this formula, K_master represents the 128-bit master key, while UID denotes the card's unique identifier (7 bytes). Similarly, AID specifies the application identifier (3 bytes). The CMAC function consequently guarantees two important properties. First, two different UIDs always produce two completely different keys. Second, because CMAC acts as a one-way function, no one can therefore reverse-engineer the master key from any derived key.

Practical Outcome

ScenarioFixed key, no SAMDiversified key, no SAMDiversified key + SAM
1 reader stolen❌ Entire system compromised❌ Still compromised — the reader must hold the master key to derive card keys✓ Master key stays inside the tamper-resistant SAM; revoke that SAM and continue
1 card cloned❌ All cards become clonable✓ Only that specific card's key becomes known✓ Only that specific card's key becomes known
Master key leaked❌ Entire system compromised❌ Entire system compromised❌ Entire system compromised — which is exactly why the key ceremony and HSM/SAM handling matter

SAM — Secure Access Module

A SAM (Secure Access Module) functions as a physically protected cryptographic processor. Specifically, this tamper-resistant secure element stores keys and also executes cryptographic operations. Crucially, it ensures that the key never leaves the module under any circumstances [34][35].

MIFARE SAM AV3 (NXP) — Specifications

  • Form factor: a SIM-card sized module that fits into the reader's SIM slot
  • Core functions: it stores up to 128 AES keys, and it also performs on-board key diversification and authentication execution — importantly, the master key never leaves the SAM. Furthermore, Common Criteria EAL5+ certification confirms its security design
  • Attack resistance: an active mesh (metal grid over the chip) detects physical intrusion, while voltage and frequency glitch detection also prevents fault injection. In addition, DPA/SPA resistance through random delay injection and masking consequently blocks side-channel attacks

How the SAM Operates Inside the Reader

                Reader Interior
┌─────────────────────────────────────┐
│                                      │
│  ┌────────────┐   ┌──────────────┐  │
│  │  RF module  │   │   SAM AV3    │  │
│  │  (antenna)  │──►│  K_master    │  │
│  │             │   │  Diversify() │  │
│  │  Card UID   │   │  Auth()      │  │
│  └────────────┘   └──────┬───────┘  │
│                          │           │
│                   Credential data    │
│                   (not the key!)     │
│                          │           │
│  ┌───────────────────────▼────────┐ │
│  │  OSDP Secure Channel → Panel   │ │
│  └────────────────────────────────┘ │
└─────────────────────────────────────┘
Critical point: If an attacker steals a reader and extracts the SAM, three protections consequently activate. First, hardware protection prevents any master key extraction from the SAM. Second, the SAM also logs all failed attempts and enters permanent lockout. Third, the administrator then revokes that SAM on the server, and as a result all other readers continue operating normally.

Key Ceremony — Key Generation and Distribution

A key ceremony is a formalized, audited process for generating, splitting, and loading cryptographic keys [36][37]. In particular, organizations typically follow five steps:

  1. Key Generation: First, a hardware TRNG in a FIPS 140-2 Level 3 certified HSM (for example, Thales Luna or nCipher) generates the master key
  2. Key Splitting: Next, 2-of-3 Shamir Secret Sharing divides the master key — consequently, three custodians each receive one share, and any two can reconstruct the full key
  3. Key Injection: Then, technicians load SAM modules on an offline, air-gapped workstation. Afterward, they also physically destroy the hard drive
  4. SAM Distribution: Subsequently, sealed envelopes physically transport each SAM to its reader installation site
  5. Activation: Finally, at each site the technician places the SAM in the reader and then activates it via OSDP

Key Rotation Policy

Typically, organizations schedule key rotation annually or semi-annually. In addition, they should also trigger immediate rotation upon suspicion of compromise. Notably, DESFire EV3 supports the ChangeKey command, which rotates the key within an active session. As a result, the system consequently experiences no service interruption during rotation.


Case Studies

6.1 Dutch Public Transport — OV-chipkaart Incident (2008–2012)

Background: In 2005, the Netherlands introduced the OV-chipkaart system, which relied on MIFARE Classic cards for all public transport nationwide [38].

What happened: In 2008, Radboud University researchers (Garcia et al.) proved that MIFARE Classic CRYPTO1 encryption was completely breakable [7]. As a consequence, anyone could freely clone the cards. By 2011, the operator (Trans Link Systems) consequently acknowledged approximately €1 million in annual losses from cloned cards [39]. Subsequently, between 2012 and 2015, the organization therefore migrated the entire infrastructure to DESFire EV1.

Key lesson: Proprietary, non-publicly-audited cryptography consequently poses a fatal risk. In this case, the entire multi-billion euro infrastructure required complete replacement because of a single cryptographic failure.


6.2 London Oyster Card — MIFARE Classic Compromise (2008)

Background: Transport for London's (TfL) Oyster Card system also relied on MIFARE Classic, having launched in 2003 [40].

What happened: Following the Dutch researchers' results in 2008, University College London researchers demonstrated that anyone could clone Oyster Cards. TfL therefore responded with a two-pronged approach. In the short term, they deployed a backend fraud-detection system that identified cloned cards through usage patterns. For the long term, they gradually migrated to DESFire EV1 and then EV2 (2014–2019). Additionally, the system also expanded to accept EMV contactless bank card payments in 2014 [41].

Key lesson: Although backend fraud detection provides supplementary protection, it consequently cannot replace card-level cryptography. In other words, both layers must work together for adequate security.


6.3 Schiphol Airport — Multi-application DESFire EV2 (2017)

Background: Amsterdam Schiphol Airport wanted to use a single card platform for all applications: specifically access control, parking, catering payments, and time tracking [42].

Implementation: They consequently selected MIFARE DESFire EV2 in multi-application mode with four independent applications:

  • First, Application 1 (AID 0x000001) handles access control via OnGuard
  • Next, Application 2 (AID 0x000002) manages the parking system
  • Then, Application 3 (AID 0x000003) processes catering payments
  • Finally, Application 4 (AID 0x000004) records time tracking and attendance

Notably, each application maintained its own independent key set. Moreover, DAM (Delegated Application Management) also allowed parking and catering operators to manage their own applications without knowing any access control keys.

Key result: Consequently, one card now serves four fully independent applications — and none of them can compromise each other's security.


6.4 UK Government — CPNI-Compliant Access Control

The UK Centre for the Protection of National Infrastructure (CPNI) has published detailed guidelines on access control security [43]. In particular, their key recommendations include the following:

  • "No single point of failure": no single component failure should consequently compromise the system
  • Moreover, new installations must not use Wiegand protocol under any circumstances
  • Instead, OSDP v2 Secure Channel is therefore mandatory for all reader-to-panel communication
  • In addition, DESFire EV2 or newer represents the minimum acceptable card technology
  • Furthermore, SAM-based key management is also recommended for all high-security installations
  • Finally, organizations must conduct annual penetration testing of the access control system as well

6.5 US Federal Government — FIPS 201 / PIV Card

Background: Under HSPD-12 (2004), the US federal government consequently mandated the PIV (Personal Identity Verification) card for all federal employees and contractors [44][28].

PIV Card specifications:

  • Contact interface: ISO 7816 with PKI (RSA-2048 or ECC P-256) for cryptographic operations
  • Contactless interface: similarly, ISO 14443 with the PIV applet (NIST SP 800-73-4) handles physical access
  • Biometric data: moreover, a fingerprint template stored on the card (CBEFF/INCITS 378) enables local verification
  • Encryption: specifically, AES protects the data at rest and in transit, while RSA/ECC handles authentication and signing

Key lesson: Above all, the PIV system demonstrates that a well-designed, standards-based, multi-factor system can operate successfully at national scale. In fact, it therefore serves as the gold standard for government-level access control.


Consolidated References

Standards and Foundational Sources [1–5]

[1] IBM Archives, "The Magnetic Stripe Card," https://www.ibm.com/ibm/history/ibm100/us/en/icons/magnetic/
[2] EM Microelectronic, "EM4100 — Read Only Contactless Identification Device," Datasheet, 2004
[3] HID Global, "Understanding Card Technologies," https://www.hidglobal.com/
[4] NXP Semiconductors, "MIFARE Classic EV1 1K," Product data sheet, Rev. 3.2, 2018
[5] ISO/IEC 14443-1:2018, "Identification cards — Contactless integrated circuit cards"

Security Research [6–10]

[6] Nohl, K., et al.: "Reverse-Engineering a Cryptographic RFID Tag," USENIX Security, 2008
[7] Garcia, F.D., et al.: "Dismantling MIFARE Classic," ESORICS 2008, Springer LNCS 5283
[8] NXP Semiconductors, "MIFARE Ultralight EV1," Product data sheet, 2012
[9] HID Global, "iCLASS Smart Card Technology," Whitepaper, 2003
[10] Garcia, F.D., et al.: "Exposing iCLASS Key Diversification," USENIX Security, 2012

NXP Product Documentation [11–16]

[11] NXP Semiconductors, "MIFARE DESFire EV1," MF3ICD81, Datasheet, 2008
[12] NXP Semiconductors, "MIFARE Plus," AN11004, 2013
[13] HID Global, "Understanding iCLASS SE and SIO," Whitepaper, 2014
[14] LEGIC Identsystems AG, "LEGIC advant," https://www.legic.com/
[15] NXP Semiconductors, "MIFARE DESFire EV2," MF3DHx2, Datasheet, 2016
[16] NXP Semiconductors, "MIFARE DESFire EV3," Product data sheet, 2020

Mobile and Modern Platforms [17–19]

[17] HID Global, "HID Mobile Access," https://www.hidglobal.com/solutions/hid-mobile-access
[18] Apple Inc., "Employee Badge in Apple Wallet," WWDC 2022
[19] NXP Semiconductors, "MIFARE 2GO," https://www.mifare.net/en/products/mifare-2go/

System Architecture and Protocols [20–26]

[20] LenelS2, "OnGuard 8.2 System Administration," Chapter 12, 2023
[21] LenelS2, "BlueDiamond/Mercury Architecture," Whitepaper, 2022
[22] SIA, "OSDP v2," SIA-OSDP-2.2, 2020
[23] IEC 60839-11-5:2020
[24] Lenel/SIA, "OSDP Secure Channel — Implementation Guide," 2019
[25] Bishop, M., Valenzuela, F.: "Wiegand Protocol Vulnerabilities," BlackHat USA, 2013
[26] NXP Semiconductors, "AN12343," Application Note, 2019

Government and Military Standards [27–30]

[27] NATO, "AC/322-D," 2006
[28] NIST, "SP 800-116 Rev. 1," 2018
[29] ASIS International, "Facilities Physical Security Measures Guideline," 2009
[30] NATO, "SDIP-27 — TEMPEST Standards"

Key Management and Cryptography [31–37]

[31] Kocher, P., et al.: "Differential Power Analysis," CRYPTO 1999
[32] NXP Semiconductors, "AN10922," Rev. 2.3, 2020
[33] NXP Semiconductors, "AN12196," 2021
[34] NXP Semiconductors, "SAM AV3," 2021
[35] NXP Semiconductors, "AN12207," 2021
[36] NIST, "SP 800-57 Part 1 Rev. 5," 2020
[37] PCI SSC, "PCI PIN Security Requirements," Version 3.1, 2022

Case Studies and Industry Reports [38–44]

[38] Trans Link Systems, "OV-chipkaart Security Improvement Programme," 2013
[39] van Rossum, P.: "Smart Card Security in Public Transport," CARDIS 2012
[40] Transport for London, "Oyster Card System Security Review," 2008
[41] TfL, "Contactless Payment — One Year On," 2015
[42] NXP Semiconductors, "Airport Case Study," 2018
[43] CPNI, "Guide to the Selection and Use of an Access Control System," 2021
[44] FIPS PUB 201-3, NIST, 2022