Search code examples
tagsnfcrfidmifarecontactless-smartcard

Mifare UIDs of different card types


Is it possible for different Mifare card types to have the same UID?

For example, could there exist Mifare Classic 1K (4 bytes UID) and Mifare Classic 4K (4 bytes UID) that have the same UID? Or could there be Mifare Ultralight and Mifare Plus (both have 7 bytes UID) with the same UID?


Solution

  • This depends on what types of products and what UID length you consider.

    4 byte serial numbers (ISO 14443 Type A only, which is the protocol used for MIFARE products): There are about 4 billion possible UID values (2^32 = 4,294,967,296) and some of these values are reserved and not usable as normal UIDs. However, NXP claims to have sold more than "5 billion contactless and dual interface ICs" in the MIFARE product group. So based on the pigeonhole principle there must be at least some duplicates.

    Moreover, besides NXP, there are also other manufacturers producing ISO 14443 Type A chips (some even MIFARE products) with 4-byte UID and there is no clear scheme to divide the available range of serial numbers among those manufacturers.

    7 byte serial numbers are a bit different. Each manufacturer is allocated a block of serial numbers (e.g. NXP serial numbers start with 0x04, Infineon with 0x05, etc). Within that block many manufacturers (e.g. NXP) guarantee that they use each serial number only once. Each manufacturer has 2^48 = more than 280 trillion available UIDs, so keeping them unique should be possible for quite a while.

    Besides genuine tag/card products there are also