I'm trying to use a MIFARE 1K RFID card with RC522 RFID reader/writer for my college project. I'm trying to understand about memory organization of MIFARE 1K.A documentation() that supplied with a RFID Arduino library() says like this. I will very appreciate if someone explain me this portion clearly.

The MIFARE Classic 1K offers 1024 bytes of data storage, split into 16 sectors; each sector is protected by two different keys, called A and B. Each key can be programmed to allow operations such as reading, writing, increasing valueblocks, etc. MIFARE Classic 4K offers 4096 bytes split into forty sectors, of which 32 are same size as in the 1K with eight more that are quadruple size sectors. MIFARE Classic mini offers 320 bytes split into five sectors. For each of these card types, 16 bytes per sector are reserved for the keys and access conditions and can not normally be used for user data. Also, the very first 16 bytes contain the serial number of the card and certain other manufacturer data and are read only. That brings the net storage capacity of these cards down to 752 bytes for MIFARE Classic 1k, 3440 bytes for MIFARE Classic 4k, and 224 bytes for Mini. It uses an NXP proprietary security protocol (Crypto-1) for authentication and ciphering.

Accordind to above quote,

For each of these card types, 16 bytes per sector are reserved for the keys and access conditions and can not normally be used for user data. Blockquote

Explain how to divide 1024 bytes like this.It has 16 sectors.So,total memory should be 16*16=256 bytes.This is impossible. Please explain this.

3 Answers 3


You're reading (and doing your sums) backwards.

You have 1024 bytes of data space.

That data space is split into 16 sectors, so 1024 / 16 = 64 bytes per sector.

Each sector has 16 bytes reserved for keys etc, so each sector has 64 - 16 = 48 bytes of user data space.

48 bytes of user data space per sector multiplied by 16 sectors is 768 bytes.

Incidentally 1024 - 768 = 256, which is what you were calculating before. What you calculated was the amount of the 1024 bytes that is reserved in total for the keys and access controls.

  • Thanks @Majenko...I haven't read this clearly..It's very simple.Thanks for explanation.
    – user_fs10
    Sep 23, 2015 at 3:46

Divide 1024 bytes into 16 sectors -

1024 bytes / 16 sectors = 64 bytes per sector

The first 16 bytes of each sector are used for 'management' and thus reserved. This leaves -

64 - 16 = 48 bytes (per sector) for general storage
  • Ops..Thanks friend.I have not read this clearly.Thanks
    – user_fs10
    Sep 23, 2015 at 3:44

There is also an excellent graphic of the various mifare card layouts, that someone has put together: https://upload.wikimedia.org/wikipedia/commons/thumb/3/39/MiFare_Byte_Layout.png/220px-MiFare_Byte_Layout.png


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.