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

[bug] did-provider-key is creating unusual DIDs for Secp256k1 keys #1213

Closed
mirceanis opened this issue Aug 4, 2023 · 0 comments · Fixed by #1217
Closed

[bug] did-provider-key is creating unusual DIDs for Secp256k1 keys #1213

mirceanis opened this issue Aug 4, 2023 · 0 comments · Fixed by #1217
Labels
bug Something isn't working

Comments

@mirceanis
Copy link
Member

Bug severity
3

Describe the bug
The @veramo/did-provider-key package is creating unusual keys, starting with did:key:z7r8... instead of did:key:zQ3s...

To Reproduce

const identifier = agent.didManagerCreate({provider: 'did:key', options: { keyType: 'Secp256k1'}})
console.log(identifier.did)
// prints did:key:z7r8...

agent.resolveDid({didUrl: identifier.did})
// throws unsupported key type

Details
Some DID resolvers, including the one provided in @veramo/did-provider-key fail to resolve these DIDs since they match by prefix.
This seems to be caused by the fact that the Secp256k1 keys internally managed by Veramo (in kms-local) are uncompressed.

Versions (please complete the following information):

  • Veramo: 5.4.1 (but this probably applies to all previous versions that implement the did:key provider)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant