OpenCT API questions

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

OpenCT API questions

Laurent Pinchart
Hi everybody,

I'm trying to implement an OpenCT driver for the ACS ACR30U smart card reader.

The reader is basically a serial driver which has been wrapped in an USB
enclosure, so I ran into the common serial reader issues (proprietary
protocol but documented, byte stream synchronisation issues, ...).

With the help of the reader/protocol documentation and the PC/SC Lite driver
(available as source code from ACS), I've been able to get most things
working. I need answers to a few questions regarding the OpenCT API to finish
the driver. As I haven't been able to find any doc about the API, I'm asking
all of you for some help.

When using the T=0 protocol, who is responsible for sending the GET_RESPONSE
command for CASE 4 APDUs ? src/ifd/proto-t0.c seems to handle that, but there
also seems to be some support in opensc (src/libopensc/iso7816.c).

What's the minimum APDU size that should be supported for requests/responses ?
Must the driver support Lc<=255 and Le<=256 or could a smaller value be
acceptable ? The reason I'm asking is that the reader has two
commands/responses formats for 8-bit and 16-bit lengths, and I would rather
keep it simple and implement only the 8-bit format.

Can I assume that no extended APDUs (Lc>255 or Le>256) will be submitted, or
must the driver check the APDUs before sending them to the reader ? Once
again, this has to do with 8-bit/16-bit commands.

Once I'm done with the driver, should I post a patch to this list ?

Thanks in advance for all the help you can provide.

Laurent Pinchart
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: OpenCT API questions [u]

Andreas Jellinghaus-2
Hi Laurent,

I only wrote usb drivers which all speak t=1, so I don't know T=0
well, nor the openct implementation. Olaf wrote it, but retired
from openct/sc.

> I'm trying to implement an OpenCT driver for the ACS ACR30U smart card
reader.

great!

> When using the T=0 protocol, who is responsible for sending the GET_RESPONSE
> command for CASE 4 APDUs ? src/ifd/proto-t0.c seems to handle that, but
> there also seems to be some support in opensc (src/libopensc/iso7816.c).

As said, I'm not an expert on this. But I guess handling that in the driver
is better? What do you think?

> What's the minimum APDU size that should be supported for
> requests/responses ? Must the driver support Lc<=255 and Le<=256
> or could a smaller value be acceptable?
> The reason I'm asking is that the reader has two  
> commands/responses formats for 8-bit and 16-bit lengths, and I would rather
> keep it simple and implement only the 8-bit format.

Try if it works. The usb drivers I know only work with up to 253 bytes or
so maximum or even less, and we haven't seen problems in the real world.

> Can I assume that no extended APDUs (Lc>255 or Le>256) will be submitted, or
> must the driver check the APDUs before sending them to the reader ? Once
> again, this has to do with 8-bit/16-bit commands.

I know that someone had plans to experiment with extentded APDU, but
so far we don't have them and existing drivers would most likely not
work with them either.

> Once I'm done with the driver, should I post a patch to this list ?

Yes, that is the best way.

> Thanks in advance for all the help you can provide.

well I can't help much, but thanks for writing a driver!

Regards, Andreas
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel