What the key protects, and what it does not
DESFire EV3 encrypts data with hardware AES using 128-bit keys and a key version number. Data authenticity is confirmed by an 8-byte CMAC. Whoever knows the application key can read and change its data, so the key is more important than the card itself.
The random identifier is not part of key management. It is a privacy feature: the card does not reveal a permanent UID during a read. It is not a key derivation mechanism, so it does not replace diversification.
Diversification: one master key, many card keys
In secure card ecosystems, key diversification is based among others on the key derivation function described in NIST SP 800-108: each card has a key derived from the master key and its own UID. The leak of one card's key does not open the others, and the master key never leaves a secure environment.
The UID is 7 bytes long, so derivation is repeatable and does not require storing a separate key for each card in the database. If a card works with a random identifier, agree with the supplier at which moment the reader learns the real UID, because the key derivation depends on it.
- Keep the master key outside the application server, in a hardware module or a secure deposit.
- Do not store card keys in the database: derive them from the master key and the UID.
- Use a different master key for each application on the card.
Example share of cards on the new key version (%)
Versioning keys after the first batch
The key version number exists so that a second generation of keys can be introduced after the first batch of cards is issued, without replacing all cards at once. Practice: a card in version 1 is accepted during the transition period, newly issued cards receive version 2, and old ones are rewritten to the new version on the fly during swipes.
Set the policy at the start: when we change the version (on a schedule, after an incident, after a person with access to the key leaves), who approves the change and how long the transition period lasts. A period longer than a quarter usually means that some cards will never be rewritten.
Roles, backups and the emergency procedure
Good practice is a split between the key administrator and the card issuing operator. The operator issues cards but does not know the master key. The administrator does not issue cards, and every access to the key is logged. In a small plant this split is made between people from security and IT.
A backup of the master key is a record kept in two places, one of them outside the building. The emergency procedure describes what we do after the loss of a key: issuing the new generation, replacing cards in order of risk, and a message to employees.
Where InnerWeb fits in this
InnerWeb does not need card keys. It receives card swipe events from the access control system by webhook and links them with qualifications and permits. The keys stay with the plant and the access control supplier, and an encrypted card does not replace the access decision: it verifies the identity of the credential, and entry is decided by the permissions on the system side.
Checklist
Video
Frequently asked questions
Does InnerWeb store card keys?
No. The keys remain with the plant and the access control supplier. InnerWeb receives only swipe events from the access control system.
Why have a key version number?
It allows a new generation of keys to be introduced in stages, without replacing all cards at once.
Does a random identifier replace diversification?
No. It hides the permanent UID during a read, but it does not derive card keys.
Sources
Plan the keys together with the integration
We will help set the boundary of responsibility between the access control system and the complementary system. Book a conversation with the InnerWeb team.
Let's talk