The OpenPGP-DID project provides a command-line interface (CLI) that uses your Smart Card Hardware OpenPGP applet to perform DID (Decentralized Identifiers) / SSI (Self-sovereign Identity) related operations using your existing signing / encryption keys for OpenPGP.
- Cross-platform communication with your smart card using openpgp-card crate and pcsc.
- SSI sign operation using your OpenPGP applet smart card. Made possible by SpruceID SSI Library.
- Creation of DID documents. E.g. did:web:yigitcan.dev
Before using this CLI, you need to initiate signing and encryption keys for your OpenPGP Applet. This operation is not orchestrated by this CLI, you need to follow other docs and videos to do this yourself. The keys you create must be Elliptic Curve keys e.g. Ed25519 and Cv25519.
Check out Youtube - How to set up Git commit signing with GPG and a YubiKey on macOS if you are on Mac and are using Yubikey.
You can ensure the initial setup is properly completed by running openpgp-did card diagnostic
. You should see SUCCESS for all the diagnostic checks.
$ openpgp-did card diagnostic
+---------+--------------------------------------+---------+
| Code | Description | Result |
+---------+--------------------------------------+---------+
| DIAG-01 | card connection must be successful | SUCCESS |
+---------+--------------------------------------+---------+
| DIAG-02 | card information must be read | SUCCESS |
+---------+--------------------------------------+---------+
| DIAG-03 | signing key must exist | SUCCESS |
+---------+--------------------------------------+---------+
| DIAG-04 | encryption key must exist | SUCCESS |
+---------+--------------------------------------+---------+
| DIAG-05 | signing key curve must be Ed25519 | SUCCESS |
+---------+--------------------------------------+---------+
| DIAG-06 | encryption key curve must be Cv25519 | SUCCESS |
+---------+--------------------------------------+---------+
Install the OpenPGP-DID CLI by cloning the repository and using cargo:
git clone https://github.com/Yengas/openpgp-did.git
cd openpgp-did
cargo build
cargo install --path .
To see the list of available commands, you can run:
openpgp-did help
For detailed usage instructions of specific commands, refer to their respective help menus:
openpgp-did card help
openpgp-did did help
openpgp-did ssi help
Sometimes gpg agent keeps lock on the Smart Card. Run gpgconf --kill gpg-agent
to kill the GPG agent.
Contributions to the OpenPGP-DID project are welcome! Please review the CONTRIBUTING.md for details on how to get started.
This project is licensed under the MIT License.