Forum / MIFARE and NFC Reader IC`s / Authentication Mifare Classic
Tagged: Mifare Classic authentication
-
Hi All,
I'm currently trying to read/write data from my mifare classic card.
I see a lot of examples pointing to the NXP library only that one is to large for my embedded environment, so i want to create my own functions.
Currently I'm able to detect and read the UID from the card.
Next step is to read a data block.
In the datasheet for the Mifare Classic, I see that in order to read/write data you first need to authentication to a sector block.
This is done in three steps:
1. send authorization request for data sector 0, 0x60 - 0x00 - CRC
2. As response 4 token bytes are received, token RB.
3. Send 8 byte token to the Card, token AB
4. Receive 4 byte token for validation, token BA
I have got it to step 2, so I receive the 4 bytes token (token RB). but I have no clue on how to calculate the 8 bytes return data?
Could someone explain to me on how to calculate token AB.
Kind regards,
Peter
+ 0 | - 0
Hi Peter,
First of all: you need a NXP NFC reader chip for reading and writing of a MIFARE Classic. The reason is the proprietary cipher of the MIFARE Classic. The authentication is implemented in every NXP NFC reader. Usually you store the keys (A and/or B) in the registers of the reader and execute the authentication.
The TapLinx team
+ 0 | - 0
Hi,
Thank you for your quick response.
I currently use the PN512 for the detection of the card.
So if I understand you correctly I need to store the keys to the dedicated registers in the chip and then it will do the encryption for me?
I will try to send the keys to the registers and then send the authentication command.
Kind regards,
Peter
+ 0 | - 0
Hi Peter,
If you write to me at: taplinx@nxp.com, I can offer how to write to the PN512 FIFO for communicating with the MIFARE Classic.
The TapLinx team
+ 0 | - 0
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.