-
Notifications
You must be signed in to change notification settings - Fork 18
Description
I wonder if there is a mistake somewhere in the tool chain or in the modelling of Verifiable Claims.
Using the process described in issue 1 of Jen3 I took the Verfiable Claim Model example 6
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"id": "http://example.edu/credentials/3732",
"type": [
"VerifiableCredential",
"UniversityDegreeCredential"
],
"issuer": "https://example.edu/issuers/565049",
"issuanceDate": "2010-01-01T00:00:00Z",
"credentialSubject": {
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
"degree": {
"type": "BachelorDegree",
"name": "Bachelor of Science and Arts"
}
},
"proof": {
"type": "Ed25519Signature2020",
"created": "2022-02-25T14:58:43Z",
"verificationMethod": "https://example.edu/issuers/565049#key-1",
"proofPurpose": "assertionMethod",
"proofValue": "zeEdUoM7m9cY8ZyTpey83yBKeBcmcvbyrEQzJ19rD2UXArU2U1jPGoEt
rRvGYppdiK37GU4NBeoPakxpWhAvsVSt"
}
}and translated it to the following N3
@prefix sec: <https://w3id.org/security#> .
@prefix cred: <https://www.w3.org/2018/credentials#> .
@prefix eg: <https://example.org/examples#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dc: <http://purl.org/dc/terms/> .
@prefix sch: <https://schema.org/> .
<http://example.edu/credentials/3732>
a cred:VerifiableCredential ;
a eg:UniversityDegreeCredential ;
cred:issuer <https://example.edu/issuers/565049> ;
cred:issuanceDate "2010-01-01T00:00:00Z"^^xsd:dateTime ;
cred:credentialSubject
<did:example:ebfeb1f712ebc6f1c276e12ec21> ;
sec:proof {
[] dc:created "2022-02-25T14:58:43Z"^^xsd:dateTime ;
rdf:type sec:Ed25519Signature2020 ;
sec:proofPurpose sec:assertionMethod ;
sec:proofValue "zeEdUoM7m9cY8ZyTpey83yBKeBcmcvbyrEQzJ19rD2UXArU2U1jPGoEtrRvGYppdiK37GU4NBeoPakxpWhAvsVSt"^^sec:multibase;
sec:verificationMethod
<https://example.edu/issuers/565049#key-1> .
} .
<did:example:ebfeb1f712ebc6f1c276e12ec21>
eg:degree [
a eg:BachelorDegree ;
sch:name "Bachelor of Science and Arts"^^rdf:HTML .
].
I am doing this for the purpose of modeling access control using the says logic discussed in issue 203.
Anyway: it seems to me, looking at this, that the proof should not be inside the graph of the credential it is signing but outside of it because a signature must be about precisely specified content.
So I would have expected instead:
{
<http://example.edu/credentials/3732>
a cred:VerifiableCredential ;
a eg:UniversityDegreeCredential ;
cred:issuer <https://example.edu/issuers/565049> ;
cred:issuanceDate "2010-01-01T00:00:00Z"^^xsd:dateTime ;
cred:credentialSubject [ id <did:example:ebfeb1f712ebc6f1c276e12ec21>
eg:degree [ a eg:BachelorDegree ;
sch:name "Bachelor of Science and Arts"^^rdf:HTML ]
} sec:proof [ dc:created "2022-02-25T14:58:43Z"^^xsd:dateTime ;
rdf:type sec:Ed25519Signature2020 ;
sec:proofPurpose sec:assertionMethod ;
sec:proofValue "zeEdUoM7m9cY8ZyTpey83yBKeBcmcvbyrEQzJ19rD2UXArU2U1jPGoEtrRvGYppdiK37GU4NBeoPakxpWhAvsVSt"^^sec:multibase;
sec:verificationMethod
<https://example.edu/issuers/565049#key-1> ]
or something along those lines where it is clear what the signed triples are.
That is, the graph to be signed must be a quoted graph, and the signature proof of it is an external description of that graph.
So it looks like we ended up with the opposite of what is logically needed.