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

Library needs to implement Options from did:key v0.7 spec #48

Open
aljones15 opened this issue Aug 9, 2022 · 0 comments
Open

Library needs to implement Options from did:key v0.7 spec #48

aljones15 opened this issue Aug 9, 2022 · 0 comments
Assignees

Comments

@aljones15
Copy link

The did:key 0.7 spec introduces some options (with defaults) in the document creation algorithm.

The options are:

  • publicKeyFormat (should be multiKey or Ed25519VerificationKey2020)
  • enableExperimentalPublicKeyTypes (defaults to false)
  • defaultContext (defaults to [https://www.w3.org/ns/did/v1])
  • enableEncryptionKeyDerivation (should be true to enable keyAgreementKey )

These options should be passed in on didDocument creation regardless of if creating from from privateKey or publicKey seed.

These options also have some validation rules behind them:

  • If publicKeyFormat is not known to the implementation, an unsupportedPublicKeyType error MUST be raised.
  • If options.enableExperimentalPublicKeyTypes is set to false and publicKeyFormat is not Multikey, JsonWebKey2020, or Ed25519VerificationKey2020, an invalidPublicKeyType error MUST be raised.
  • If options.enableExperimentalPublicKeyTypes is set to false and publicKeyFormat is not Multikey, JsonWebKey2020, or X25519KeyAgreementKey2020, an invalidPublicKeyType error MUST be raised.
@aljones15 aljones15 self-assigned this Aug 9, 2022
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

No branches or pull requests

1 participant