Search code examples
smartcardjavacardglobalplatform

How to change javacard default keys?


I have a javacard and it's S_ENC, S_MAC and DEK keys are 404142434445464748494A4B4C4D4E4F. the question is how I can change these key via gpj , gpshell or jcmanager?


Solution

  • With gpshell, you can use the put_sc_key command:

    put_sc_key -keyver <current key version> -newkeyver <new key version> -mac_key <mac key> -enc_key <enc key> -kek_key <kek key> [-current_kek <kek key>]
    

    I don't think that changing keys is possible with GPJ. The GUI of jcManager has nice self-explanatory text-fields and buttons that should be fairly easy to understand (i.e. "New keys:", "Add/modify keys").