I have a MIFARE 1K tag. Some blocks can be written/read using authentication key A, while other block can be written using authentication key B. Why? How can I change all bl
Each sector of a MIFARE Classic card has two authentication keys: key A and key B. These two keys together with access conditions are stored in the last block of each sector (the so-called sector trailer). The sector trailer looks like this:
+-----------------------------+--------------+----+-----------------------------+
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
+-----------------------------+--------------+----+-----------------------------+
| Key A | Access Conditions | Key B |
| (6 bytes) | (4 bytes) | (6 bytes) |
+-----------------------------+--------------+----+-----------------------------+
The access conditions define how you can access the blocks in the sector:
Typical scenarios are:
You can find a full description of the possible access conditions in the MIFARE datasheet.