2
我有一個Java卡接收到6985,這是輸出時,我想通過GPJ和JC-經理驗證卡:Java卡身份驗證與JC-經理,但在GPJ認證
GPJ工具輸出:
C:\Users\ghasemi\Desktop\gpj-20120310>java -jar gpj.jar
Found terminals: [PC/SC terminal ACS CCID USB Reader 0]
Found card in terminal: ACS CCID USB Reader 0
ATR: 3B 68 00 00 00 73 C8 40 12 00 90 00
DEBUG: Command APDU: 00 A4 04 00 08 A0 00 00 00 03 00 00 00
DEBUG: Response APDU: 6F 10 84 08 A0 00 00 00 03 00 00 00 A5 04 9F 65 01 FF 90 00
Successfully selected Security Domain OP201a A0 00 00 00 03 00 00 00
DEBUG: Command APDU: 80 50 00 00 08 C8 12 42 39 22 8D 5E 24
DEBUG: Response APDU: 00 00 11 60 01 00 7F 8B 0A F9 02 02 02 24 AB 7A 47 C8 17 DD 03 75 44 3F 76 8E 12 BE 90 00
DEBUG: Command APDU: 84 82 00 00 10 B6 09 4F FF C0 0D D2 CC B0 CE B1 3E 20 57 30 D4
DEBUG: Response APDU: 69 85
DEBUG: Command APDU: 84 82 00 00 08 B6 09 4F FF C0 0D D2 CC
DEBUG: Response APDU: 69 85
javax.smartcardio.CardException: External authenticate failed. SW: 69 85
at net.sourceforge.gpj.cardservices.GlobalPlatformService.openSecureChannel(Unknown Source)
at net.sourceforge.gpj.cardservices.GlobalPlatformService.main(Unknown Source)
JC-經理輸出:
注:鍵設置爲404142434445464748494A4B4C4D4E4F
Selecting Card Manager
***********************
-> 00 A4 04 00 08 A0 00 00 00 03 00 00 00
<- 6F 10 84 08 A0 00 00 00 03 00 00 00 A5 04 9F 65 01 FF 90 00
************
Init Update
*************
-> 80 50 00 00 08 B6 42 6E BB DC 0E DF E8
<- 00 00 11 60 01 00 7F 8B 0A F9 02 02 02 23 7E 5D E1 67 E0 0A 3D 67 91 7E B8 D6 14 59 90 00
HostChallenge: B6 42 6E BB DC 0E DF E8
CardChallenge: 7E 5D E1 67 E0 0A
Card Calculated Card Cryptogram: 3D 67 91 7E B8 D6 14 59
Derivation Data is 01 82 02 23 00 00 00 00 00 00 00 00 00 00 00 00
Host Cryptogram Data (to encrypt) 02 23 7E 5D E1 67 E0 0A B6 42 6E BB DC 0E DF E8 80 00 00 00 00 00 00 00
Card Cryptogram Data (to encrypt for verification) B6 42 6E BB DC 0E DF E8 02 23 7E 5D E1 67 E0 0A 80 00 00 00 00 00 00 00
S_ENC: 9F 46 0D 11 18 88 F2 E2 1C D2 4A F5 00 D0 51 7D 9F 46 0D 11 18 88 F2 E2
The Current session MAC key is 99 96 8E ED 46 99 59 DE 20 B1 F8 36 0E 0C 7F DE
The Current session DEK key is 98 4D 50 CA 56 5A F3 4E 84 0E CF 12 3B E0 1D C3
Encrypted CardCryptoGram is 8E 07 30 FB E7 13 23 F4 CD D9 13 12 29 F3 7C 16 3D 67 91 7E B8 D6 14 59
Encrypted HostCryptoGram is 41 34 E9 1E C7 41 0D 62 EC D3 E1 2A 6A D1 7D 13 A9 CD 65 16 AE 5B 99 59
-> 84 82 03 00 10 A9 CD 65 16 AE 5B 99 59 1D 88 41 EF 90 09 03 32
<- 90 00
Authenticated
正如你看到的,同一張卡,具有輸出通過兩種外部驗證 .successfully與JC-經理驗證,但收到使用6985
[條件不滿意] GPJ。 爲什麼?
EXTERNAL AUTH請求取決於在INIT UPDATE命令中收到的卡挑戰,這就是爲什麼你看到不同的EXT AUTH請求。你確定你使用正確的密鑰與gpj? –
@MohammadBanisaeid:我的問題是狀態字的區別!不是APDU命令的數據字段的區別:)而且,是的,我確定。 ** GPJ **工具默認使用'404142 ... 4F'作爲鍵。 – TheGoodUser
在建立安全通道的過程中,6985狀態字通常意味着密鑰錯誤。 –