JavaCard Applet Development Related Questions and Answers.
-
Wardor
- Posts: 18
- Joined: Tue Nov 10, 2015 4:51 am
- Points :114
-
Contact:
Post
by Wardor » Fri Nov 04, 2016 1:30 am
I want to change my card keys by PUT KEY command.But the card returned error sw=0x6982.
Here is the details.Could somebody tell me the problem.
Code: Select all
Initial Key: 404142434445464748494A4B4C4D4E4F
New Key: 101112131415161718191A1B1C1D1E1F
IV: 0000000000000000
ENCSessionKey - 3DES_CBC("0182" + "0000" + "000000000000000000000000") with inital Key
macSessionKey - 3DES_CBC("0101" + "0000" + "000000000000000000000000") with inital Key
IV: 0000000000000000
encrypted Key - 3DES_CBC(new key) with ENCSessionKey
KeyCheckValue - 3DES_CBC("0000000000000000") with new key
PutKey APDU = "80D8008143 + 01 + 8010 + 730CD82CAC6724E7CF9CA4E822934B7F + 03 + 3E1CFE + 8010 + 730CD82CAC6724E7CF9CA4E822934B7F + 03 + 3E1CFE + 8010 + 730CD82CAC6724E7CF9CA4E822934B7F + 03 + 3E1CFE"
Response from card : 6982
-
wumindejia
- Posts: 55
- Joined: Thu Sep 22, 2016 5:05 am
- Points :784
-
Contact:
Post
by wumindejia » Fri Nov 04, 2016 1:38 am
before put key you need to do authenticaion of GP'S Channel.
-
Wardor
- Posts: 18
- Joined: Tue Nov 10, 2015 4:51 am
- Points :114
-
Contact:
Post
by Wardor » Fri Nov 04, 2016 4:05 am
wumindejia wrote:before put key you need to do authenticaion of GP'S Channel.
I have established secure channel before PUT KEY command.

-
wumindejia
- Posts: 55
- Joined: Thu Sep 22, 2016 5:05 am
- Points :784
-
Contact:
Post
by wumindejia » Fri Nov 04, 2016 11:19 pm
Status ‘69 82’ is "Invalid key check value",so New Key: 101112131415161718191A1B1C1D1E1F, data = 0000000000000000, KeyCheckValue = FE 8A 09, algorithm is DES. and encrypted Key - 3DES_ECB(new key) with ENCSessionKey . so PutKey APDU = "80D8008143 + 01 + 8010 + encrypted + 03 + KeyCheckValue + 8010 + encrypted + 03 + KeyCheckValue + 8010 + encrypted + 03 + KeyCheckValue ".
-
Wardor
- Posts: 18
- Joined: Tue Nov 10, 2015 4:51 am
- Points :114
-
Contact:
Post
by Wardor » Sat Nov 05, 2016 4:35 am
Hi. It's it. I solved this issue. Thank you very much for your help.

Users browsing this forum: No registered users and 25 guests
JavaCard OS : Disclaimer
Board Disclaimer
The views and comments posted in these fora are personal and do not necessarily represent the those of the Management of JavaCard OS.
The Management of JavaCard OS does not, under any circumstances whatsoever, accept any responsibility for any advice, or recommentations, made by, or implied by, any member or guest vistor of JavaCard OS that results in any loss whatsoever in any manner to a member of JavaCard OS, or to any other person.
Furthermore, the Management of JavaCard OS is not, and cannot be, responsible for the content of any other Internet site(s) that have been linked to from JavaCard OS.