0

I have some PC/SC code that has encoded thousands of MIFARE cards. I now have a HID OMNIKEY 5127 CK reader and I cannot get it to authenticate. For a standard 1K MIFARE card I load the transport key with:

FF 82 20 00 06 FF FF FF FF FF FF

which succeeds and then to authenticate against the first block:

FF 88 00 00 60 00

and it gives 67 00. Has anyone else seen this?

Michael Roland
  • 39,663
  • 10
  • 99
  • 206
Rob
  • 3,315
  • 1
  • 24
  • 35

1 Answers1

2

The AUTHENTICATE command (CLA=FF, INS=88) has been declared obsolete in the PC/SC specification, so it might not be supported by that reader. You could instead try the GENERAL AUTHENTICATE command:

+-----+-----+----+----+----+---------+---------+----------+------+
| CLA | INS | P1 | P2 | Lc | Version | Address | Key type | Key# |
+-----+-----+----+----+----+---------+---------+----------+------+
| FF  | 86  | 00 | 00 | 05 |   01    |  00 00  |    60    |  00  |
+-----+-----+----+----+----+---------+---------+----------+------+

The relevant part of the PC/SC specification is "Part3. Requirements for PC-Connected Interface Devices" (get it here).

Michael Roland
  • 39,663
  • 10
  • 99
  • 206
  • 1
    Thank you Michael that did the trick. For anyone reading this the specification of the command can be found in the pdf here: http://www.pcscworkgroup.com/specifications/specdownload.php (Part 3. Requirements for PC-Connected Interface Devices) – Rob Dec 04 '14 at 10:42