Why change the card technology at all
The first question usually comes from procurement: whether the current cards will last a few more years. The answer depends on the technology they use. MIFARE Classic cards rely on the Crypto1 cipher, which has been publicly broken, so they are not suitable for new deployments that require security. Copying such a card today is a matter of equipment available on the market and basic knowledge.
MIFARE DESFire cards in the EV2 and EV3 versions use AES-128 encryption and comply with ISO/IEC 14443. They belong to the same physical family, so the card still has the format of a badge or a plastic card, but mutual authentication between the card and the reader rests on a known and well-studied algorithm.
Do I have to replace all cards at once?
No. The migration can be spread over time. Readers that support both card types allow cards to be replaced in groups, for example first the critical zones and people with broad permissions. The condition is that every card in the register has a clear status and an issue date.
Does an encrypted card alone guarantee security?
No. Encryption protects the communication between the card and the reader, but it does not replace discipline in handling keys and the register. The strongest card is useless if the master key sits in an import file or in a script on an administrator's disk.
Master key and diversification: how it works
The master key is the value from which the system derives the keys of all cards in the plant. If every card had the same key, disclosing it from one card would open all the others. That is why diversification is used: the key of each card is derived from the master key and the unique UID of that card. A leaked key from one card does not open the others, because without the master key the keys of other cards cannot be derived.
For a practitioner this means two things. First, one compromised card is one incident, not a failure of the whole system. Second, the full strength of the protection shifts to safeguarding the master key, so it needs its own procedures, roles and backup.
Where should the master key be stored?
The master key should not be kept in a file or in an import script. Good practice is a separate key administrator role, independent of the access control system administrator, and a backup kept apart, in a different location and under different access control than the backup of the system itself.
What happens when the master key has to be changed?
Changing the master key means personalizing the cards again, so plan it like a migration: in groups and within a service window. That is why it pays to have a complete register of data for each card from the start, because without it there is no way to know which cards must be written again.
Key length in bits (AES-128 compared with the other value in the text)
The SAM module in the reader
The SAM module stores the master keys in a secured chip and performs card authentication, so the keys never leave the reader. This is described in the chip manufacturer's documentation, including the note on SAM AV3. As a result, removing the reader from the wall or eavesdropping on the bus does not reveal the master key.
The access control supplier is responsible for selecting readers and SAM modules. InnerWeb is a software manufacturer, not a device manufacturer: it does not produce or replace readers, it only integrates with the plant's existing access control system. In practice the conversation about the SAM module takes place between the plant and the access control supplier, while we receive card scan events from that system.
Is the SAM module mandatory?
There is no general obligation, but with encrypted cards it is the only sensible way to keep the keys from being stored in plain form in the reader. If a supplier proposes a solution without SAM, ask where the keys are physically kept and how they are protected.
Procurement questions before ordering
Procurement asks about measurable things: how much the replacement costs, what happens with spare cards and who is responsible for the keys. Before ordering, it is worth having five points in writing: the card technology (MIFARE DESFire EV2 or EV3), the key diversification method, where the master key is stored, the key administrator role and the key backup mode.
When comparing access control supplier offers, ask about the same things in the same order. An offer that does not answer one of the five questions is incomplete, even if the unit price of the card looks attractive.
- Card technology and chip version, with an explicit indication of AES-128 encryption.
- Diversification method: from which master key and which identifier the card key is derived.
- Master key location: a SAM module in the reader or an alternative solution.
- Key administrator role, separate from the system administrator.
- Key backup stored separately, and the way it is restored.
Where InnerWeb fits in this chain
InnerWeb does not manage card keys and does not touch the cryptographic layer. We receive card scan events from the access control system through a webhook authenticated with a token that is valid for a limited time, 12 hours. The event includes, among other things, the time, the place, the first name, the last name, the company, the number of the active card and the person's language.
We combine this data with qualifications, permits, attendance and time recording, as an independent system that supplements the client's access control, HR and ERP. As a result, the question of whether a person has valid training and a permit, and not only a valid card, gets one answer in one place, without replacing readers.
Video
Frequently asked questions
Does key diversification work without the SAM module?
Mathematically yes, but then the master key has to be stored in the reader or somewhere else in the system in another form. The SAM module is recommended, because the keys never leave the secured chip.
Who should be the key administrator?
A separate role, independent of the access control system administrator. This way no single person has access both to the system and to the master key.
Does InnerWeb replace our readers?
No. InnerWeb is a software manufacturer and integrates with the client's existing access control system. The integration specification is intended for the access control supplier.
Will DESFire cards work on older readers?
It depends on the reader model and its software. Before ordering, confirm with the access control supplier that the readers support the chosen chip version and AES-128 encryption.
Sources
Let's talk about cards and access control events
We will show how card scan events from the plant's access control system connect with qualifications and permits, without replacing readers.
Let's talk