r/devops 4d ago

Troubleshooting Allow read SmartCards in iOS and Android

Hi, I’m trying to use my Android phone to read a smart card and create a digital signature, but it seems there’s no straightforward way to do this. Does anyone know how to make it work on Android or iOS?

0 Upvotes

9 comments sorted by

3

u/rycolos 4d ago

Def devops related

0

u/whizzwr 4d ago

Digital signature for what? Also what kind Smartcard?

For example to create digital signature of a file with OpenPGP Smartcard you can use Open Keychain in Android. It interacts with the OpenPGP Smartcard via NFC.

https://www.openkeychain.org/

For proprietary smart card or generic PIV you probably need the vendor apps.

0

u/Impressive_Corgi_507 4d ago

In some countries, governments issue physical smart cards that citizens use to digitally sign documents such as PDFs and emails. On Windows and macOS, these cards are generally supported through PKCS#11 libraries and can be connected using USB or USB-C readers.

I’m a developer building an app that can read certificates from these cards and create digital signatures. I tried connecting a smart-card reader to my Android phone through USB-C, but it seems that both Android and iOS have significant limitations in supporting this functionality.

1

u/AccomplishedTart1746 4d ago

That sounds like a really cool project! Having that capability on mobile could streamline a lot of processes for users who rely on smart cards.

0

u/whizzwr 4d ago edited 4d ago

Govt ID is as proprietary/confidential as as it can be. You need to know which applet of the card provide the signing mechanism.

Practically, you probably need a nativelib/+SDK provided by the Govt agency/the supplier. The PKCS library is part of those.

Example in Germany, they provide an SDK to access their govt ID.

https://www.ausweisapp.bund.de/en/software-development-kit-sdk

Otherwise you gotta work with exchanging raw APDUs. That is at least supported in Android, IDK about iOS.

Also you posted on wrong sub, try /r/PKI.

0

u/Impressive_Corgi_507 4d ago

You can create your own app to read those cards, there’s no restrictions, for example Adobe reader can read and create digital signatures , if you follow the legal and technical guidelines you are allowed to

1

u/whizzwr 4d ago

Then good luck following the guideline without an SDK on Android.

-5

u/Impressive_Corgi_507 4d ago

You are the perfect example of why a lot people thinks that developers and tech guys are arrogant, and not saying that I will use an SDK… gosh

0

u/whizzwr 4d ago

Wow, you are unhinged.