Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key agreement #75

Merged
merged 3 commits into from
Sep 22, 2023
Merged

Key agreement #75

merged 3 commits into from
Sep 22, 2023

Conversation

adewaleafolabi
Copy link
Contributor

@adewaleafolabi adewaleafolabi commented Aug 23, 2023

This PR adds the keyAgreement field to the knox go library.

Using this in the wallet produces

{
   "@context":[
      "https://www.w3.org/ns/did/v1",
      "https://w3id.org/security/suites/ed25519-2020/v1"
   ],
   "id":"z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ",
   "authentication":[
      {
         "id":"did:knox:z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ#z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ",
         "type":"Ed25519VerificationKey2020",
         "controller":"did:knox:z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ",
         "publicKeyMultibase":"z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ"
      }
   ],
   "capabilityInvocation":[
      {
         "id":"did:knox:z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ#z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ",
         "type":"Ed25519VerificationKey2020",
         "controller":"did:knox:z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ",
         "publicKeyMultibase":"z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ"
      }
   ],
   "capabilityDelegation":[
      {
         "id":"did:knox:z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ#z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ",
         "type":"Ed25519VerificationKey2020",
         "controller":"did:knox:z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ",
         "publicKeyMultibase":"z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ"
      }
   ],
   "assertionMethod":[
      {
         "id":"did:knox:z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ#z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ",
         "type":"Ed25519VerificationKey2020",
         "controller":"did:knox:z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ",
         "publicKeyMultibase":"z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ"
      }
   ],
   "keyAgreement":[
      {
         "id":"did:knox:z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ",
         "type":"X25519KeyAgreementKey2019",
         "controller":"did:knox:z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ",
         "publicKeyMultibase":"z6MkqFcAnLjLZBDym6bRHUuxDqU3NrdDui7cPwr6aM1tpMBQ"
      }
   ]
}

@fkim7
Copy link

fkim7 commented Aug 23, 2023

Can we update the desc to something about implementing https://www.w3.org/TR/did-core/#key-agreement?

Also are we expecting did test suite updates and results as well?

@LuisOsta
Copy link
Contributor

@adewaleafolabi What do you think about the testing stuff that Francis brought up?

@adewaleafolabi
Copy link
Contributor Author

@LuisOsta I can setup some preliminary tests here. We can expand that as we go

@fkim7
Copy link

fkim7 commented Aug 24, 2023

Can we update the desc to something about implementing https://www.w3.org/TR/did-core/#key-agreement?

Also are we expecting did test suite updates and results as well?

@adewaleafolabi going forward lets make sure our work passes as expected against the DID test suite as well so we know what we delivered is correct and spec compliant.

@fkim7
Copy link

fkim7 commented Aug 25, 2023

FYI just realized this PR belongs to ticket https://github.com/knox-networks/gomono/issues/1269 instead - updating

Copy link

@fkim7 fkim7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please attach did test suite results

@adewaleafolabi
Copy link
Contributor Author

Did test suite passed

image

@adewaleafolabi adewaleafolabi removed the request for review from fkim7 September 21, 2023 18:21
@adewaleafolabi adewaleafolabi merged commit 6624d4c into main Sep 22, 2023
2 checks passed
@adewaleafolabi adewaleafolabi deleted the key-agreement branch September 22, 2023 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants