acsccid is a PC/SC driver for Linux/Mac OS X and it supports ACS CCID smart card readers. This library provides a PC/SC IFD handler implementation and communicates with the readers through the PC/SC Lite resource manager (pcscd).
I'm using ACR122U (ACR122U214) on Linux with master code from this repo. I'm trying to understand the behavior of the load keys command. The reason I'm trying this is because the API says that the keys are loaded into the reader, so I tried avoiding loading the keys every time a PICC is presented hence the use of the SCardControl().
Should I be able to perform 'Load Authentication Keys' command without PICC being present?
I have a code that tries to load the keys using this SCardControl():
If I try SCardControl() after the reader is detected and connected (no PICC presented) it does not work, I get 0 length response from the reader. If the SCardControl() is called after the PICC is presented and connected I get the 90 00 success response. Is this expected?
Reading the API manual it seems that I should not be using SCardControl() to load the keys, so it surprises me that it works in case PICC is present.
I've been doing this with default key values and also noticed that I can authenticate with the PICC even if the load keys command is not made at all. I tried disconnecting the reader to make it forget the keys, but the authentication still worked without loading the keys. Is this expected?
I'm using ACR122U (ACR122U214) on Linux with master code from this repo. I'm trying to understand the behavior of the load keys command. The reason I'm trying this is because the API says that the keys are loaded into the reader, so I tried avoiding loading the keys every time a PICC is presented hence the use of the
SCardControl()
.Should I be able to perform 'Load Authentication Keys' command without PICC being present?
I have a code that tries to load the keys using this
SCardControl()
:If I try
SCardControl()
after the reader is detected and connected (no PICC presented) it does not work, I get 0 length response from the reader. If theSCardControl()
is called after the PICC is presented and connected I get the 90 00 success response. Is this expected?Reading the API manual it seems that I should not be using
SCardControl()
to load the keys, so it surprises me that it works in case PICC is present.I've been doing this with default key values and also noticed that I can authenticate with the PICC even if the load keys command is not made at all. I tried disconnecting the reader to make it forget the keys, but the authentication still worked without loading the keys. Is this expected?
Log snippet of failed keys load (without PICC):
Log snippet of successful keys load (with PICC):