Why keys are the weakest link
MIFARE DESFire EV3 offers a hardware AES 128-bit cipher with three-pass mutual authentication, encryption of the radio transmission and a CMAC code for data authenticity. These mechanisms protect the card only as long as the keys remain secret. Anyone who knows the master key can change the card configuration.
For this reason key management should have an owner, a procedure and an access record. It is a task for IT and security together, not an add-on to the installer's duties.
Who keeps the master keys
A DESFire card has one master key, which allows managing the applications on the card. We recommend that the master key is kept by two people from different departments, for example the IT manager and the security manager, split into parts. None of them alone should be able to initialize a card.
Keep the keys in a hardware security module or in a safe with an access log, not in a spreadsheet and not in e-mail. The installer or KD vendor receives the keys only for the time of card initialization and confirms their deletion.
Sample split of 14 application keys
Separating keys for KD, time tracking and training
DESFire allows up to 14 keys per application, which makes it possible to separate the keys for different systems on one card. Each system gets its own application and its own keys, so a leak of one system's key does not open the others.
In practice the plant can assign separate applications to access control, time tracking and swipes related to training. InnerWeb does not communicate with the card directly: it receives swipe events from the KD system through a webhook. The card keys therefore stay with the KD vendor and the client.
Sample split of application keys
The split below illustrates the principle and is not a requirement. Of the 14 keys available per application, the plant uses only some and keeps the rest for rotation and failures.
- Access control: read and write keys for the gate.
- Time tracking: a separate read key.
- Training: a separate key for identifying the account.
- Reserve: keys for rotation and the emergency procedure.
Rotation and the emergency procedure
Change keys when a person with access to the master key leaves, or when the KD vendor changes its contractor. With an AES card, replacing an application key does not require replacing the card, only reconfiguring the readers and the system.
The emergency procedure describes what to do if a key is exposed: who decides on the replacement, in what order the keys change in the readers and cards, and how long the transition mode lasts. Without such a procedure, decisions are made under pressure and gate downtime grows.
Evidence for an audit
An auditor asks who had access to the keys and when. A record in the key access register, a list of authorized persons and a protocol of card initialization support compliance with the requirement and provide evidence. The record does not guarantee compliance, but it shows that the process is managed.
Common mistakes in key management
The most common mistake is one key for all systems, because it was simpler at deployment. A leak of such a key opens KD, time tracking and training at the same time. The second mistake is keys in e-mail or in a spreadsheet, because it is then hard to establish who has seen them.
The third mistake is the lack of a reserve: when all 14 keys of an application are in use, rotation requires rebuilding the card. The fourth is the lack of a procedure for revoking access after an administrator leaves. All four mistakes can be eliminated by recording the rules in one document that IT and security sign together.
Checklist
Video
Frequently asked questions
Does InnerWeb store card keys?
No. InnerWeb receives swipe events from the KD system through a webhook, and card keys stay with the client and the KD vendor.
Does separating keys require several cards per employee?
No. DESFire allows separate applications and keys on one card, so one employee has one card.
What should be done after an application key is exposed?
Replace the key of that application according to the emergency procedure. The other applications have separate keys, so they do not need replacement.
Sources
Sort out the keys before replacing cards
We will help describe the division of responsibilities between IT and security and link KD events to the authorization system. Book a call.
Let's talk