Skip to content

OpenPGP Smart Card: getSupportedAlgorithms(), changePIN(), generateKey(), external_secrets_01 - #2565

Open
vanitasvitae wants to merge 17 commits into
bcgit:mainfrom
pgpainless:smartcard_5
Open

vanitasvitae wants to merge 17 commits into
bcgit:mainfrom
pgpainless:smartcard_5

Conversation

@vanitasvitae

Copy link
Copy Markdown
Contributor

This PR implements milestone 5 and adds a number of changes:

  • OpenPGP Smart Cards now expose supported algorithms via OpenPGPSmartCard.getSupportedAlgorithms(), which is implemented by the yubikey and simulator backends.
  • There is now an API to change the admin / user PIN of cards via OpenPGPSmartCard.changeUserPIN(oldCardPinProvider, newCardPinProvider), OpenPGPSmartCard.changeAdminPIN(oldCardPinProvider, newCardPinProvider).
  • It is now possible to instruct the card to generate a key on-device, returning the public key component. This is done in preparation for milestone 7 and 8, which will allow high-level on-device key generation.
  • The OpenPGP External Secret Keys document has been adopted by the OpenPGP working group and is now available here. This PR adopts the changes from revision 01, which flips the logic for empty locator hints to mean "unavailable" rather than "best effort".

@vanitasvitae

Copy link
Copy Markdown
Contributor Author

In the mean time, I started working on a prototype Smart Card library based on javax.smartcardio, which works with Yubikey and Nitrokey devices (and potentially any device implementing the OpenPGP Smart Card spec 3.4.
This library will help ensuring that the API is generic enough to be implemented by different backend libraries, not just yubikit.

@dghgit dghgit self-assigned this Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants