{"id":22267866,"url":"https://github.com/transmute-industries/lds-gpg2020","last_synced_at":"2025-07-28T11:32:48.168Z","repository":{"id":40727980,"uuid":"240805857","full_name":"transmute-industries/lds-gpg2020","owner":"transmute-industries","description":"Linked Data Signatures for GPG","archived":false,"fork":false,"pushed_at":"2023-01-04T14:17:24.000Z","size":2891,"stargazers_count":5,"open_issues_count":16,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-21T11:44:09.386Z","etag":null,"topics":["decentralized-identifiers","gpg","jsonld","linked-data","verifiable-credentials"],"latest_commit_sha":null,"homepage":"https://gpg.jsld.org","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/transmute-industries.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-16T00:04:08.000Z","updated_at":"2023-06-07T15:18:51.000Z","dependencies_parsed_at":"2023-02-02T15:32:04.927Z","dependency_job_id":null,"html_url":"https://github.com/transmute-industries/lds-gpg2020","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transmute-industries%2Flds-gpg2020","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transmute-industries%2Flds-gpg2020/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transmute-industries%2Flds-gpg2020/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transmute-industries%2Flds-gpg2020/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/transmute-industries","download_url":"https://codeload.github.com/transmute-industries/lds-gpg2020/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227905542,"owners_count":17837906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decentralized-identifiers","gpg","jsonld","linked-data","verifiable-credentials"],"created_at":"2024-12-03T11:09:21.804Z","updated_at":"2024-12-03T11:09:22.507Z","avatar_url":"https://github.com/transmute-industries.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linked Data Signatures for GPG\n\n![Integration Tests](https://github.com/transmute-industries/lds-gpg2020/workflows/Integration%20Tests/badge.svg) [![codecov](https://codecov.io/gh/transmute-industries/lds-gpg2020/branch/master/graph/badge.svg)](https://codecov.io/gh/transmute-industries/lds-gpg2020)\n\n[View On Github](https://github.com/transmute-industries/lds-gpg2020)\n\n- [View Linked Data Signature Suite Vocabulary](https://gpg.jsld.org/contexts/)\n- [View Linked Data Signature Suite Context](https://gpg.jsld.org/contexts/lds-gpg2020-v0.0.jsonld)\n\n## Security Considerations\n\n### Supported GPG Keys\n\ned25519, secp256k1, rsa, p256, p384, p521\n\nYou should be aware that some of the crypto supported by GPG may not be considered safe:\n\n- https://safecurves.cr.yp.to/\n\nIf you will only ever need to support Ed25519 or only Secp256k1, you should consider using a restricted Linked Data Signature Suite like:\n\n- [Ed25519Signature2018](https://github.com/digitalbazaar/jsonld-signatures/blob/master/lib/suites/Ed25519Signature2018.js)\n\n- [EcdsaSecp256k1Signature2019](https://github.com/decentralized-identity/lds-ecdsa-secp256k1-2019.js)\n\n## Getting Started\n\n```\nnpm i\nnpm run test\nnpm run coverage\nnpm run docs\n```\n\n## CLI Usage\n\nNormal\n\n```\nnpm i @transmute/lds-gpg2020 -g\ngpg2020 sign -u \"3BCAC9A882DEFE703FD52079E9CB06E71794A713\" $(pwd)/docs/example/doc.json did:btcr:xxcl-lzpq-q83a-0d5#yubikey\n```\n\nHelpful Testing Commands\n\n```\nnpm run gpg2020 -- import-gpg-keys-from-json $(pwd)/docs/example/key.json\n\nVERIFICATION_METHOD=$(cat $(pwd)/docs/example/key.json | jq '.id')\nnpm run gpg2020 -- sign -u \"114FAE6216DE45B78A611D22227982B2ECAFBD45\" $(pwd)/docs/example/doc.json $VERIFICATION_METHOD -o $(pwd)/docs/example/doc.signed.json\nnpm run gpg2020 -- verify $(pwd)/docs/example/doc.signed.json\n\nnpm run gpg2020 -- sign -u \"FDDB584BDF141F95\" $(pwd)/docs/example/doc.json did:example:123#yolo -o $(pwd)/docs/example/doc.signed.json\n\ngpg --armor --output public-key.gpg --export james@example.com\nnpm run gpg2020 -- make-json-key ./public-key.gpg did:btcr:xxcl-lzpq-q83a-0d5\n\n\nnpm run gpg2020 -- resolve did:web:did.or13.io\n\nnpm run gpg2020 -- sign -u \"20A968A458342F6B1A822C5BFDDB584BDF141F95\" $(pwd)/docs/example/doc.json  did:web:did.or13.io#20a968a458342f6b1a822c5bfddb584bdf141f95 -o $(pwd)/docs/example/doc.signed.yubikey.json\n\nnpm run gpg2020 -- verify $(pwd)/docs/example/doc.signed.yubikey.json\n\n```\n\n#### Suite Details\n\nPer [ld-signatures](https://w3c-dvcg.github.io/ld-signatures/#signature-suites), this Signature Suite defines the following:\n\n```json\n{\n  \"id\": \"https://gpg.jsld.org/contexts/#GpgSignature2020\",\n  \"type\": \"SignatureSuite\",\n  \"canonicalizationAlgorithm\": \"https://w3id.org/security#URDNA2015\",\n  \"digestAlgorithm\": \"https://www.ietf.org/assignments/jwa-parameters#SHA256\",\n  \"signatureAlgorithm\": \"https://tools.ietf.org/html/rfc4880#section-11.4\"\n}\n```\n\nSee the [Linked Data Signature Suite Vocabulary](https://gpg.jsld.org/contexts/).\n\n#### Example Data\n\n- [example keys](https://gpg.jsld.org/example/didDocGpgKeys.json).\n- [example did document](https://gpg.jsld.org/example/didDoc.json)\n\n## Yubikey\n\n- [yubico-c](https://developers.yubico.com/yubico-c/)\n- [yubikey-personalization](https://developers.yubico.com/yubikey-personalization/)\n- [Resetting a Yubikey](https://support.yubico.com/support/solutions/articles/15000006421-resetting-the-openpgp-applet-on-the-yubikey)\n\nConnect Yubikey\n\nSee [Generating a key on yubikey](https://support.yubico.com/support/solutions/articles/15000006420-using-your-yubikey-with-openpgp#Generating_Your_PGP_Key_Directly_on_Your_YubiKeyttvb3m)\n\n```\ngpg-connect-agent --hex \"scd apdu 00 f1 00 00\" /bye\ngpg --card-edit\ngenerate\n```\n\nFollow instructions:\n\nMake sure to choose to export your keys, you will not be able to access them again if you do not.\n\nAt the end you should see:\n\n```\ngpg: Note: backup of card key saved to '/Users/USER/.gnupg/sk_3AF00854CF8D9237.gpg'\ngpg: revocation certificate stored as '/Users/USER/.gnupg/openpgp-revocs.d/F1BD12F71206FAA1F236997D60042D876C326166.rev'\npublic and secret key created and signed.\n```\n\nShow the keys on the card:\n\n```\nlist\n```\n\n### General GPG Commands\n\nExport a public key:\n\n```\ngpg --armor --export james@example.com\n\n```\n\nEncrypt and decrypt:\n\n```\necho \"test message string\" | gpg --encrypt --armor -u 3AF00854CF8D9237 --recipient 3AF00854CF8D9237 -o encrypted.txt\n\ngpg --decrypt --armor encrypted.txt\n```\n\nSign and Verify:\n\n```\necho \"test message string\" | gpg --sign --armor -u 3AF00854CF8D9237  -o signed.txt\ncat signed.txt | gpg --verify --armor\n```\n\n## Credits and Support\n\nWorks with:\n\n- [openpgpjs](https://github.com/openpgpjs/openpgpjs)\n- [universal-resolver](https://github.com/decentralized-identity/universal-resolver)\n- [jsonld-signatures](https://github.com/digitalbazaar/jsonld-signatures)\n- [vc-js](https://github.com/digitalbazaar/vc-js)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransmute-industries%2Flds-gpg2020","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftransmute-industries%2Flds-gpg2020","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransmute-industries%2Flds-gpg2020/lists"}