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 blocks to be written/read, for example, with key A?
For example, I can write the key block 07 using key A, and I can also change the key A for this key block, but I can't write on it using key B, and I can't change the key B for this key block.
Why should I write/read using key A instead of key B? What's the difference?
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:
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.