Page 1 of 1

SCP of my smart card

Posted: Sat Apr 16, 2016 3:58 am
by Jsine
How can I know which Secure channel protocol my smart card is using, 01,02 or 03?
Thanks~

Re: SCP of my smart card

Posted: Sat Apr 16, 2016 4:21 am
by wkuzma
Jsine wrote:How can I know which Secure channel protocol my smart card is using, 01,02 or 03?
Thanks~


1. Select card Manager
2. Send the following APDU command
>> 80 CA 00 66

Re: SCP of my smart card

Posted: Sat Apr 16, 2016 4:57 am
by Jsine
Thanks for your answer,My friend!
But how can I select Card manager ? Or shall I know the AID firstly?

Re: SCP of my smart card

Posted: Sat Apr 16, 2016 5:09 am
by wkuzma
@Jsine

Send SELECT command W/O AID to select card manager
That is
00 A4 04 00 00

Re: SCP of my smart card

Posted: Wed Nov 16, 2016 11:48 pm
by tieuhaoluong
I have sent APDU and receive:
<<80 CA 00 66
>>66 4C 73 4A 06 07 2A 86 48 86 FC 6B 01 60 0C 06 0A 2A 86 48 86 FC 6B 02 02 01 01 63 09 06 07 2A 86 48 86 FC 6B 03 64 0B 06 09 2A 86 48 86 FC 6B 04 02 55 65 0B 06 09 2B 85 10 86 48 64 02 01 03 66 0C 06 0A 2B 06 01 04 01 2A 02 6E 01 02 90 00

What does it mean?
Thanks!

Re: SCP of my smart card

Posted: Thu Nov 17, 2016 5:22 am
by UNKNwYSHSA
I usually read the response data of command INITIALIZE UPDATE, for example:

Code: Select all

<<80 50 00 00 08 8A 34 E5 AF 41 76 DA 3E 1C
>>00 00 00 00 00 00 00 00 00 00 FF 02 00 03 B5 00 CF 85 24 1E C3 86 54 3B 8C 6C 43 EC 90 00

SCP is 0x02
response is struct as following:
SCP01: Key diversification data (10 bytes) + Key information (2 bytes, KVN + SCP identifier) + ...
SCP02: Key diversification data (10 bytes) + Key information (2 bytes, KVN + SCP identifier) + ...
SCP03: Key diversification data (10 bytes) + Key information (3 bytes, KVN + SCP identifier + SCPi) + ...

Re: SCP of my smart card

Posted: Thu Nov 17, 2016 5:35 am
by UNKNwYSHSA
tieuhaoluong wrote:I have sent APDU and receive:
<<80 CA 00 66
>>66 4C 73 4A 06 07 2A 86 48 86 FC 6B 01 60 0C 06 0A 2A 86 48 86 FC 6B 02 02 01 01 63 09 06 07 2A 86 48 86 FC 6B 03 64 0B 06 09 2A 86 48 86 FC 6B 04 02 55 65 0B 06 09 2B 85 10 86 48 64 02 01 03 66 0C 06 0A 2B 06 01 04 01 2A 02 6E 01 02 90 00

What does it mean?
Thanks!

Code: Select all

66 4C
    73 4A
        06 07
            2A 86 48 86 FC 6B 01
        60 0C
            06 0A
                2A 86 48 86 FC 6B 02 02 01 01
        63 09
            06 07
                2A 86 48 86 FC 6B 03
         64 0B
            06 09
                2A 86 48 86 FC 6B 04 02 55
         65 0B
            06 09
                2B 85 10 86 48 64 02 01 03
         66 0C
            06 0A
                2B 06 01 04 01 2A 02 6E 01 02

'64' '06' contains SCP info: SCP02, i=55.
Refer to GlobalPlatform Card Specification 2.x.x - "Structure of Card Recognition Data"

Re: SCP of my smart card

Posted: Fri Nov 18, 2016 5:33 am
by tieuhaoluong
UNKNwYSHSA wrote:
tieuhaoluong wrote:I have sent APDU and receive:
<<80 CA 00 66
>>66 4C 73 4A 06 07 2A 86 48 86 FC 6B 01 60 0C 06 0A 2A 86 48 86 FC 6B 02 02 01 01 63 09 06 07 2A 86 48 86 FC 6B 03 64 0B 06 09 2A 86 48 86 FC 6B 04 02 55 65 0B 06 09 2B 85 10 86 48 64 02 01 03 66 0C 06 0A 2B 06 01 04 01 2A 02 6E 01 02 90 00

What does it mean?
Thanks!

Code: Select all

66 4C
    73 4A
        06 07
            2A 86 48 86 FC 6B 01
        60 0C
            06 0A
                2A 86 48 86 FC 6B 02 02 01 01
        63 09
            06 07
                2A 86 48 86 FC 6B 03
         64 0B
            06 09
                2A 86 48 86 FC 6B 04 02 55
         65 0B
            06 09
                2B 85 10 86 48 64 02 01 03
         66 0C
            06 0A
                2B 06 01 04 01 2A 02 6E 01 02

'64' '06' contains SCP info: SCP02, i=55.
Refer to GlobalPlatform Card Specification 2.x.x - "Structure of Card Recognition Data"

Oh, thank you very much! :D

Re: SCP of my smart card

Posted: Fri Nov 18, 2016 11:48 pm
by UNKNwYSHSA
:D

SCP of my smart card

Posted: Mon Nov 19, 2018 4:56 pm
by TripTar
I have a cheap smart card reader for Windows but it needs some drivers to be used by applications.
Maybe inside there is an STM32?