Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCM SCL3711 reader seems to be incapable of handling long messages #106

Closed
StarGate01 opened this issue Jul 11, 2021 · 4 comments
Closed

Comments

@StarGate01
Copy link

The SCM SCL3711 USB NFC reader is generally supported well by this software (although it is not listed as compatible), its manufacturer Identiv offers a proprietary driver for integration with pcsc-lite.

When testing this device with a Yubikey 5 NFC and also a Fidesmo card 2.0 - using their respective OTP feature - in combination with the Yubikey Authentication app, I noticed a problem. Although everything works in principle (the Yubikey is recognized and able to function via NFC, and so is the card), there appears to be a limit to the OTP entries that can be read / transmitted. This limit does not exist when using the very same hardware on Android or Windows (even the same reader there).

My suspicions of the SCL3711 not playing nicely with "long messages" (or some other feature I don't know about) is further confirmed by the incapability of gpg --card-edit to access the PGP functionality of the Yubikey.

I then tested another reader, a SCL011 (again, with a proprietary driver by Identiv), which is marked as "should work" at https://ccid.apdu.fr/ccid/section.html. And it does indeed work, being able to read all the OTP entries off my Yubikey as well as enabling gpg to interface the PGP applet.

For more information and detailed logs, see my (obsolete) issue on the Yubikey Authentificator repo: Yubico/yubioath-flutter#727

Do you think this limitation stems from the hardware itself and its driver or could this be fixed in pcsc-lite? Thanks for any help.

@LudovicRousseau
Copy link
Owner

Please follow https://pcsclite.apdu.fr/#support

@StarGate01
Copy link
Author

Oh sorry, here is the missing information.

Versions:

pcsc-lite version 1.9.1.
Copyright (C) 1999-2002 by David Corcoran <[email protected]>.
Copyright (C) 2001-2018 by Ludovic Rousseau <[email protected]>.
Copyright (C) 2003-2004 by Damien Sauveron <[email protected]>.
Report bugs to <[email protected]>.
Enabled features: Linux x86_64-pc-linux-gnu libsystemd serial usb libudev usbdropdir=/usr/lib/pcsc/drivers ipcdir=/run/pcscd filter configdir=/etc/reader.conf.d

Platform:

  • Operating system: Linux 5.4.124-1-MANJARO
  • Smart card middleware name and version: Yubikey 5 NFC firmware, Fidesmo OTP cardlet, Fidesmo PGP cardlet
  • Smart card reader manufacturer name and reader model name: SCM / Identiv SCL3711
  • Smart card name: Yubikey 5 NFC, Fidesmo card 2.0

Log:

For me personally this issue is now of low priority because I found a different, working reader. So proceed as you like.

@LudovicRousseau
Copy link
Owner

In the log log_yubikey_pgp_notworking.txt I do not find any error at the PCSC level. Maybe it is a problem with PGP.

In log_yubikey_notworking.txt you have:

00000005 [140154871965248] winscard.c:1595:SCardTransmit() Send Protocol: T=1
00000008 [140154871965248] APDU: 00 A4 04 00 07 A0 00 00 05 27 21 01 
00000022 [140154871965248] SW: 
00000005 [140154871965248] ifdwrapper.c:543:IFDTransmit() Card not transacted: 612
00000004 [140154871965248] winscard.c:1620:SCardTransmit() Card not transacted: 0x80100016

An exchange fails and I have no idea why.
I don't think i can do anything at the PCSC level.

You should report the problem to SCM since you are using the SCM driver.

@StarGate01
Copy link
Author

Alright, thank you for your investigation! I'll see if I manage to contact the driver manufacturer.
As this does not appear to be a problem with pcsc-lite, I'll close this issue.

mskalski pushed a commit to mskalski/PCSC that referenced this issue Oct 25, 2021
If the USB reader reports an interface name that is not ASCII (or a
valid UTF-8) string then bad things can happen.

For example the Gemalto IDBridge K3000 token has a strange byte in the
iInterface name.
 iInterface: IDBridge K3000 ?5300029B

And PySCard complains with:
> ./pySim-read.py -p 0
Using PC/SC reader interface
Traceback (most recent call last):
  File "/tmp/pysim/./pySim-read.py", line 90, in <module>
    sl.wait_for_card()
  File "/tmp/pysim/pySim/transport/pcsc.py", line 49, in wait_for_card
    cr.waitforcard()
  File "/usr/lib/python3.9/site-packages/smartcard/CardRequest.py", line 69, in waitforcard
    return self.pcsccardrequest.waitforcard()
  File "/usr/lib/python3.9/site-packages/smartcard/pcsc/PCSCCardRequest.py", line 137, in waitforcard
    hresult, newstates = SCardGetStatusChange(
  File "/usr/lib/python3.9/site-packages/smartcard/scard/scard.py", line 614, in SCardGetStatusChange
    return _scard.SCardGetStatusChange(hcontext, dwTimeout, readerstatelist)
UnicodeEncodeError: 'ascii' codec can't encode character '\uff20' in position 39: ordinal not in range(128)

Non ASCII characters are now replaced with '.'.

Thanks to Nikolaos Kakouros for the bug report
LudovicRousseau/pyscard#106
"Errors when running pysim with Gemalto IDBridge K3000 LudovicRousseau#106"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants