Closed audtlr24 closed 1 year ago
I'm closing this PR in its current state. Since that aries
is following a previous w3c spec and aries
is not based on protobuf
, it seems like a good idea to stick with the existing v2 x/did
and not apply it right away.
I'll reopen it later if we need the various features of aries
in a VC/VP-based datadeal
model.
Background
In
aries-framework-go
,DocumentSigner.Sign
andVerifyProof
methods are provided to verify the signature of the did document.DocumentSigner.Sign
addProof
at did document using private key corresponding to public key of verificationMethod in did document.Signer.Context
.VerifyProof
verifies that the did document's proof field was created using the specified verificationMethod in the document.Also, in the
Proof
of the document, there areDomain
andNonce
that can replace the existing sequence to prevent replay-attack.Signer.Context
before document sign, and the proof value will be generated with different value depending on these.Implementation
Remove the
signature
from the existing tx and replace it with theproof
inside the documentVerifyProof
, additional verification is implemented inVerifyDIDOwnership
.aries-framework-go
usesecdsa
key, implement conversion parts withsecp256k1
key used by panacea.Remove the
sequence
part and change to use theDomain
inside the document proofDomain
is used because it is judged that the stringDomain
is more readable than the byte arrayNonce
.Add a
Deactivated
field atDIDDocument
and simply replace the related tx.Deactivation
, since there is no document update, it is simply changed to verify only the account signature.