From 497f60b46b243f35610f40f2e057623a4e681876 Mon Sep 17 00:00:00 2001 From: gabe Date: Tue, 14 May 2024 12:01:17 -0700 Subject: [PATCH] clarity on identity key --- impl/internal/did/pow_test.go | 2 +- spec/spec.md | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/impl/internal/did/pow_test.go b/impl/internal/did/pow_test.go index 77950a48..c8be236b 100644 --- a/impl/internal/did/pow_test.go +++ b/impl/internal/did/pow_test.go @@ -10,7 +10,7 @@ import ( func TestPOW(t *testing.T) { // Example usage of solveRetentionChallenge didIdentifier := "did:dht:test" - inputHash := "000000000000000000022be0c55caae4152d023dd57e8d63dc1a55c1f6de46e7" + inputHash := "123bcdefghobc23567822be0c55caae4152d023dd57e8d63dc1a55c1f6de46e7" // 26 leading zeros difficulty := 26 diff --git a/spec/spec.md b/spec/spec.md index 0c2c0775..5645c239 100644 --- a/spec/spec.md +++ b/spec/spec.md @@ -501,10 +501,13 @@ To create a `did:dht` document, the process is as follows: 2. Construct a conformant JSON representation of a [[ref:DID Document]]. a. The document ****MUST**** include a [Verification Method](https://www.w3.org/TR/did-core/#verification-methods) with - the [[ref:Identity Key]] encoded as a `publicKeyJwk` as per [[spec:RFC7517]] with an `id` of `0` and `type` of - `JsonWebKey` defined by [[ref:VC-JOSE-COSE]]. + the [[ref:Identity Key]]. The `id` property of this Verification Method ****MUST**** be `0` and type of `JsonWebKey` as defined + by [[ref:VC-JOSE-COSE]]. The key ****MUST**** be represented as a `publicKeyJwk` as per [[spec:RFC7517]] with a `kid` of `0`. - b. The document can include any number of other [core properties](https://www.w3.org/TR/did-core/#core-properties); + b. The [[ref:Identity Key]] ****MUST**** have the [Verification Relationships](#verification-relationships) + _Authentication_, _Assertion_, _Capability Invocation_, and _Capability Delegation_. + + c. The document can include any number of other [core properties](https://www.w3.org/TR/did-core/#core-properties); always representing key material as a `JWK` as per [[spec:RFC7517]]. In addition to the properties required by the `JWK` specification, the `alg` property ****MUST**** always be present. Default algorithms are defined per key type in the [indexed types registry](registry/index.html#indexed-types).