Closed galin-chung-nguyen closed 1 year ago
About Credential format:
In 2.1. section, Issuer issues a credential,
Step 4: Send the credential (only public fields) to holder -> holder stores credential in local storage
Should the tech be like that:
encryptedData
, About 2.2 Verifier creates a schema, we should have a field (nonce
or challenge
) to prevent relay attack ref. For example, a challenge is a random number for every request schema, it can prevent an holder from creating a Verifiable Presentation and send it for his friends,
We should follow W3C term
About 2.2 Verifier creates a schema, we should have a field (
nonce
orchallenge
) to prevent relay attack ref. For example, a challenge is a random number for every request schema, it can prevent an holder from creating a Verifiable Presentation and send it for his friends,
It feels like the nonce couldn't help here. Because this is not jwt. Once the attacker observed the data sent (proof + encryptedData), they just submit the same things and the check will still pass. We might solve this by filtering the duplicated submissions, or using some other methods. @tranvinh146 What do you think?
{
"name": "Computer Science University Degree Check",
"verifier": "asdnfklj234o123498ssdfasdjfagsdf",
"checks":[
...
],
"requests": ["0.schoolName", "1.name"],
"nonce": "0x123456789abcdef" // add this field
}
I think checking a signature of nonce is easier than storing and checking duplicated submissions. Holder has just sent ( proof + encryptedData + signature(nonce) ), so verifier can make sure that holder owns the particular key in DID document (verifier can check assertMethod
in DID document of holder).
cc @galin-chung-nguyen
But if someone does replay attack, they could just send all of proof + encryptedData + signature(nonce), the verifier cannot realize whether it is the real holder or the attacker @tranvinh146
In my case, each request can use only one time, so malicious user can not use this proof to send other verifiers.
P/S: maybe we need to discuss in the next meeting.
Hi guys, this is my proposal about the cryptography core for the system. Please raise questions in case you need me to clarify something or give me some feedbacks to improve it! Thank you! @tranvinh146 @tranhuyducseven
1. Credential format
2. User flow
2.1 Issuer issues a credential
2.2 Verifier creates a schema
Verifier chooses a schema template (e.g. UniversityDegreeCredentialSchema) or creates a new schema and then send to the holder/publish this schema. The schema should be constructed with the format below:
2.3 Holder submits credentials to a schema
2.4 Verifier verifies submission
Step 1: Verifier decrypt the requestedData: requestedData = ECCDecrypt(verifier_private_key, encryptedRequestedData) Step 2: Verifier run the check: