Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for JCOP cards with DESFire emulation #125

Merged
merged 1 commit into from
Jan 3, 2020

Conversation

darconeous
Copy link
Member

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 darconeous self-assigned this Jan 2, 2020
@darconeous
Copy link
Member Author

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.

Some JCOP cards support native DESFire EV1/EV2 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.
Copy link
Contributor

@smortex smortex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@smortex smortex merged commit 0480b72 into nfc-tools:master Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants