Re: Typical smartcard response times

Peter Popovec <[email protected]> Mon, 10 Feb 2020 09:10:38 +0100
Newsgroups gmane.comp.encryption.opensc.devel
Message-ID <CAMZViR9M0N9k1oFab71memxb_Rd4z63SAyQvNzZhUsrufWQwzg@mail.gmail.com>
Hi


There is a way to determine exact timing of all operations .. (linux):

1. using OPENSC_DEBUG=255 -> exact timing of APDUs
2. using tcpdump to sniff USB traffic from/to reader (modprobe usbmon,
tcpdump -i usbmon1 ....  )
3. Oscilloscope on reader pins ..

questions:
- how many APDUs are exchanged between card/reader (fo*r pkcs11-tool -O...*
) ?
- average time for one APDU?
- is there some of APDUs who wants to prolong the working time ?
- algorithm in pkcs#11 library - is it efficient enough? i.e.  pkcs11
requests lot of operations / data transfers from card, even so result of
these operations is not really needed.

And another reason that can lead to slowdown of card operations ..  is the
card accessed from exact one application ? (for example chrome/firefox may
poll the card ... this can lead to deselect card or even  card reset that
lead to new PPS exchange etc..)

Peter




On Mon, Feb 10, 2020 at 8:30 AM Marian Ďurkovič <[email protected]> wrote:

> *Hello,*
>
> *thanks for the results, if I run "time pkcs11-tool -login -p ..... -O"
> with Slovak eID on MAC, I get:*
>
>
>
>
>
>
>
>
>
>
>
>
>
> *Using slot 0 with a present token (0x1) Private Key Object; RSA
> label:      Podpisovy kluc   ID:         11   Usage:      sign
> Access:     always authenticate, sensitive, always sensitive, never
> extractable, local   Allowed mechanisms: RSA-PKCS Certificate Object; type
> = X.509 cert   label:      Certifikat k podpisovemu klucu   subject:
> .....   ID:         11 *
>
>
>
> *real    0m25.794s  (!) user    0m0.128s sys    0m0.059s*
>
>

_______________________________________________
Opensc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensc-devel