RFID cards, tags and stickers

Libelium offers Mifare® Classic 1k cards tags and stickers along with the Waspmote RFID/NFC module. More than 3.5 billions of this type of cards have been sold around the world up now.

An RFID card has a thin form factor (81x54x1 mm), like a driving license or identification card, and can be kept in the user's wallet. However, an RFID tag is smaller and thicker (around 20x20x5 mm) but can be kept in the user's keyring. Last, an RFID sticker has an intermediate size (50x50) and it is really thin and flexible. Of course, a sticker can be stuck in any object so it focuses on the Internet of Things (IoT) and logistics applications.

It is important to note that a card always has a longer range than a tag or sticker because the antenna of a card has more surface.

Figure: RFID cards
Figure: RFID keyrings

Figure: RFID sticker

Figure: RFID sticker

A Mifare® Classic 1k card has 1024 bytes of internal storage capacity, divided into 16 sectors. Each sector is composed of 4 blocks, and each block is composed of 16 bytes. That is to say, each card has 64 blocks, from number 0 to 63. Let's describe the structure of a card:

1. In each sector, the last block (blocks number 3, 7, 11..) is called the sector trailer. This block stores the 2 keys or passwords and controls the access to the rest of the blocks in the sector (e.g. block number 7 controls block 4, 5 and 6). The first 6 bytes (0..5) are the key A, and the last 5 bytes (10..15) are the key B. As we will see, before reading or writing in any block, we must first authenticate us to that sector by providing one of the two keys (normally the A key). The bytes number 6, 7 and 8 store the control bytes, which control the way the the blocks may be accessed (read/write). Byte number 9 is not defined in all sector trailers.

2. The very first block (number 0) is called the manufacturer block and has special characteristics. The first 4 bytes (0..3) are the unique identification (UID). The UID can be seen as the serial number of the card and identify the card in a unequivocal way (read more in the "Security with RFID/NFC at 13.56 MHz" chapter). The next byte (number 4) is the CRC check byte so it can be used to check the correct read; it is calculated with the XOR of the 4-byte UID. The rest of the bytes in the block number 0 (bytes 5..15) are the manufacturer data. This block 0 has read-only access for security reasons. We need to authenticate before reading the block number 0 but the UID can be obtained anyway, without the key.

3. The rest of the blocks (1 and 2; 4, 5 and 6; 8, 9 and 10; etc) are known as data blocks and they are available to read and write operations, after the needed authentication process.

To sum up, the Mifare® 1k cards have a net storage capacity of:

  • (16 sectors/card x 3 data blocks/sector X 16 bytes/block) -- 16 bytes (first block) = 752 bytes/card

The cards have been tested to conserve data for 10 years and to have a write endurance of 100,000 cycles.