Linked Data Signatures for GPG

View on GitHub

JSON-LD 1.1 is being formally specified in the W3C JSON-LD Working Group. To participate in this work, please join the W3C and then join the Working Group.

Suite Details

Per ld-signatures, this Signature Suite defines the following:

{
  "id": "https://gpg.jsld.org/contexts/#GpgSignature2020",
  "type": "SignatureSuite",
  "canonicalizationAlgorithm": "https://w3id.org/security#URDNA2015",
  "digestAlgorithm": "https://www.ietf.org/assignments/jwa-parameters#SHA256",
  "signatureAlgorithm": "https://tools.ietf.org/html/rfc4880#section-11.4"
}

Terminology

publicKeyGpg

A public key in ascii armored format. Read rfc4880.

Example:

-----BEGIN PGP PUBLIC KEY BLOCK-----

mQENBF5JeqoBCACyxTKPm7u+IbyBzD4ViKAh73RdnRk6PDCt0UNiwcWedV6SWs4I
+zizXHVzpu8R6/V5k+hES7TpGScrrX16RtqCLU36hm1UJ3yaS3NJTPCRzUIPTCX8
...
O9A9USJ+SMZttYBw+rLC/QXhNl1FtiQwg2g4tV84NxJtJdOoaxPhP6fuMMjtQ9vL
0hj6/7z2caeNHxbdFsq6JxLgOqc8Lf5s+hvAUs+ERIu/vF8=
=1LBV
-----END PGP PUBLIC KEY BLOCK-----

GpgVerificationKey2020

The verification key type for GpgSignature2020. The key must have a property publicKeyGpg and its value must be a valid JWK.

Example:

[
  {
    "@context": "https://gpg.jsld.org/contexts/lds-gpg2020-v0.0.jsonld",
    "id": "did:btcr:xxcl-lzpq-q83a-0d5#20a968a458342f6b1a822c5bfddb584bdf141f95",
    "type": "GpgVerificationKey2020",
    "controller": "did:btcr:xxcl-lzpq-q83a-0d5",
    "publicKeyGpg": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQEN....vF8=\n=1LBV\n-----END PGP PUBLIC KEY BLOCK-----\n"
  }
]

GpgSignature2020

A JSON-LD Document has been signed with GpgSignature2020, when it contains a proof field with type GpgSignature2020. The proof must contain a key signatureValue with value defined by the signing algorithm described here.

Example:

{
  "@context": [
    "https://gpg.jsld.org/contexts/lds-gpg2020-v0.0.jsonld",
    {
      "schema": "http://schema.org/",
      "name": "schema:name",
      "homepage": "schema:url",
      "image": "schema:image"
    }
  ],
  "name": "Manu Sporny",
  "homepage": "https://manu.sporny.org/",
  "image": "https://manu.sporny.org/images/manu.png",
  "proof": {
    "type": "GpgSignature2020",
    "created": "2020-02-16T18:21:26Z",
    "verificationMethod": "did:web:did.or13.io#20a968a458342f6b1a822c5bfddb584bdf141f95",
    "proofPurpose": "assertionMethod",
    "signatureValue": "-----BEGIN PGP SIGNATURE-----\n\niQEzBAABCAAdFiEEIKlopFg0L2sagixb/dtYS98UH5UFAl5JiCYACgkQ/dtYS98U\nH5U8TQf/WS92hXkdkdBQ0xJcaSkoTsGspshZ+lT98N2Dqu6I1Q01VKm+UMniv5s/\n3z4VX83KuO5xtepFjs4S95S4gLmr227H7veUdlmPrQtkGpvRG0Ks5mX7tPmJo2TN\nDwm1imm+zvJ+MXr3Ld24qaRJA9dI+AoZ5HXqNp96Yncj3oWD+DtVIZmC/ZiUw43a\nLpMYy94Hie7Ad86hEoqsdRxrwq7O6KZ29TAKi5T/taemayyXY7papU28mGjVEcvO\na7M3XNBflMcMEB+g6gjrANsgFNO6tOuvOQ2+4v6yMfpJ0ji4ta7q2d4QKqGi5YhE\nsRUORN+7HJrkmSTaT7gBpFQ+YUnyLA==\n=Uzp1\n-----END PGP SIGNATURE-----\n"
  }
}