miguelbalboa / rfid

Arduino RFID Library for MFRC522
The Unlicense
2.75k stars 1.43k forks source link

Reading from Sector Trailer, Key A always return 0x00 00 00... #487

Closed steelywing closed 5 years ago

steelywing commented 5 years ago

When I read from Sector Trailer, the Key A always return 0x00 00 00 00 00 00, but the correct Key A is 0xFF FF FF FF FF FF, is it normal? Only the access bits and Key B return normal.

I have tried several card, the Key A also return 0x00.

Rotzbua commented 5 years ago

Dump returns the raw data. The key is stored in a different way according to the tag specification. Normal mifare card inverts data at some points. So you have to convert raw data to key A.