EN 
23.05.2026 Vladimír WELCOME IN MY WORLD

This website is originally written in the Czech language. Most content is machine (AI) translated into English. The translation may not be exact and may contain errors.

Tento článek si můžete zobrazit v originální české verzi. You can view this article in the original Czech version.
Bezkontaktní čipové technologie a přístupové systémy

Contactless chip technology and access control systems

| Petr Bouška - Samuraj |
Contactless chips, whether in the form of a card or key fob, and now also as part of mobile phones, have been very popular for many years. Their applications are wide-ranging, one of the essential areas being access control systems, i.e. simply opening doors. At first glance everything looks simple, but behind the scenes there are many different technologies, different standards and different manufacturers. I have tried to put together the basic information, but many details are hard to trace.
displayed: 28 358x (24 960 CZ, 3 398 EN) | Comments [5]

Note: I use contactless chips in practice and manage systems where they are used for identification. In the past, I have repeatedly looked for information on the basic principles of operation and security of various technologies. Generally, I found very little. Now I've spent several days trying to find information and answers to basic questions. It's quite difficult to find, for example, a description of how MIFARE Classic works, how the communication and authentication process works, how the encryption keys are used, etc. From various sources (I didn't delve into the standards) I've put together the basics. But I couldn't find answers to some things. For example, when I buy an NFC Tag, the specification always lists the chip type (e.g., MIFARE DESFire or NTAG213), but what chip is used in payment cards or mobile phones? If anyone is familiar with this area, I would welcome any additions or corrections to inaccurate information.

Contactless Chips - Contactless Integrated Circuit (IC)

The term Identification Card or Contactless Card is often used, or simply ID (Identity). Its core is an electronic chip (Chip), also called an Integrated Circuit, which can provide certain information and perform some functions.

In general, the RFID (Radio Frequency Identification) principle is used, that is, unique identification using radio waves. A tag (chip) containing stored information is used, and a contactless reader (with an antenna) reads the data. The tag can be active, meaning it is powered and can operate at distances of tens of meters. Or passive, where it is powered by the electromagnetic field of the reader and works up to a maximum of 10 centimeters from the reader (theoretically even more). Encryption, mutual authentication, and digital signatures can be used to secure the data. The chip can contain various applications. Different frequencies are used, previously 125 kHz, now primarily 13.56 MHz. The basic tag identification is done using the Unique Identifier (UID).

Chips are most often integrated into the following shapes / formats:

  • tag / keychain / fob - a small, durable, rounded (teardrop-shaped) object, can be attached to keys
Bezkontaktní čip - tag / klíčenka
  • smart card - a type of payment card, larger but flat, can be placed in a wallet
Bezkontaktní čip - Smart card
  • NFC sticker - for NFC, tags in the form of a sticker are also used
Bezkontaktní čip - tag / štítek
  • smartphone - modern mobile phones often support NFC, so they can function as both a contactless reader and a card

Types of Contactless Chips

EM Marin

The company EM Microelectronic SA manufactured (and still widely sells) the widespread and inexpensive chips called EM Marin, more precisely the EM4100 model, which operate at a frequency of 125 kHz (there were also other solutions at this frequency, such as HID Prox, Indala, Hitag). These chips have no security and it is very easy to copy, i.e., clone the ID. On Aliexpress, you can buy a 125KHz EM4100 RFID Copier for $7. This technology has been discouraged for use for many years.

These cards have only the card UID (usually 4 bytes long) stored, which should serve for unique identification. The value can be freely read, but cannot be overwritten. It was assumed that the card could only be created by the original manufacturer, who ensured that it had a unique ID. Later, chips were produced that allowed the UID to be written and thus create a duplicate of another card.

ISO/IEC 14443

ISO/IEC 14443 Cards and security devices for personal identification -- Contactless proximity objects is an international standard that defines contactless cards used for identification and the communication protocol for interacting with them. It consists of 4 parts:

  • ISO/IEC 14443-1 describes the physical properties
  • ISO/IEC 14443-2 communication interface
  • ISO/IEC 14443-3 initialization and anti-collision
  • ISO/IEC 14443-4 transmission protocol

Chips can be of Type A or Type B, the main difference is in the coding and modulation (Part 2) and the initialization procedure (Part 3). Readers must support both types, with the Type A tag being more widespread. Both chip types use the same transmission protocol (Part 4).

MIFARE

MIFARE is a commercial brand of NXP Semiconductors, which designates a series of chips used for contactless cards and tags. The first MIFARE Classic product appeared as early as 1993, 25 years ago, and since then there has been a continuous improvement of the chips towards greater security and functionality. All MIFARE types operate at a 13.56 MHz frequency (which allows faster data transfer and thus the transfer of more data) and comply with (at least partially) the ISO/IEC 14443 standard (they are Compliant). The cards are equipped with memory, typically 1 kB or 4 kB. They are often referred to as Contactless Smart cards. Dual-chip cards containing both contact and contactless parts are also manufactured.

Basic communication works as follows. When the chip enters the electromagnetic field of the reader, the card initialization and anti-collision protection are initiated (in case there are multiple cards near the reader, to communicate with only one). At the beginning, the chip reveals its type and its UID. Then a request should come to read data from some sector (if the application doesn't just read the UID). At the beginning, a three-pass authentication takes place (the card and the reader encrypt random data to each other to verify the knowledge of the encryption key).

Main MIFARE Chip Types

  • MIFARE Classic - the original chip, several attacks were published that allow cloning, in 2011 an improved version MIFARE Classic EV1 was released, but in 2015 an attack was also published on it, it is not recommended for security applications, uses proprietary Crypto-1 encryption which is broken, 4 byte UID
  • MIFARE Plus - successor to the Classic version with which it is backward compatible, uses AES for encryption, authentication, and data integrity, a series of versions have been created, the latest is MIFARE Plus EV1
  • MIFARE Ultralight - inexpensive chips intended for single-use or large-volume deployment, such as in public transport, comply with the ISO/IEC 14443 A 1-3 and NFC Forum Tag Type 2 standards, again there are several versions, have smaller memory, do not use encryption (except for version C), contain One-Time-Programmable (OTP) memory and write lock capability
  • MIFARE DESFire - the most flexible and also the most secure chip, the MIFARE DESFire EV1 or MIFARE DESFire EV2 version is used, 7 byte UID, up to 8 kB of memory, supports 128-bit AES, complies with the ISO/IEC 14443 A standard in all 4 parts and uses ISO/IEC 7816-4 commands, HW acceleration for AES, can store up to 28 different applications with 32 files per application, is compatible with NFC technology

iCLASS

iCLASS is a commercial brand of HID Global. It also operates at a frequency of 13.56 MHz and supports security features. The most widely used is iCLASS SE. It brought security in that the UID can only be read by a valid reader (the data is stored encrypted). All communication between the reader and the tag is encrypted using a secure algorithm. Each reader must have the shared decryption key loaded.

FeliCa

FeliCa (Felicity Card) is a contactless card system from Sony, used primarily in Japan. There was an attempt to make it the ISO/IEC 14443 Type C standard, but it was rejected. It also operates at a 13.56 MHz frequency and supports security features. It corresponds to the NFC-F standard.

NFC - Near Field Communication

NFC is a group of communication protocols for contactless information exchange between two devices over a short distance (up to 4 cm, theoretically up to 20 cm). The NFC Forum (a non-profit association of companies including NXP, Sony, and Nokia) has created the NFC specification. It also uses electromagnetic induction between the antennas of the two devices. It operates on the unlicensed frequency of 13.56 MHz, with speeds ranging from 106 to 424 kbps.

NFC devices can operate in three modes:

  • Peer to Peer - direct connection between two NFC devices
  • Reader/writer (reader) - can read and possibly write to passive NFC cards / tags
  • Card emulation - the active device behaves like a passive card / tag (e.g., a phone acts as a payment card)

NFC standards cover communication protocols and data formats for exchange. They are derived from existing standards (and are compatible with them) such as ISO/IEC 14443 and FeliCa. The specification is in ISO/IEC 18092 and ISO/IEC 21481. Communication is initiated by the initiator, who actively generates the RF field and can power the passive target, and connects to the target. The NFC tag contains a certain amount of memory where data can be stored and has a unique ID (UID). The NFC Forum has defined a general data format called NDEF (NFC Data Exchange Format).

Since NFC is based on ISO/IEC 14443, it often uses various types of MIFARE as chips (IC). In general, most NFC chips are manufactured by NXP Semiconductors, which owns MIFARE and also produces NFC NTAG, ICODE, and readers.

NFC Tag Types

  • Tag Type 1 - based on ISO/IEC 14443 A, 96 B memory (expandable to 2 kB), 106 kbps speed, read and write support, can be switched to read-only
  • Tag Type 2 - based on ISO/IEC 14443 A, 48 B memory (expandable to 2 kB), 106 kbps speed, read and write support, can be switched to read-only
  • Tag Type 3 - based on Sony FeliCa, 2 kB memory (expandable to 1 MB per service), 212, 424 kbps speed, set to read-only or read-write from the factory
  • Tag Type 4 - based on ISO/IEC 14443 A or B, 32 kB memory per service, 106, 212, 424 kbps speed, set to read-only or read-write from the factory
  • Tag Type 5 - a new type, based on ISO/IEC 15693 (NXP iCODE SLIX, HID iCLASS), up to 64 kB memory, supports read and write, can be switched to read-only

A large number of today's mobile phones support NFC (contain an NFC chip) and can serve as a reader, card, or for Peer to Peer communication with another phone. The NFC transfer rate is quite low, so it can be used for example to transfer a contact, but otherwise it is used for example to configure a Bluetooth / WiFi connection, where the transfer takes place.

Contactless Payment Cards

Another area where it's hard to find technical details. In general, it is stated that contactless payment cards use NFC technology. This is why it is also possible to operate a payment card on an NFC-enabled mobile phone.

Bezkontaktní platební karta VISA

For cashless card transactions, a payment terminal, generally referred to as a POS (Point-of-sale) terminal, is used. The Europay, MasterCard, and Visa companies established the EMV standard for operations between chip cards and reading devices. EMV cards have a chip that stores data, which is an increase in security over magnetic stripe cards. Contact cards are based on ISO/IEC 7816 and contactless on ISO/IEC 14443. Cards use PIN and cryptographic algorithms (3DES, RSA, SHA) for card authentication before a transaction.

Asymmetric cryptography and a number of combinations of public and private keys are used for security and verification. These are the keys of the card, bank, and credit card company. A one-time key is generated for each operation. The credit company's public keys are stored in each payment terminal. A hash is also calculated for the stored data, and the entire combination is encrypted to verify the integrity of the data. The card's private key can only be read by the card itself and cannot be copied (the Smart card principle).

Individual payment card manufacturers have their own designations for contactless payment technology, which is compatible with EMV and therefore also with each other. Such as Visa Contactless (originally payWave), Mastercard Contactless (originally Paypass), and American Express ExpressPay.

One of the often-presented attacks on contactless transactions is called a Relay Attack. A virus gets into the user's mobile phone, and if the contactless payment card is near the NFC-enabled phone, the virus mediates the communication between the card and the attacker's device, allowing the attacker to make a payment. The payment terminal then thinks it is communicating directly with the card, and everything proceeds correctly.

Contactless payment cards can now be operated on an mobile phone with NFC support. There are large services like Google Pay and Apple Pay, where bank support is required, and then it is possible to add your card. Standard payment at the POS terminal is done via NFC, and authentication can be added, such as a fingerprint. Some banks also have their own app, like Poketka from Česká Spořitelna.

On Android, Host Card Emulation (HCE) is used, which is a software solution for secure NFC transactions. A hardware Secure Element is then not required. Apple uses an integrated Secure Element (SE) chip.

Contactless Cards in the Czech Republic

Contactless cards are used in many places in our country. A common example is

  • Lítačka - PID public transportation system, uses MIFARE DESFire EV1
  • In-karta - chip card of České dráhy a.s., uses MIFARE DESFire EV1

Security of Contactless Chips

The basic security problem when using chips in access systems is twofold. If someone manages to duplicate a foreign card and impersonate them. Here the advantage is that contactless chips can only be read over a short distance (there are attempts to make devices that would read the chip over a longer distance). Or if a person creates a duplicate of their own card and we lose track of the physically issued cards (which is the key to the door).

The first chips served for identification and contained only the UID. The security consisted in the fact that they were manufactured by a single company (no one else could do it), which ensured that they had a unique ID. The UID value could only be read. After some time, manufacturers appeared who were producing the same chip, but it was possible to write any UID. This made it possible to create a duplicate card. In practice, even today, modern cards are used, but only the UID is read.

MIFARE cards that allow the UID to be changed are called Magic Cards. As a defense, the ability to identify these cards when reading and not allow them appeared. Attackers again tried to modify the cards, for example, cards with one-time write.

The next step towards security is to not use the UID, but encrypted data on the card. The image below shows the data structure of the MIFARE Classic, where a chip with 1 kB of memory has 16 sectors, each with 4 blocks of 16 bytes. Keys and access rights to the keys are stored for each sector. Unfortunately, many cards use simple known keys, so the basic attack is to test a set of keys. There are a number of other attacks on various vulnerabilities of the *MIFARE Classic* (such as the Crypto-1 cipher).

MIFARE Classic struktura paměti

Today's secure solution is to use MIFARE DESFire EV1 chips and encrypted data (ideally an individual key for each user). No working attack is known on these cards.

Contactless Readers

Modern contactless readers are usually able to work with a variety of card types. Commonly those according to the ISO/IEC 14443 standard, often most operating at 13.56 MHz (various MIFARE types, NFC, FeliCa, iCLASS), some are also combined for 125 kHz frequency.

Access Control Systems (ACS)

In access control systems, the readers are connected to the controller via a physical connection, often a serial interface Wiegand or RS-485. Wiegand uses three wires (DATA0, DATA1, ground), the cables can be up to 100/150 m long. It uses the Wiegand communication protocol, either 26 bit or 32 bit.

RS-485 (or TIA/EIA-485) uses serial communication over a twisted pair (DATA+, DATA-, ground), the cables can be up to 1000/1200 m long (the transfer rate decreases). Up to 32 readers can be on the bus.

From a security point of view, a reader can securely communicate with a card, but the communication with the controller can then be eavesdropped on. Therefore, the reader should have tamper protection installed, so that it cannot be removed without authorization.

Bezkontaktní čtečka HID iClass reader Bezkontaktní čtečka Promag LBR200 Bezkontaktní čtečka Siemens VR10S-MF

Connection to a Computer

For a number of purposes, it is useful to work with contactless cards on a regular computer. Historically, the classic serial interface RS-232 (usually a serial port with a 9-pin connector) was used for connection. There are adapters from RS-485 or Wiegand to RS-232 for connecting to a computer. For programmers, the serial interface is probably simple to use (although it has many disadvantages), so readers on the COM port are still used today. More modern is of course USB connection. Some USB readers support virtual COM port. Another option is a keyboard emulator (reading ID as keyboard input). There are also wireless readers that connect via Bluetooth.

Bezkontaktní čtečka HID OMNIKEY 5022

Some commonly used reader types

It's not easy to find an application that simply reads the UID of cards. One example is

Smartphones with NFC Support

If we have a smartphone with NFC support, we can use it as a reader (or even for writing) of contactless chips. The types of chips supported depend on the NFC chip manufacturer in the phone.

For Android, there are a number of nice chip reading applications, some examples.

Access Control Systems (ACS)

In simple terms, a chip-based access control system solves opening doors using a contactless chip. The door is unlocked (opened) if we have the authorization and present the chip to the reader, after which the lock is secured again. It also records accesses and stores the history. If a card is lost, it can be simply blocked in the system, and the lock doesn't need to be changed.

An access control system can be used in companies, where it controls access to individual spaces and broadly monitors employee movement, or in apartment or family houses, where it simplifies unlocking.

Basic Components of an Access Control System

  • lock and hardware - on the inside, a panic handle is used, which unlocks the door when pressed, the lock is self-locking, it can be:
    • electromechanical lock, where the outside handle works idly and only when a signal (chip system, intercom) is applied is it activated for a certain time and unlocks the door when pressed
    • electromotive lock, where after a signal is applied, a motor unlocks the lock (for a certain time) and you just need to push the door (there is usually a knob on the outside)
    • a special case is electromagnetic locking
  • contactless chip reader - located near the door, reads the data from the contactless chip and transmits it to the controller, contains all the logic for communicating with the card (it may also include encryption keys)
  • controller (also called control unit, Access Point, terminal, concentrator, controller) - one or more readers are connected to the controller (usually via Wiegand, RS-485, Clock-Data), which also typically powers them, and controls the door lock via an output relay, it contains user data (chips - access permissions) and stores access history, multiple controllers can be interconnected (e.g., via RS-485 or Ethernet), power supply is backed up by batteries (notification of switching to battery power may be important)
  • server / configuration software - for smaller systems, we configure by connecting a computer directly to the controller via RS-232, USB, LAN and uploading the settings to the controller, larger solutions may use a server that is constantly connected to the controllers (but the system still works if it fails), it mediates the configuration (we connect to it from other PCs) and downloads the access history (stores it in its DB), so it can provide online information about entries, today the server is also often cloud-based
  • USB reader - optionally we can use a chip reader connected to a computer, where we do system configuration (adding new users/chips), for simple card reading/configuration, otherwise we can read the chips on any reader in the system
Schéma přístupového systému Siemens Aliro

The core of the access control system is the controller, but the types of chips supported depend more on the reader (we can often add support for new chips by replacing the readers). Some examples of controllers:

Řídící kontrolér Dahua ASC1204B-S Řídící kontrolér Siemens Aliro AP01P Řídící kontrolér Satel ACCO-KPWG Řídící kontrolér IMA CKP-11

Brief Functional Principle

The door is equipped with an electronic lock and a reader, which is located next to the door, on the door, or directly on the handle. The reader reads the data from the contactless chip, which may be just reading the UID or much more secure encrypted reading of a file/application from the card. The read data is transmitted over the bus to its controller, which is usually located in a secure area. The controller has stored the configuration of the readers and users (chips) who are allowed access to the given reader (it can be limited to certain days and hours). It stores the data about the time and card in memory, compares it with the allowed accesses and restrictions, and if everything is in order, it sends a signal to the lock to unlock.

We usually have multiple doors, readers, and controllers. In the configuration software of the access control system, individual controllers are configured during implementation, and individual readers are addressed, to which we assign an identification label. In some solutions, certain concentrators (terminals) are also used, which have controllers (and their own readers) connected to them. The software then connects to the concentrator and addresses the controllers and readers through it.

In the software, we create users, to whom we assign identifiers (chips) and set access permissions (which readers they can use and when). Calendars are used to restrict access time and group readers for easy access assignment.

Author:

Related articles:

Security

Security tools. Primarily Firewall and the like.

If you want write something about this article use comments.

Comments
  1. [1] avemilia

    Strucny, informativni a dobre systematizovany uvod do problematiky. Treba typ cipu v Litacce jsem nasel jenom tady. Good job!

    Tuesday, 07.01.2020 12:47 | answer
  2. [2] Martin

    Díky za pěkný článek. Nějaké odkazy na kvalitní zdroje vhodné k dalšímu studiu problematiky prosím nemáte?

    Thursday, 05.03.2020 14:28 | answer
  3. [3] LEDSYSTEMS Czech

    Chtěl bych si nějaký standart system poridit ne nic mega profi, 3 vstupy , placeni čipem max. na 5místech a dobijení tokenů platebni kartou atd. třeba do 500-1000 lidí,

    nemate prosim nejaky typ co koupit;-) za system ...něco ne moc složitosti aby to nestalo randál ..,typ , značku a tak ... moc hezký popis tady , popř. mail ledsyst@gmail.com, děkuji za případné info , Pavel . LEDSYSTEMS Czech

    Monday, 12.04.2021 13:55 | answer
  4. [4] Miroslav Janda

    Existují zařízení na výrobu duplikátu čipových klíčenek, příp. firem, které vyrobí duplikát. Jde vyrobit čipovou klíčenku z bezkontaktní čtečky, resp. vln z této čtečky? Někdo se nám dostal do baráku všemi třemi dveřmi - každé mají jiné čipové klíčenky. Nevěřím, že by se dostal ke klíčenkám od všech těchto dveří, takže se obávám, že něco zkopíroval z čteček.

    Sunday, 04.06.2023 19:35 | answer
  5. [5] Pavel Schjebal

    Dobrý den,mám k dispozici tenhle kousek DS-K1T502DBFWX-C od hikvision, čte to téměř cokoli, je otvírání mobilem je problém. v článku jsem se dočetl, že platební karta má pokaždé jiné číslo. A na tom to celé pohoří. Jde to nějak obejít, a nastavit přes peněženku v jablku nebo samsungu?

    Jinak klobouk dolu, vaše články jsou super, a obdivuju toho času co do toho vkládáte. S přáním pěkného dne Pavel Schejbal schejbal@bluefacility.cz

    Wednesday, 28.06.2023 11:38 | answer
Add comment

Insert tag: strong em link

Help:
  • maximum length of comment is 2000 characters
  • HTML tags are not allowed (they will be removed), you can use only the special tags listed above the input field
  • new line (ENTER) ends paragraph and start new one
  • when you respond to a comment, put the original comment number in squar brackets at the beginning of the paragraph (line)