nfc-tools / libfreefare

A convenience API for NFC cards manipulations on top of libnfc.
Other
395 stars 106 forks source link

Add support for JCOP cards with DESFire emulation #125

Closed darconeous closed 4 years ago

darconeous commented 4 years ago

Some JCOP cards (like this one) support native DESFire emulation, but the existing code was ignoring these cards because they didn't have the expected ATS prefix.

This change updates mifare_desfire_taste to also return true for JCOP cards with DESFire support, allowing them to be used with libfreefare.

darconeous commented 4 years ago

Note that long-term we may want to change how we are checking the ATS so that it isn't fragile to changes in the first four bytes of the ATS (which are changeable in DESFire EV2!). We may even want to consider removing the ATS check entirely, perhaps simply making sure that the ATS is there and having that be good enough.