Search code examples
smartcarduniqueidentifiersmartcard-readerwinscardiso-15693

Contact-less card through an OmniKey, how to get "UID"?


I am trying to read information off of a smartcard, using a contact-less OmniKey 5321 card reader.

Edit: Added a bounty.

I'm writing a C# 3 in .NET 3.5 program, so this is a Windows application.

The card has some information stamped onto it, that I would assume, in some way, is present in the card data (there is a photo of the card and reader below.)

The card has the following information stamped onto it:

1* 00447   21091328-32

When using the Diagnostics application that comes with the OmniKey card reader, I get the following information:

Smart Card Name: iCLASS 16KS UID:EE 74 0E 00 FB FF 12 E0
ATR            : 3B 8F 80 01 80 4F 0C A0 00 00 03 06 0A 00 1A 00 00 00 00 78
Protocol       : ISO 15693 (Part 2)

Now, here's some conversions I've considered:

  • 447 decimal = 1BF hexadecimal (not found)
  • 447 octal = 295 decimal (not found as BCD-type encoding)
  • 447 octal = 127 hexadecimal (not found)
  • 447 hexadecimal is not found

Here's my questions:

  • Is the "UID" number a unique number that I can rely on? I don't really care about the 447 number, all I need to know is that the information I pick from this card will uniquely identify it later, so that I can link it to the owner of the card
  • How would I go about reading the UID number? Using WINSCARD.DLL in Windows I can see that I get the "ATR" data, every single byte, but the UID is apparently not present in that part.

Here's the photo, if that gives you any information.

OmniKey reader back with card


Solution

  • You can rely on UID but it seems truncated in your case :

    UID:EE 74 0E 00 FB FF 12 E0
    

    Uid are usually 16 bytes long.

    You can read this Unique Identifier (UID): All ISO-compliant smart cards are provided with a UID number (akin to a VIN number on a vehicle). For interoperability purposes, a card’s UID is open and available to be read by all compliant readers. Since this unique number is not secured by keys, reading the UID of a smart card is comparable to reading a proximity card, mag stripe card or other technology that utilizes open, unsecured numbers.

    http://www.xceedid.com/pdf/XC5937_Smart_whitepaper.pdf