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

Any reason toKeyPair on blsKey dont return an full ID? #103

Open
vongohren opened this issue May 7, 2021 · 2 comments
Open

Any reason toKeyPair on blsKey dont return an full ID? #103

vongohren opened this issue May 7, 2021 · 2 comments

Comments

@vongohren
Copy link
Contributor

https://github.com/transmute-industries/did-key.js/blob/master/packages/bls12381/src/Bls12381G2KeyPair.ts#L94

Im using this lib to generate a key to be used towards mattrs json-ld bbs signature.

We ended up having to do this little magic: https://gist.github.com/S3bb1/ddd74704c0f9980d93e4e6302439594c#file-index-js-L54 to get the JSON LD to work.

Or is it something we are missing that we do wrong?

In this gist we convert the buffer to bs58, but toKeyPair does that for us. So using that method in the updated version. But I still have to update the ID for things to work. Could not toKeyPair just return a different ID, or where are things going wrong in the loop.

I have another issue going over at mattr: mattrglobal/jsonld-signatures-bbs#122

@OR13
Copy link
Member

OR13 commented Jun 6, 2021

@vongohren yea... this is related to the relative refs, debate... see

w3c-ccg/did-method-key#36 (comment)

TL;DR ... relative ref ids are terrible.... for exactly the reason you have indicated...

we have similar code all over the place... and we are convinced that relative refs are terrible, especially if you are doing linked data operations often (which we are).

The next versions of all our key pair classes and did key will use absolute IRIs everywhere.

@vongohren
Copy link
Contributor Author

@OR13 thanks for pointing this out. Then atleast im not the crazy one. We will see where this goes then!

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

2 participants