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

Unknown key version - card locked after desfire test #115

Open
alenloncaric opened this issue Aug 20, 2019 · 1 comment
Open

Unknown key version - card locked after desfire test #115

alenloncaric opened this issue Aug 20, 2019 · 1 comment

Comments

@alenloncaric
Copy link

alenloncaric commented Aug 20, 2019

Dear,

we have been running DESFIRE test from tests, testing all the commmands and somewhere we created some error on the card.

Now the key version returns C0, which is unknown. 2 Cards are having same issue (EV1)

*** mifare_desfire_get_key_version ***
===> 0000   90 64 00 00 01 00 00                             |.d.....         |
<=== 0000   c0 91 00   

What is C0? and how to overcome it ?

With kind regards,

@darconeous
Copy link
Member

I'm guessing the PICC didn't have a good connection to the PCD during the test and that it didn't get formatted back to normal afterward.

I'm guessing the key in question is the master PICC key?

Casually looking over the sources for the tests, it isn't immediately clear to me how any key could be set with a version of 0xC0.

There should be a limited number of possibilities for what the actual key is. You may be able to try resetting the card using the new mifare-desfire-ev1-change-picc-key tool being introduced via #119. Something like this:

mifare-desfire-ev1-change-picc-key -k DES:0000000000000000
mifare-desfire-ev1-change-picc-key -k DES:4142434445464748
mifare-desfire-ev1-change-picc-key -k DES:43617264204d6173746572204b657921
mifare-desfire-ev1-change-picc-key -k DES:000000000000000000000000000000000000000000000000
mifare-desfire-ev1-change-picc-key -k AES:00000000000000000000000000000000

Hopefully one of those commands gets you unstuck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants