iOS 14 CoreNFC ISO15963 Authenticate command.

Hello everyone,

Can someone explain how to use this new function for iOS 14?

Authenticate command (0x35 command code)

Authenticate command (0x35 command code) as defined in ISO15693-3 specification.  Please note that in-process reply is returned to the caller without any processing.

Code Block
public func authenticate(requestFlags flags: NFCISO15693RequestFlag, cryptoSuiteIdentifier: Int, message: Data, resultHandler: @escaping (Result<(NFCISO15693ResponseFlag, Data), Error>) -> Void)

What does it mean by "in-process reply is returned to the caller without any processing"?

Seems clear enough but I am getting a Result Failure with Error:
Code Block
Tag connection lost



Answered by Ryuuzaki in 615158022
I managed to get it working!!!
So the message data should be created as the APDU wants,
but we should remove the Tag UID, the 0x35 command and the 0x20 flag from the APDU Byte array.
Seems like this "authenticate" command actually fills those spots for you!!


Excellent job CoreNFC team!!!



(Some better documentation would be nice tho)
Have you tried to send a different command to this ISO15693 tag using your NFCTagReaderSession? Did you follow the documentation, i.e. ISO15693-3, specific tag's data sheet from the manufacturer, to perform secure operations?
Hello, thank you for your reply.

Yes I have the complete APDU from the manufacturer, but I am not sure how this "authenticate" command includes the 0x35 or the other parts of the APDU such as the selection of the Key. The APDU for 0x35 includes a flag 0x20 which tells the chip we will be sending the tag's UID, and also the Key number from inside the chip so it can perform the AES encryption process.

I have tried a bunch of combinations, with chip UID, without chip UID, sending the whole APDU. But I just get one of two errors:

Code Block
Tag connection lost

or

Code Block
Code=15 "Stack Error"


Oh and btw, yes I am using NFCTagReaderSession and confirming its a ISO15963 tag

I am able to send:

Code Block
getSystemInfo


and get the correct tag information.

I edited my comment above to include this information. But I don't find an option to delete this reply.
0x35 is the Command code of the Authenticate command and 0x20 is the Request Flag per ISO15693 specification. You should specify the necessary flag setting using the NFCISO15693RequestFlag parameter. The authenticate function signature reflects the definition of the Authenticate command in the specification. Please consult to the ISO15693 specification for the full details.

In iOS 14 Core NFC also offers sending custom command (https://developer.apple.com/documentation/corenfc/nfciso15693tag/3043799-customcommand).

At this point I would recommend you to open a new Bug Report via Feedback Assistance. Attached a sample project illustrating the issue and attach related device log with indication of approximate timestamp when this issue occurs.
Accepted Answer
I managed to get it working!!!
So the message data should be created as the APDU wants,
but we should remove the Tag UID, the 0x35 command and the 0x20 flag from the APDU Byte array.
Seems like this "authenticate" command actually fills those spots for you!!


Excellent job CoreNFC team!!!



(Some better documentation would be nice tho)
Glad to hear you got it working!
iOS 14 CoreNFC ISO15963 Authenticate command.
 
 
Q