Forum / MIFARE SDK / Change Key
Tagged: change_key
-
My problem is about change key within application.
I have created a application with KeySetting1= 0x0E and KeySetting2 = 0x03.
I will have three keys with all byte equal at 0x00.
My keys are of 8 byte.
I have proved to change Application key Master, these are the phases:
1. Authentication with PiccMasterKey:OK.
2. Select Application: OK.
3. Authentication App MasterKey to generate the sessionKey_1: ok
4 Change key of the App MasterKey with 8byte(all 0x11) using the sessionKey_1: OK.
5. Authentication App MasterKey with the new key: return 0xAE.
I have proved to change the key 1 of the Application, these are the phases:
1. Authentication with PiccMasterKey:OK.
2. Select Application: OK.
3. Authentication App MasterKey to generate the sessionKey_1.
3. Authentication with key 1 of default to generate the sessionKey_2.
4 Change key of the Key 1 with 8byte(all 0x22) using the sessionKey_2: return 0xAE.
Waiting for your help.
Thanks
+ 1 | - 1
Hi Fiore,
First of all, the term “session key” has a different meaning for me. A session key is negotiated between the reader and the card after a successful authenticate. This key is temporary and becomes invalid after the session terminates (the card is removed or a new authenticate takes place).
I do not understand what you means with “Authentication App MasterKey to generate the sessionKey_1”. How do you “generate” keys?
If you provide different keys for the access permissions of your files, then this are “application keys” for me and this keys never have a temporary character. Okay, you should follow the rule: if you change application keys, you must have selected always the application before. Before you can change for instance key #2, you have to authenticate with old key #2 to prove you are allowed to change the key (this prevents the unauthorized write-over of keys). Then you can change the key #2 with the new value. If you want to change the master key, you have to select AID = 0 before, authenticate with the old key and change the key.
The MIFARE Team
+ 1 | - 1
Hi,
It's right, I calculate session key with command authentication between card and reader.
For me "App MasterKey" is Master Key of the Application with AID = 0x00.
When I want change value with key I authenticate with old key (calculate at the end of this command the sessionKey) and send the command change key.
This command return me AE.
Regards
+ 0 | - 1
Hi,
I created a application with KeySetting1= 0xEF and KeySetting2 = 0x03.
I succeed to do authentication with key of default (all 0) then I do the authentication, after selected the Application, with new key and the PICC returns 0xAE.
Regards,
Fiore
+ 0 | - 1
WordPress › Error There has been a critical error on this website.