InnerWeb
Skip to main content

Card key diversification: good practices for the supplier contract

Key diversification means that the key of each card is derived from a master key and the unique UID, so a leak of one key does not open the other cards. This clause must go into the card supplier contract, because without it the offer may place the same key on every identifier. Below are the practices for the integrator and the purchasing department.

128 bit
AES key in DESFire EV3

What diversification means

Without diversification all cards at a plant may use the same key. A leak of such a key, for example from a reader or a controller, gives an attacker the ability to read or clone every card. With diversification a derived key is created from the master key and the unique UID of the card, so knowing the key of one card reveals nothing about the keys of the others.

The method is described, among others, in the key derivation function of NIST SP 800-108: the derived key is created from the master key and the UID of the card. In DESFire EV3 cards authentication relies on AES 128-bit with mutual authentication, under the ISO/IEC 14443 type A standard.

Practices to write into the contract

The practices below concern the content of the contract or the technical specification of the order. The access control integrator is responsible for checking them at acceptance.

  • The supplier describes how the card key is derived: from which master key and from which data, including the UID.
  • The master key does not leave a secured environment: a SAM module in the reader or a security module on the supplier side.
  • The plant holds a written statement that the owner of the master key is the contracting authority, not the supplier.
  • The contract specifies what happens to the keys when cooperation ends: handover or a secure change.
  • The master keys have a backup and a restoration procedure described outside the production system.

Cards opened after a leak of one key (sample calculation)

Cards opened after a leak of one key (sample calculation)Before and after chart: without diversification a leak opens 500 or 2000 cards, with diversification only 1 card.0500100015002000cardsOne key on all cards (Plant with 500 cards): 500 cards500 cardsKey diversification (Plant with 500 cards): 1 cards1 cardsPlant with 500 cardsOne key on all cards (Plant with 2000 cards): 2000 cards2000 cardsKey diversification (Plant with 2000 cards): 1 cards1 cardsPlant with 2000 cards
  • One key on all cards
  • Key diversification
Source: Sample calculation: assumed leak of one card's key, plants with 500 and 2000 cards

The role of the SAM module and the reader

The SAM module in the reader stores master keys in a secured chip and performs card authentication, so that the keys never leave the reader. Diversification without a SAM is possible, but then the master key must be kept in the controller or on the server, which increases the number of places to protect.

In the tender it is worth writing down two things separately: diversification as a requirement for the cards and the system, and the SAM as a requirement for the readers wherever the risk of the zones justifies it.

What diversification does not solve

Diversification limits the effects of a leak of one card's key, but it does not protect against a leak of the master key. It also does not replace the rule that entry is not decided by the UID alone: 125 kHz cards send a fixed number without authentication, and the UID on MIFARE Classic cards with a changeable UID can be rewritten.

The random identifier of the DESFire EV3 card is a privacy feature: the card does not reveal its fixed UID during a read. It is not a key derivation mechanism, so it must not be confused with diversification in the supplier's answer.

Acceptance and proof for the audit

At acceptance the integrator should show two cards from the same batch and demonstrate that their derived keys differ. This proof cannot be obtained from an assurance given in the offer.

InnerWeb does not produce cards or readers. It integrates with the client's access control system and receives swipe events, which it connects with qualifications, permits and attendance. Correct keys on the access control side mean that these events describe real passages.

Checklist

Video

Frequently asked questions

Does diversification require a SAM module?

No, but a SAM reduces the number of places where the master key must be protected. Without a SAM the key has to be secured in the controller or on the server.

Is the random ID the same as diversification?

No. The random identifier hides the fixed UID from tracking, while diversification derives different keys for different cards.

Does InnerWeb manage card keys?

No. The keys belong to the access control system and the card supplier. InnerWeb receives swipe events and connects them with permits and attendance.

Sources

A card supplier contract without gaps

Let us talk about how to write the requirements for the cards and how to connect the access control events with permits in your plant.

Let's talk