Description
The reason for the proposal will be clear if one understands the problem it is meant to solve, which arises from a slight shift between RDF semantics and the syntax JSON folks would like.
The problem goes back to at least 2016 from the desire, made clear in the VC Data Integrity Spect to start from a simple JSON Example 1
{
"title": "Hello world!"
}
and then add a signature to get a document such as that given in Example 2
{
"title": "Hello world!",
"proof": {
"type": "DataIntegrityProof",
"cryptosuite": "jcs-eddsa-2022",
"created": "2023-03-05T19:23:24Z",
"verificationMethod": "https://di.example/issuer#z6MkjLrk3gKS2nnkeWcmcxiZPGskmesDpuwRBorgHxUXfxnG",
"proofPurpose": "assertionMethod",
"proofValue": "zQeVbY4oey5q2M3XKaxup3tmzN4DRFTLVqpLMweBrSxMY2xHX5XTYV8nQApmEcqaqA3Q1gVHMrXFkXJeV6doDwLWx"
}
}
It has been a constant in the aim of the VC folks to have something this simple.
This thinking is then extended to the VC Data Model 2.0 Example 1
{
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://www.w3.org/ns/credentials/examples/v2"
],
"id": "http://university.example/credentials/1872",
"type": ["VerifiableCredential", "ExampleAlumniCredential"],
"issuer": "https://university.example/issuers/565049",
"validFrom": "2010-01-01T19:23:24Z",
"credentialSubject": {
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
"alumniOf": {
"id": "did:example:c276e12ec21ebfeb1f712ebc6f1",
"name": "Example University"
}
},
"proof": {
"type": "DataIntegrityProof",
"cryptosuite": "eddsa-2022",
"created": "2023-06-18T21:19:10Z",
"proofPurpose": "assertionMethod",
"verificationMethod": "https://university.example/issuers/565049#key-123",
"proofValue": "zQeVbY4oey5q2M3XKaxup3tmzN4DRFTLVqpLMweBrSxMY2xHX5XTYV8nQApmEcqaqA3Q1gVHMrXFkXJeV6doDwLWx"
}
}
After careful work translating the above JsonLD to NQuads and then to N3 I was able to then draw it out as the following graph
But as explained most concisely in this reply to issue 1248 of the VC DM, that gives us the wrong graph semantics because we can't tell what is being signed. The signature is enclosed in a (Green) surface where what is needed is that the signed graph be enclosed in a node. Ie we need it to be as follows, where the to-be-signed graph is enclosed in the pink surface:
In other words: We need the default graph to be shifted along the "proof" relation.
But we need this to happen without changing the JSON surface syntax.
Therefore I propose this group consider a @shift
context annotation that could be placed on a "proof" element that would have the above effect.
The name of that annotiation is not important of course - it is the effect that is needed.