-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Description
The DIDDoc returned from .resolve of the did_resolver_sov crate does not have verification methods set in line with the spec.
My reading of the spec is that you're meant to do the following for verification methods:
- read ledger for NYM
- add 2 default keys to
verificationMethodarray:did:sov:...#key-1&did:sov:...#key-agreement-1 - add
did:sov:...#key-1as a reference in theauthenticationandassertionMethodarrays - add
did:sov:...#key-agreement-1as a reference in thekeyAgreementarray
e.g.:
{
...,
"id": "did:sov:HR6vs6GEZ8rHaVgjg2WodM",
"verificationMethod": [
{
"type": "Ed25519VerificationKey2018",
"id": "did:sov:HR6vs6GEZ8rHaVgjg2WodM#key-1",
"publicKeyBase58": "9wvq2i4xUa5umXoThe83CDgx1e5bsjZKJL4DEWvTP9qe"
},
{
"type": "X25519KeyAgreementKey2019",
"id": "did:sov:HR6vs6GEZ8rHaVgjg2WodM#key-agreement-1",
"publicKeyBase58": "3mHtKcQFEzqeUcnce5BAuzAgLEbqKaV542pUf9xQ5Pf8"
}
],
"authentication": [
"did:sov:HR6vs6GEZ8rHaVgjg2WodM#key-1"
],
"assertionMethod": [
"did:sov:HR6vs6GEZ8rHaVgjg2WodM#key-1"
],
"keyAgreement": [
"did:sov:HR6vs6GEZ8rHaVgjg2WodM#key-agreement-1"
],
}
Whereas we are returning:
{
...,
"id": "did:sov:E8GUCXah1MrW4NtxRxiDzt",
"verificationMethod": [
{
"id": "did:sov:E8GUCXah1MrW4NtxRxiDzt",
"controller": "did:sov:E8GUCXah1MrW4NtxRxiDzt",
"type": "Ed25519VerificationKey2018",
"publicKeyBase58": "89v9CRHEtKigUj6H4uPjc7pZ6H8RUvawp7zdD6iyyff7"
}
],
}
Also note that this is a somewhat trivial fix, other than computing the #key-agreement-1 key. That will require a cryptographic conversion from the Ed25519 base58 pubkey to X25519 base58 pubkey
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels