With our new reader we are trying to update a sector in a Mifare Classic card.
Problem: We have old mifare cards in which we want to write additional data.
However there are 3 possible keys that have access to Sector 1.
- The old Mifare classic "A0 A1 A2 A3 A4 A5" key
- The new Mifare classic "FF FF FF FF FF FF" key
- Our empty key "01 23 45 67 89 AB" key.
We are now using the NXP NFC Reader Library (in the past a custom library)
Doing a discovery works perfect.
Doing a "phalMfc_Authenticate" with the first key (A0..A5) which is right works and data can be read and written.
However when the first "phalMfc_Authenticate" (A0..A5) fails and trying to continue with "phalMfc_Authenticate" (FF..FF) the card always fails as if the key was wrong. But if i start with the second key (FF..FF) it is accepted.
Looking at the datasheet of the MF1S50 (Mifare classic) i don't see the flow to follow with a failure on an Authenticate.
Looking through the NXP NFC Reader Library i don't see the method how to recover from a Authenticate failure.
Do note: i a trying to do this with the NFC reader library without turning off the field and re-doing the anticollision loop. (The Card number is known and sector 0 already has been validated by the program)