This specification describes a mechanism for ensuring the authenticity and integrity of linked data documents using digital signatures.
This is an experimental specification and is undergoing regular revisions. It is not fit for production deployment.
The term Linked Data is used to describe a recommended best practice for exposing, sharing, and connecting information on the Web using standards, such as URLs, to identify things and their properties. When information is presented as Linked Data, other related information can be easily discovered and new information can be easily linked to it. Linked Data is extensible in a decentralized way, greatly reducing barriers to large scale integration. With the increase in usage of Linked Data for a variety of applications, there is a need to be able to verify the authenticity and integrity of Linked Data documents. This specification adds authentication and integrity protection to linked data documents through the use of public/private key cryptography without sacrificing Linked Data features such as extensibility and composability.
The Linked Data Signature specification achieves the following design goals:
The following terms are used to describe concepts involved in the generation and verification of Linked Data digital signatures.
example.com, a
ad-hoc value such as mycorp-level3-access, or a very
specific transaction value like 8zF6T$mqP. A signer may
include a domain in its digital signature to restrict its use
to particular target, identified by the specified domain.
A linked data signature is compromised of information about the signature, parameters required to verify it, and the signature value itself. All of this information is provided using Linked Data vocabularies such as the [[!SECURITY-VOCABULARY]].
A linked data signature typically includes at least the following attributes:
LinkedDataSignature2015.
Since this specification is based on Linked Data, the terms type,
creator, created, domain,
nonce, and signatureValue above
map to URLs. The vocabulary where these terms are defined is the
[[SECURITY-VOCABULARY]].
A signature can be added to a Linked Data document like the following:
{
"@context": "https://w3id.org/identity/v1",
"title": "Hello World!"
}
by adding the parameters outlined in this section:
{
"@context": "https://w3id.org/identity/v1",
"title": "Hello World!",
"signature": {
"type": "LinkedDataSignature2015",
"creator": "http://example.com/i/pat/keys/5",
"created": "2011-09-23T20:21:34Z",
"domain": "example.org",
"nonce": "2bbgh3dgjg2302d-d2b3gi423d42",
"signatureValue": "OGQzNGVkMzVm4NTIyZTkZDY...NmExMgoYzI43Q3ODIyOWM32NjI="
}
}
The signature example above uses the LinkedDataSignature2015
signature suite to produce a verifiable digital signature.
signature map to,
for instance, in the security vocabulary.The Linked Data Signatures specification supports the concept of multiple signatures in a single document. There are two types of multi-signature approaches that are identified: Signature Sets and Signature Chains.
A signature set is useful when the same data needs to be signed by multiple
entities, but where the order of signatures does not matter,
such as in the case of a set of signatures on a contract. A signature set,
which has no order, is represented by associating a set of signatures
with the signature key in a document.
{
"@context": "https://w3id.org/identity/v1",
"title": "Hello World!",
"signature": [{
"type": "RsaSignature2015",
"creator": "http://example.com/i/pat/keys/5",
"created": "2011-09-23T20:21:34Z",
"domain": "example.org",
"nonce": "2bbgh3dgjg2302d-d2b3gi423d42",
"signatureValue": "OGQzNGVkMzVm4NTIyZTkZDY...NmExMgoYzI43Q3ODIyOWM32NjI="
}, {
"type": "RsaSignature2015",
"creator": "http://example.com/i/kelly/keys/7f3j",
"created": "2011-09-23T20:24:12Z",
"domain": "example.org",
"nonce": "83jj4hd62j49gk38",
"signatureValue": "zVm4NTIyZTkZDYOGQzNGVkM...3Q3ODIyOWM32NjINmExMgoYzI4="
}]
}
A signature chain is useful when the same data needs to be signed by
multiple entities and the order of when the signatures occurred matters,
such as in the case of a notary counter-signing a signature that had been
created on a document. A signature chain, where order must be preserved, is
represented by associating an ordered list of signatures with the
signatureChain key in a document.
{
"@context": "https://w3id.org/identity/v1",
"title": "Hello World!",
"signatureChain": [{
"type": "RsaSignature2015",
"creator": "http://example.com/i/pat/keys/5",
"created": "2011-09-23T20:21:34Z",
"domain": "example.org",
"nonce": "2bbgh3dgjg2302d-d2b3gi423d42",
"signatureValue": "OGQzNGVkMzVm4NTIyZTkZDY...NmExMgoYzI43Q3ODIyOWM32NjI="
}, {
"type": "RsaSignature2015",
"creator": "http://bank.example.com/notary/keys/7f3j",
"created": "2011-09-23T20:24:12Z",
"domain": "example.org",
"nonce": "83jj4hd62j49gk38",
"signatureValue": "yZTkZDYOGzNGVkMVm4NTIQz...M32NjINmExMDIyOWgoYzI43Q3O="
}]
}
A Linked Data Signature is designed to be easy to use by developers and
therefore strives to minimize the amount of information one has to remember
to generate a signature. Often, just the signature suite name (e.g.
LinkedDataSignature2015) is required
from developers to initiate the creation of a signature. These signature
suites are often created or reviewed by people that have the requisite
cryptographic training to ensure that safe combinations of cryptographic
primitives are used.
This section details the cryptographic primitives that are available to signature suite developers.
At a minimum, a signature suite must have the following attributes:
https://w3id.org/security#LinkedDataSignature2015.
SignatureSuite.
https://w3id.org/security#URDNA2015.
http://example.com/digests#sha512
http://www.w3.org/2000/09/xmldsig#rsa-sha256
A complete example of a signature suite is shown in the next example:
{
"id": "https://w3id.org/security#LinkedDataSignature2015",
"type": "SignatureSuite",
"canonicalizationAlgorithm": "https://w3id.org/security#URDNA2015",
"digestAlgorithm": "http://example.com/digests#sha512",
"signatureAlgorithm": "http://www.w3.org/2000/09/xmldsig#rsa-sha256"
}
The algorithms defined below are generalized in that they require a specific canonicalization algorithm, message digest algorithm, and signature algorithm to be used to achieve the algorithm's intended outcome.
The following algorithm specifies how to create a digital signature that can be later used to verify the authenticity and integrity of a linked data document. A linked data document, document, signature options, options, and a private key, privateKey, are required inputs. The signature options MUST contain an identifier for the public/private key pair, creator, and an ISO8601 combined date and time string, created, containing the current date and time, accurate to at least one second, in Universal Time Code format. A nonce and a domain may also be specified in the options. A signed linked data document is produced as output. Whenever this algorithm encodes strings, it MUST use UTF-8 encoding.
signature nodes from the default graph in
output.
signature node to output containing
a linked data signature using the appropriate
type and signatureValue values as well as
all of the data in the signature options (e.g.
creator, created, and if given, any additional signature
options such as nonce and domain).
The following algorithm specifies how to check the authenticity and
integrity of a signed linked data document by verifying its
digital signature. This algorithm takes a
signed linked data document, signed document and
outputs a true or false value based on whether or
not the digital signature on signed document was verified. Whenever
this algorithm encodes strings, it MUST use UTF-8 encoding.
signature node of the default graph of
signed document. Confirm that the linked data document
that describes the public key specifies its owner and that its
owner's URL identifier can be dereferenced to reveal a bi-directional link back
to the key. Ensure that the key's owner is a trusted entity before proceeding
to the next step.
signature nodes from the default graph in
document and save it as signature.
The following algorithm specifies how to create the data that is used to generate or verify a digital signature. It takes a canonicalized linked data document, canonicalized document, canonicalization algorithm, a message digest algorithm, and signature options, input options (by reference). The signature options MUST contain an identifier for the public/private key pair, creator, and an ISO8601 combined date and time string, created, containing the current date and time, accurate to at least one second, in Universal Time Code format. A nonce and a domain may also be specified in the options. Its output is a message digest that can be used to generate or verify a digital signature.
type, id, or signatureValue
exists in options, remove the entry.
2017-13-13T20:21:34Z.
The following section describes security considerations that developers implementing this specification should be aware of in order to create secure software.
A previous version of this specification has light deployment. For purposes of identification, the algorithm is identified as GraphSignature2012 and its algorithms differ from the stated algorithm in the following ways: