Costa Rica eID card

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Costa Rica eID card

Carlos Vásquez
Hi,

I am trying to use my eID card from the Costa Rican goverment, but the
card is not recognized. It seams that there is no driver for this kind
of card. Can someone help me make one?

Some commands output:



[carlos-vasquez@thinkpad-x1 ~]$ opensc-tool --atr
Using reader with a card: Athena ASE IIIe [CCID Bulk Interface] 00 00
3b:dc:18:ff:80:91:fe:1f:c3:80:73:c8:21:13:66:01:0b:03:52:00:05:39



[carlos-vasquez@thinkpad-x1 ~]$ pcsc_scan
PC/SC device scanner
V 1.4.23 (c) 2001-2011, Ludovic Rousseau <[hidden email]>
Compiled with PC/SC lite version: 1.8.12
Using reader plug'n play mechanism
Scanning present readers...
0: Athena ASE IIIe [CCID Bulk Interface] 00 00

Wed Jan 28 22:39:36 2015
Reader 0: Athena ASE IIIe [CCID Bulk Interface] 00 00
  Card state: Card inserted,
  ATR: 3B DC 18 FF 80 91 FE 1F C3 80 73 C8 21 13 66 01 0B 03 52 00 05 39

ATR: 3B DC 18 FF 80 91 FE 1F C3 80 73 C8 21 13 66 01 0B 03 52 00 05 39
+ TS = 3B --> Direct Convention
+ T0 = DC, Y(1): 1101, K: 12 (historical bytes)
  TA(1) = 18 --> Fi=372, Di=12, 31 cycles/ETU
    129032 bits/s at 4 MHz, fMax for Fi = 5 MHz => 161290 bits/s
  TC(1) = FF --> Extra guard time: 255 (special value)
  TD(1) = 80 --> Y(i+1) = 1000, Protocol T = 0
-----
  TD(2) = 91 --> Y(i+1) = 1001, Protocol T = 1
-----
  TA(3) = FE --> IFSC: 254
  TD(3) = 1F --> Y(i+1) = 0001, Protocol T = 15 - Global interface
bytes following
-----
  TA(4) = C3 --> Clock stop: no preference - Class accepted by the
card: (3G) A 5V B 3V
+ Historical bytes: 80 73 C8 21 13 66 01 0B 03 52 00 05
  Category indicator byte: 80 (compact TLV data object)
    Tag: 7, len: 3 (card capabilities)
      Selection methods: C8
        - DF selection by full DF name
        - DF selection by partial DF name
        - Implicit DF selection
      Data coding byte: 21
        - Behaviour of write functions: proprietary
        - Value 'FF' for the first byte of BER-TLV tag fields: invalid
        - Data unit in quartets: 2
      Command chaining, length fields and logical channels: 13
        - Logical channel number assignment: by the card
        - Maximum number of logical channels: 4
    Tag: 6, len: 6 (pre-issuing data)
      Data: 01 0B 03 52 00 05
+ TCK = 39 (correct checksum)

Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B DC 18 FF 80 91 FE 1F C3 80 73 C8 21 13 66 01 0B 03 52 00 05 39
Digital Signature Costa Rica (eID)

(I had to download the smartcard_list.txt from
http://ludovic.rousseau.free.fr/softwares/pcsc-tools/smartcard_list.txt
to have it recognized.)

Thank you,
--
Carlos Vásquez

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: Costa Rica eID card

Douglas E Engert


On 1/28/2015 10:42 PM, Carlos Vásquez wrote:
> Hi,
>
> I am trying to use my eID card from the Costa Rican goverment, but the
> card is not recognized. It seams that there is no driver for this kind
> of card. Can someone help me make one?

Before modifying and code, try setting the card_atr in the opensc.conf
See the explanation in opensc.conf.
in the source src/libopensc/card.h, look for any SC_CARD_TYPE_ that say anything about eID
The comments will tell you the driver name, and if needed, the SC_CARD_TYPE_ can be used
for the opensc.conf type= if needed.
Looks like 7 different drivers support some form of EID cards.

