Hi,
I’m currently working on an app that uses a third-party SDK to perform smart card authentication via PKCS#11 APIs. Specifically, the app interacts with the smart card to retrieve certificates, detect the card reader, and perform encryption and decryption operations on provided data.
I’m wondering if it's possible to replace the PKCS#11 APIs and the third-party SDK with Apple's CryptoTokenKit framework. Does CryptoTokenKit provide equivalent functionality for smart card authentication, certificate management, and encryption/decryption operations?
Additionally, I’ve come across the following CryptoTokenKit documentation:
CryptoTokenKit API - TKSmartCardSlotManager Could you provide an example code or any guidance on how to implement this functionality using CryptoTokenKit, particularly for interacting with smart cards, managing certificates, and performing cryptographic operations?
Thank you for your assistance.
Does CryptoTokenKit provide equivalent functionality for smart card authentication, certificate management, and encryption/decryption operations?
Yes. But in most cases you don’t actually need to use CTK directly. Rather, you can find smart card backed keys using the normal SecItem API and then work with them directly. However, if you want to do things like monitor the smart card coming and going then, sure, CTK is what you need.
See this post for more details and some code snippets.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"