Skip to content

Commit

Permalink
feat: Documentation update
Browse files Browse the repository at this point in the history
Signed-off-by: artem.ivanov <[email protected]>
  • Loading branch information
Artemkaaas committed Nov 9, 2023
1 parent 4a273bc commit 326ede2
Show file tree
Hide file tree
Showing 2 changed files with 175 additions and 126 deletions.
116 changes: 60 additions & 56 deletions docs/design/w3c/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ schema in order to include the information about AnonCreds related definitions t

* `schema` - id of AnonCreds Schema
* `definition` - id of AnonCreds Credential Definition
* `revocation` - Revocation Registry Accumulator value
* `witness` - Witness value
* `revocation_registry` - (Optional) id of AnonCreds Revocation Registry
* `encoding` - attributes encoding algorithm
* encoded credential attribute values (binary representation required for doing CL signatures) are not included
neither to `credentialSubject` or `signature`
Expand Down Expand Up @@ -244,26 +243,32 @@ entry:
* encoded
as [base64 attachment](https://github.com/hyperledger/aries-rfcs/tree/main/concepts/0017-attachments#base64url)
> Note that `rev_reg` and `witness` are only should be set in Issuer's signature.
> After processing the credential signature on the Holder's side these data can be cleaned to reduce the credential size
##### non-AnonCreds Integrity proof
In order to better conform to the W3C specification AnonCreds based credential also allow including
of non-AnonCreds [Data Integrity Proof](https://www.w3.org/TR/vc-data-model/#data-integrity-proofs) which must be generated using one
of non-AnonCreds [Data Integrity Proof](https://www.w3.org/TR/vc-data-model/#data-integrity-proofs) which must be
generated using one
of NIST-approved algorithms (RSA, ECDSA, EdDSA).
#### Expiration
W3C [Expiration](https://www.w3.org/TR/vc-data-model/#expiration) section defines an optional capability to include
credential expiration information.
Instead of including `expirationDate` property we recommend using a standard AnonCreds credentials revocation approach and
Instead of including `expirationDate` property we recommend using a standard AnonCreds credentials revocation approach
and
include a revocation registry id into the credential schema.
#### Status
W3C [Status](https://www.w3.org/TR/vc-data-model/#status) section defines an optional capability to include credential
status information.
Instead of including `credentialStatus` property we recommend using a standard AnonCreds credentials revocation approach and
Instead of including `credentialStatus` property we recommend using a standard AnonCreds credentials revocation approach
and
include a revocation registry id into the credential schema.
### Presentation
Expand Down Expand Up @@ -307,31 +312,29 @@ Example of an AnonCreds W3C presentation which will be explained in details:
},
"proof": {
"type": "AnonCredsPresentationProof2022",
"credential": {
"mapping": {
"revealedAttributes": [
{
"name": "firstName",
"referent": "attribute_0"
}
],
"unrevealedAttributes": [
{
"name": "lastName",
"referent": "attribute_1"
}
],
"requestedPredicates": [
{
"name": "age",
"p_type": "<",
"value": 18,
"referent": "predicate_1"
}
]
},
"proofValue": "AAEBAnr2Ql...0UhJ-bIIdWFKVWxjU3ePxv_7HoY5pUw"
}
"mapping": {
"revealedAttributes": [
{
"name": "firstName",
"referent": "attribute_0"
}
],
"unrevealedAttributes": [
{
"name": "lastName",
"referent": "attribute_1"
}
],
"requestedPredicates": [
{
"name": "age",
"p_type": "<",
"value": 18,
"referent": "predicate_1"
}
]
},
"proofValue": "AAEBAnr2Ql...0UhJ-bIIdWFKVWxjU3ePxv_7HoY5pUw"
}
}
],
Expand Down Expand Up @@ -406,31 +409,30 @@ type pointing to the difference in a presentation structure and looks the follow
```
"proof": {
"type": "AnonCredsPresentationProof2022",
"credential": {
"mapping": {
"revealedAttributes": [
{
"name": "firstName",
"referent": "attribute_0"
}
],
"unrevealedAttributes": [
{
"name": "lastName",
"referent": "attribute_1"
}
],
"requestedPredicates": [
{
"name": "age",
"p_type": "<",
"value": 18,
"referent": "predicate_1"
}
]
"mapping": {
"revealedAttributes": [
{
"name": "firstName",
"referent": "attribute_0"
}
],
"unrevealedAttributes": [
{
"name": "lastName",
"referent": "attribute_1"
}
],
"requestedPredicates": [
{
"name": "age",
"p_type": "<",
"value": 18,
"referent": "predicate_1"
}
]
},
"proofValue": "AAEBAnr2Ql...0UhJ-bIIdWFKVWxjU3ePxv_7HoY5pUw"
}
"timestamp": Option<1234567>,
"proofValue": "AAEBAnr2Ql...0UhJ-bIIdWFKVWxjU3ePxv_7HoY5pUw"****
}
```

Expand All @@ -440,8 +442,7 @@ type pointing to the difference in a presentation structure and looks the follow
* proof value received by building the following object:
```
{
primaryProof: {..},
nonRevocProof: {..}
sub_proof: {..}
}
```
* encoded
Expand All @@ -451,6 +452,8 @@ type pointing to the difference in a presentation structure and looks the follow
* `revealedAttributes` - list of requested attributes revealed using the credential
* `unrevealedAttributes` - list of requested attributes presented in the credential but left unrevealed
* `requestedPredicates` - list of predicates resolved using the credential
* `timestamp` - (Optional) if revocation supported and requested, time as a total number of seconds from Unix Epoch
representing pointing to the specif moment of revocation registry
#### Proof
Expand Down Expand Up @@ -491,3 +494,4 @@ presentation:
```
* encoded
as [base64 attachment](https://github.com/hyperledger/aries-rfcs/tree/main/concepts/0017-attachments#base64url).
Loading

0 comments on commit 326ede2

Please sign in to comment.