How Can I Read a Government Smart Card and Sign Documents on Android or iOS?
Asked by
MellowCedar47
I'm developing a mobile app that needs to read certificates from government-issued smart cards and create digital signatures for documents such as PDFs or emails. On Windows and macOS, these cards are commonly accessed through PKCS#11 libraries and USB or USB-C card readers. I tried connecting a reader to an Android phone over USB-C, but mobile operating systems seem to have significant limitations around smart-card access. What approaches, libraries, or vendor integrations can support this on Android or iOS?
Answers
It depends heavily on the card type and the signature standard it uses. OpenPGP cards can sometimes be accessed on Android through NFC with an app such as OpenKeychain. For proprietary cards or generic PIV cards, youโll usually need the card vendorโs mobile SDK or application rather than a universal solution.
Reply to this answer
There isnโt one standard API that makes every smart card work across Android and iOS. Android may support certain USB or NFC readers through custom hardware APIs, but you would likely need to implement the card protocol yourself or integrate the issuerโs SDK. iOS is more restrictive, so a vendor-provided app, approved accessory, or remote signing service may be required.
MellowCedar47: The exact card model, reader, and signing protocol will be important. Identifying whether the card exposes PIV, PKCS#11, OpenPGP, or a proprietary interface should be the first step before choosing a mobile implementation.
Reply to this answer
Add your answer
Answers are reviewed before publication.
QuartzMango19: Government-issued signing cards often rely on PKCS#11 or vendor-specific middleware, which is much easier to use on desktop operating systems. A USB-C reader may be visible to Android, but that doesnโt automatically provide the libraries or permissions needed to communicate with the card.