>
> Some commands output:
>
>
>
> [carlos-vasquez@thinkpad-x1 ~]$ opensc-tool --atr
> Using reader with a card: Athena ASE IIIe [CCID Bulk Interface] 00 00
> 3b:dc:18:ff:80:91:fe:1f:c3:80:73:c8:21:13:66:01:0b:03:52:00:05:39
>
>
>
> [carlos-vasquez@thinkpad-x1 ~]$ pcsc_scan
> PC/SC device scanner
> V 1.4.23 (c) 2001-2011, Ludovic Rousseau <[hidden email]>
> Compiled with PC/SC lite version: 1.8.12
> Using reader plug'n play mechanism
> Scanning present readers...
> 0: Athena ASE IIIe [CCID Bulk Interface] 00 00
>
> Wed Jan 28 22:39:36 2015
> Reader 0: Athena ASE IIIe [CCID Bulk Interface] 00 00
>    Card state: Card inserted,
>    ATR: 3B DC 18 FF 80 91 FE 1F C3 80 73 C8 21 13 66 01 0B 03 52 00 05 39
>
> ATR: 3B DC 18 FF 80 91 FE 1F C3 80 73 C8 21 13 66 01 0B 03 52 00 05 39
> + TS = 3B --> Direct Convention
> + T0 = DC, Y(1): 1101, K: 12 (historical bytes)
>    TA(1) = 18 --> Fi=372, Di=12, 31 cycles/ETU
>      129032 bits/s at 4 MHz, fMax for Fi = 5 MHz => 161290 bits/s
>    TC(1) = FF --> Extra guard time: 255 (special value)
>    TD(1) = 80 --> Y(i+1) = 1000, Protocol T = 0
> -----
>    TD(2) = 91 --> Y(i+1) = 1001, Protocol T = 1
> -----
>    TA(3) = FE --> IFSC: 254
>    TD(3) = 1F --> Y(i+1) = 0001, Protocol T = 15 - Global interface
> bytes following
> -----
>    TA(4) = C3 --> Clock stop: no preference - Class accepted by the
> card: (3G) A 5V B 3V
> + Historical bytes: 80 73 C8 21 13 66 01 0B 03 52 00 05
>    Category indicator byte: 80 (compact TLV data object)
>      Tag: 7, len: 3 (card capabilities)
>        Selection methods: C8
>          - DF selection by full DF name
>          - DF selection by partial DF name
>          - Implicit DF selection
>        Data coding byte: 21
>          - Behaviour of write functions: proprietary
>          - Value 'FF' for the first byte of BER-TLV tag fields: invalid
>          - Data unit in quartets: 2
>        Command chaining, length fields and logical channels: 13
>          - Logical channel number assignment: by the card
>          - Maximum number of logical channels: 4
>      Tag: 6, len: 6 (pre-issuing data)
>        Data: 01 0B 03 52 00 05
> + TCK = 39 (correct checksum)
>
> Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
> 3B DC 18 FF 80 91 FE 1F C3 80 73 C8 21 13 66 01 0B 03 52 00 05 39
> Digital Signature Costa Rica (eID)
>
> (I had to download the smartcard_list.txt from
> http://ludovic.rousseau.free.fr/softwares/pcsc-tools/smartcard_list.txt
> to have it recognized.)
>
> Thank you,
> --
> Carlos Vásquez
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Opensc-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/opensc-devel
>

--

  Douglas E. Engert  <[hidden email]>


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: Costa Rica eID card

Martin Paljak-4
Hello,

On 29/01/15 15:44, Douglas E Engert wrote:
> Looks like 7 different drivers support some form of EID cards.

Looking for a matching driver based on "eID" is like looking for a car
engine replacement part by telling "4 wheels, gasoline" - probably
relevant and similar but doesn't fit :)

What would help is having some identification for the card:
 - specification?
 - or referenced standard (other than 7816)
 - vendor ?

If that is not published, Windows driver for card will probably give
hints. If nothing on that front either, the same driver in an emulator
with usbmon will give precise APDU traces, that will probably help in
one way or atnother.

Martin



------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: Costa Rica eID card

Carlos Vásquez
It is an Athena card. Surprisingly the guys at the support center of the Technology Ministry sent me a new driver (.so) today and now it works fine. I will try to make some time to make it work with OpenSC.

Thanks,

--
Carlos Vásquez
CTO · Director de Ingeniería
CLEARCORP S.A.

[hidden email]
Cel: +(506) 8351 4484
CR: +(506) 4000 CORP (4000 2677)
US: +1 (786) 472-4267
skype: crvasquez
twitter: cvclearcorp

300 m. Este de la Escuela
Calle de Platanares
11402 San Jerónimo, Moravia
San José, Costa Rica

On 29 January 2015 at 12:08, Martin Paljak <[hidden email]> wrote:
Hello,

On 29/01/15 15:44, Douglas E Engert wrote:
> Looks like 7 different drivers support some form of EID cards.

Looking for a matching driver based on "eID" is like looking for a car
engine replacement part by telling "4 wheels, gasoline" - probably
relevant and similar but doesn't fit :)

What would help is having some identification for the card:
 - specification?
 - or referenced standard (other than 7816)
 - vendor ?

If that is not published, Windows driver for card will probably give
hints. If nothing on that front either, the same driver in an emulator
with usbmon will give precise APDU traces, that will probably help in
one way or atnother.

Martin



------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: Costa Rica eID card

Martin Paljak-4
On Fri, Jan 30, 2015 at 5:20 PM, Carlos Vásquez
<[hidden email]> wrote:
> It is an Athena card. Surprisingly the guys at the support center of the
> Technology Ministry sent me a new driver (.so) today and now it works fine.
> I will try to make some time to make it work with OpenSC.


If this an Athena card, do you know if it is the athena native card
(which has some support in OpenSC) or the newer LAZER PKI applet or
something entirely different? Maybe the driver has some insight.

m.
--
Martin
+372 515 6495

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel