I am trying to send STORE_Data Command on my EMV card to store DGI values. here i got a document that describes the APDU command to install and personalize EMV application on JCOP 2.4.1 Revision 3.
here in the document ,Sequence of command is like-
SELECT
INITIALIZE UPDATE
EXTERNAL AUTHENTICATION
STORE DATA FOR DGI
...
...
STORE DATA FOR DGI.
Line written in this Document is - "the key value of issuer security domain(encryption, MAC,and key encryption key): 404142434445464748494a4b4c4d4e4f. and the value of sequence counter is 0.
I just downloaded GPSHELL 1.4.4 and try to run following script:-
mode_211
enable_trace
establish_context
card_connect
select -AID A000000003000000
open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f // Open secure channel
card_disconnect
release_context
and i got the ouput like:-
D:\users\Amitp\My Documents\Downloads\GPShell-1.4.4\GPShell-1.4.4>GPShell.exe he
lloInstalll.txt
mode_211
enable_trace
establish_context
card_connect
select -AID A000000003000000
Command --> 00A4040008A000000003000000
Wrapped command --> 00A4040008A000000003000000
Response <-- 6F658408A000000003000000A5599F6501FF9F6E06479100783300734A06072A864
886FC6B01600C060A2A864886FC6B02020101630906072A864886FC6B03640B06092A864886FC6B0
40215650B06092B8510864864020103660C060A2B060104012A026E01029000
open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4
f -enc_key 404142434445464748494a4b4c4d4e4f // Open secure channel
Command --> 80CA006600
Wrapped command --> 80CA006600
Response <-- 664C734A06072A864886FC6B01600C060A2A864886FC6B02020101630906072A864
886FC6B03640B06092A864886FC6B040215650B06092B8510864864020103660C060A2B060104012
A026E01029000
Command --> 8050000008FB3EE9FE0812ABFF00
Wrapped command --> 8050000008FB3EE9FE0812ABFF00
Response <-- 0000322000186396921901020000CEBCF3A2D47130C736B6480E4DD59000
mutual_authentication() returns 0x80302000 (The verification of the card cryptog
ram failed.)
why this authentication is failed here? To send store command i need to passed this check. any suggestion / idea help me to get out from this error.
thanks in advance..