Page 1 of 1
Gemalto visa2
Posted: Mon Nov 16, 2015 12:52 pm
by crash
Hi,
i have a Gemaldo Java Card and want
to install an Applet on it but can´t fix it.
I have the GP-Key: 47454D5850524553534F53414D504C45
I tried with GlobalPlatform:
Code: Select all
gp.exe --visa2 -key 47454D5850524553534F53414D504C45
But always get an error.
what am I doing wrong?
Re: Gemalto visa2
Posted: Mon Nov 16, 2015 10:04 pm
by UNKNwYSHSA
What is the error? Error of gp.exe or APDU with error SW? Please tell us more details.
Re: Gemalto visa2
Posted: Tue Nov 17, 2015 5:57 am
by crash
thanks for reply,
With this gp-command:
Code: Select all
gp.exe --visa2 --key 47454D5850524553534F53414D504C45 --unlock --mode clr
i got this error:
Code: Select all
openkms.gp.GPException: Invalid INITIALIZE UPDATE response length: 0
at openkms.gp.GlobalPlatform.openSecureChannel(GlobalPlatform.java:356)
at openkms.gp.GPTool.main(GPTool.java:348)
Re: Gemalto visa2
Posted: Tue Nov 17, 2015 7:29 am
by UNKNwYSHSA
From the error trace, the response of command INITIALIZE UPDATE is empty.
Add "-debug" or "-d" to gp.exe command, view the APDU COMMAND and RESPONSE data first.
Re: Gemalto visa2
Posted: Tue Nov 17, 2015 9:42 am
by crash
At least i tried GPShell and it works
with this script:
Code: Select all
mode_201
enable_trace
enable_timer
establish_context
card_connect
select -AID A000000018434D00
open_sc -security 3 -keyind 0 -keyver 0 -key 47454d5850524553534f53414d504c45 -keyDerivation visa2 // Open secure channel
install -file myPackage.cap -sdAID A000000018434D00 -nvCodeLimit 4000
card_disconnect
release_context
BUT what i miss is the response from my applet
(it´s a "hello world" applet which send´s hello world in hex)
i start it and send an APDU with this script:
Code: Select all
mode_201
enable_trace
enable_timer
establish_context
card_connect
open_sc -security 3 -keyind 0 -keyver 0 -key 47454d5850524553534f53414d504c45 -keyDerivation visa2 // Open secure channel
select -AID 112233445500
send_apdu -APDU 0000040006112233445500
card_disconnect
release_context
the output is:
Code: Select all
mode_201
enable_trace
enable_timer
establish_context
command time: 16 ms
card_connect
command time: 0 ms
open_sc -security 3 -keyind 0 -keyver 0 -key 47454d5850524553534f53414d504c45 -keyDerivation visa2 // Open secure channel
Command --> 8050000008B1D3D4778B3C7A6600
Wrapped command --> 8050000008B1D3D4778B3C7A6600
Response <-- 4D000012C0072004201FFF012DEAD1DCDD65EA04CF317568F6781A329000
Command --> 84820300106D37665DA2F0753A63F90CBD4FA5D13D
Wrapped command --> 84820300106D37665DA2F0753A63F90CBD4FA5D13D
Response <-- 9000
command time: 218 ms
select -AID 112233445500
Command --> 00A4040006112233445500
Wrapped command --> 00A4040006112233445500
Response <-- 9000
command time: 16 ms
send_apdu -APDU 0000040006112233445500
Command --> 0000040006112233445500
Wrapped command --> 0000040006112233445500
Response <-- 9000
send_APDU() returns 0x80209000 (9000: Success. No error.)
command time: 0 ms
card_disconnect
command time: 78 ms
release_context
command time: 0 ms
Someone know how to display my "hello world"?
Re: Gemalto visa2
Posted: Tue Nov 17, 2015 9:54 am
by UNKNwYSHSA
Maybe you are too hurry and read too litle document.

Re: Gemalto visa2
Posted: Tue May 22, 2018 6:19 am
by alphabeta
why not to try the demo key 4142434445464748494a4b4c4d4e4f