springcard / springcard.pcsc.sdk

SDK for PC/SC NFC readers from SpringCard
Other
26 stars 7 forks source link

How to change PICC master key's default type DES to AES? #4

Open thisistouhid opened 3 years ago

thisistouhid commented 3 years ago

I want to change the default PICC DES master key to AES master key. Tried this without any luck for factory-fresh-card (never written before):

desfire.SelectApplication(0); // success desfire.Authenticate((0, new byte[16]); // success desfire.ChangeKeyAes(0, 0 , newMasterKey , null); // fail or desfire.ChangeKeyAes(0, 0 , newMasterKey ,new byte[16]); // fail or desfire.ChangeKeyAes(0, 0, new byte[16] , null); // fail or desfire.ChangeKeyAes(0, 0, new byte[16] , new byte[16]); // fail

But I can change key type from AES to DES which was written with another system:

desfire.SelectApplication(0); // success desfire.AuthenticateAes((0, masterKey); // success desfire.ChangeKey(0, new byte[16] , null); // success

Please help.

springcard commented 3 years ago

Dear thisistouhid, please contact SpringCard Support team https://www.springcard.com/en/contact whenever you need support. Don't forget to mention the reference and version of the SpringCard product you're working with. Regards, Johann