Saturday 24 August 2013

Mifare Plus WritePerso to apdu command

Mifare Plus WritePerso to apdu command

I am working on a pet project and I am trying to do a Mifare Plus
personalization from level 0 to level 1. The first step is changing Card
Master Key.
I have the raw command and it is working (tested on another library) but I
need to convert it to APDU command protocol to use it in my own C#
library.
sample RAW Command (hex)
A8 00 90 {key -16 bytes)}
But when I try to convert it to standard APDU command:
- Class -> 0xA8
- Ins -> 0x00
- P1 -> 0x90
- P2 -> 0x00
- P3/le -> 0x90 (to receive answer)
- Data -> {key - 16 bytes}
And send to the ACR128 reader.
I got error:
SW: 6300
Data: 0C
I think I am setting something wrong in the APDU command, but I don't find
what.
I have tried this one too:
- Class -> 0x80
- Ins -> 0x02
- P1 -> 0xA8
- P2 -> 0x00
- P3/le -> 0x90
- Data -> {key - 16 bytes}
But then I get this different error (only data):
SW: 6300
Data: 0B
The question is, how can I convert this command to a rightn pcsc APDU
command ?

No comments:

Post a Comment