Shen Zhen Ucard Co., Ltd
Mifare UltraLight is also called MF0. It can be seen from the name UltraLight (ultralight) that it is a low-cost, small-capacity card. Low cost means that it is one of the lowest price chips in the market that comply with the ISO14443A protocol; small capacity means that its storage capacity is only 512bit (Mifare S50 has 8192bit). Mifare UltraLight's 512bit storage capacity is divided into 16 pages, each page contains 4 bytes, as shown in the figure below:
The first byte of Page0, Page1 and Page2 is the 7-byte serial number of the card and its check byte, where BCC0 = 0x88⊕SN0⊕SN1⊕SN2, BCC1 = SN3⊕SN4⊕SN5⊕SN6, SN0 is manufactured Commerce code, because Mifare UltraLight is produced by NXP, so SN0 is fixed at 04H. The second byte of Page2, Internal, is reserved as internal data. The above 10 bytes are fixed in the storage area when leaving the factory and cannot be changed by the user.
Page3 is a One Time Programmable (OTP) page. The contents of this page are all written as "0" when the card leaves the factory. When users use it, they can only write the content of a certain bit as "1". It is also not possible to write "1" as 0, that is, the newly written 4-byte content is XORed with the original content in the card, and the result of the XOR is stored in the card.
Page4-Page15 is a readable and writable user data area. When it leaves the factory, its content is initialized to 0, and users can read and write anything.
Pages 3 and 4 are used to lock the memory area to read-only. As shown in the following figure, if a bit of L4-L15 is set to 1, the content of the page corresponding to the serial number is locked as read-only, and each page can be set individually. Lotp is used to lock Page3 as read-only. "Mantis catches cicadas, carduelis is behind", Lotp-L15 can lock others, these bits are locked by three BL bits, BL15-10 is used to lock L15-L10, BL9-4 is used to lock L9-L4, BLotp Used to lock Lotp. All these 16 lock bits also have OTP characteristics. Generally speaking, these "locks" do not have "keys". Once locked, they cannot be changed back, so you must be careful when locking.
Mifare UltraLight's read and write operations are completely compatible with the Mifare S50. "Compatible" here means that both can use the same card reader hardware and the same software. Of course, if the software and hardware are completely the same, it is not two cards. The difference between the two is mainly reflected in the software operation, including the following 4 aspects:
First, the serial number of the Mifare UltraLight card is 7 bytes, while the serial number of the Mifare S50 card is only 4 bytes, so two layers (Cascade, 93H and 95H) operations are required during the card anti-collision selection phase;
Second, Mifare UltraLight has no password and does not require authentication;
Third, the page of Mifare UltraLight is equivalent to the BLOCK of Mifare S50, so Mifare UltraLight has 16 BLOCKs, and each BLOCK has only 4 bytes, while Mifare S50 has 64 BLOCKs, each BLOCK has 16 bytes;
Fourth, Mifare UltraLight has no electronic wallet function.
Based on the above four points, in the Mifare S50 program, after the card request command is successfully executed, if the card type byte is determined to be Mifare UltraLight (0044H), a second layer of anti-collision selection is added in the subsequent operations. After the card selection is successful Read and write directly to the 0-15 blocks of the card. Each read and write only focuses on the first 4 bytes and does not use the electronic wallet function, so that the two cards can be fully compatible.
Mifare UltraLight is a solution that is suitable for occasions such as one-time, low-cost electronic tickets and scenic area tickets that do not need to be recycled. It is said that the original purpose of launching Mifare UltraLight was to compete with 125KHz ID cards and serve as an alternative to magnetic stripe cards. Judging from the current situation, the competition between Mifare UltraLight and ID cards is not optimistic, and most of the magnetic stripe card replacements are ID cards.