How can a mobile app read smart cards and create digital signatures?

0
7
Asked By MellowCedar42 On

I'm developing an app that needs to read certificates from government-issued smart cards and use them to digitally sign documents such as PDFs or emails. On Windows and macOS, these cards typically work through PKCS#11 libraries with a USB or USB-C card reader. I tried connecting a reader to an Android phone over USB-C, but Android and iOS seem to have limited support for generic smart-card access. Is there a practical way to support this on either platform, or would I need to rely on a vendor-specific app or another architecture?

2 Answers

Answered By CopperVale19 On

A USB-C reader may be recognized as a USB accessory, but that doesn’t automatically give an Android or iOS app access to the card through PKCS#11. You would need platform-specific support for the reader, the card protocol, certificate handling, and the private-key operations. In practice, check whether the card issuer provides a mobile SDK; otherwise, a companion desktop or server-based signing component may be more realistic. Be careful not to export the private key—the signing operation should happen on the card.

Answered By PixelHarbor7 On

The answer depends heavily on the card type and the signature standard it uses. OpenPGP cards can often 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 Android or iOS SDK/app, since mobile operating systems don’t provide the same general PKCS#11 integration available on desktop systems.

MellowCedar42 -

These are government-issued cards used to sign documents and emails. I’m specifically trying to build the certificate-reading and signing workflow into my own app, rather than relying entirely on a desktop application.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.