Discussion:
Musclecard
wully
2014-03-07 16:01:12 UTC
Permalink
Hi all

After the help of Dr. Cucinotta (thank you very much) and some
fprintf-statements in the musclecard-1.3.6, I have been able to run
muscletest. So, I can start investigating the pkcs#11-capabilities.
Please note the ATR, which has changed from the original of Cyberflex
eGate 32k!

I don't yet know, why the standard pin "00000000", which I loaded after
loading the card applet
does not verify in this environment.
$ opensc-tool -s b0:42:00:00:08:30:30:30:30:30:30:30:30
Using reader with a card: REINER SCT cyberJack pp_a2 (3865505373) 00 00
Sending: B0 42 00 00 08 30 30 30 30 30 30 30 30
Received (SW1=0x90, SW2=0x00)
does confirm the pin.

Any explanation is welcome, thank you in advance!


I feel very pleased, that the most important unkowns have been removed:
the definitions in the services-folder.

regards
wully

Below is the result of runing muscletest:

********************************************************

Token #0
Token name : MuscleCard Applet
Slot name : REINER SCT cyberJack pp_a2 (3865505373) 00 00
Token id : 3B779400006202010000FF07
Token state : 0022
Token type : 0004 token known

********************************************************
Token #0
Token name : MuscleCard Applet
Slot name : REINER SCT cyberJack pp_a2 (3865505373) 00 00
Token id : 3B779400006202010000FF07
Token state : 0022
Token type : 0004 token known

Versuch dlopen:
/usr/local/pcsc/services/mscMuscleCard.bundle/Contents/Linux/mscMuscleCard
BeginTransaction returns : Successful
GetStatus returns : Successful
Protocol version : 0001
Applet version : 0007
Total object memory : 00006000
Free object memory : 00004577
Number of used PINs : 02
Number of used Keys : 02
Currently logged identities : 0000
Please enter the PIN value: 00000000
Verify default PIN : Unknown SW: 6F00
Currently logged identities : 0000
CreateObject returns : Unknown SW: 6F00
WriteObject returns : Unknown SW: 6F00
ReadObject returns : Unknown SW: 6F00

Listing objects : Unknown SW: 6F00
------------------------------------------------------
Object ID Object Size READ WRITE DELETE
----------------- ----------- ---- ----- ------
------------------------------------------------------

Free object memory : 00004577
DeleteObject returns : Unknown SW: 6F00
Free object memory : 00004577
GetChallenge returns : Unknown SW: 6F00
Random data : 00 00 00 00 00 00 00 00
Logout all identities : Unknown SW: 6F00
Currently logged identities : 0000
EndTransaction returns : Successful
ReleaseConn returns : Successful
wully
2014-03-07 17:58:59 UTC
Permalink
Hi all

I have made further experiments: It seems, that there is a timing
problem. When I run muscletest up to the question of the pin, and then
abort the program, and restart it and run it through, then everything
works fine:

********************************************************

Token #0
Token name : MuscleCard Applet
Slot name : REINER SCT cyberJack pp_a2 (3865505373) 00 00
Token id : 3B779400006202010000FF07
Token state : 0022
Token type : 0004 token known

********************************************************
Token #0
Token name : MuscleCard Applet
Slot name : REINER SCT cyberJack pp_a2 (3865505373) 00 00
Token id : 3B779400006202010000FF07
Token state : 0022
Token type : 0004 token known

Versuch dlopen:
/usr/local/pcsc/services/mscMuscleCard.bundle/Contents/Linux/mscMuscleCard
BeginTransaction returns : Successful
GetStatus returns : Successful
Protocol version : 0001
Applet version : 0007
Total object memory : 00006000
Free object memory : 00005005
Number of used PINs : 02
Number of used Keys : 00
Currently logged identities : 0000
Please enter the PIN value: 00000000
Verify default PIN : Successful
Currently logged identities : 0001
CreateObject returns : Successful
WriteObject returns : Successful
ReadObject returns : Successful
Object data : MUSCLE VIRTUAL CARD.
Data comparison : Successful

Listing objects : Successful
------------------------------------------------------
Object ID Object Size READ WRITE DELETE
----------------- ----------- ---- ----- ------
c1 50 0000 0000 0000
PIF 128 0000 0000 0000
PP2 128 0000 0000 0000
? 128 0000 0000 0000
PP1 256 0000 0000 0000
PD 256 0000 0002 0002
P 1 0002 0002 0002
------------------------------------------------------

Free object memory : 00004939
DeleteObject returns : Successful
Free object memory : 00005005
GetChallenge returns : Successful
Random data : DB 3E 9E 80 DA 2D 6D 5E
Logout all identities : Successful
Currently logged identities : 0000
EndTransaction returns : Successful
ReleaseConn returns : Successful


What is known about such timing problems?

regards
wully
Tommaso Cucinotta
2014-03-07 19:01:27 UTC
Permalink
I have been able to run muscletest.
Great! Welcome to MuscleCard :-)!
I don't yet know, why the standard pin "00000000", which I loaded after loading the card applet
does not verify in this environment.
I can only remember that, when loading the Applet on the card, you need to provide a special
initialization vector containing the initial PIN. Or, if memory serves, there was once a special
INIT APDU command that had to be issued right after instantiation of the Applet for the same
purpose, but perhaps it was later replaced by the initialization vector straight into the
loading process. So I don't know whether opensc-tools performs any of these further actions
when it instantiates the applet.

T.

Loading...