-
Notifications
You must be signed in to change notification settings - Fork 12
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
PublicKey id length #24
Comments
this is how the method works currently... it has advantages, IMO its not worth changing. |
What's the advantages of using the full key? |
@oed makes string comparisons for keys possible. I could live with making the |
Can you elaborate on what this means? Comparing would still work if it's only the first 15 chars of the key? |
@oed https://datatracker.ietf.org/doc/html/rfc7638 TLDR ... not safe to just compare the first few character of a string in order to implement a binary quality check. |
@OR13 should be safe if you use DID + id? |
@oed not if you use relative ref ids...
|
FWIW I feel the same way as you do about this... But i think these are the only options:
|
If you see a relative ref, wouldn't it make sense to concat it with the DID? I would modify 3. above to use the last n chars (as to not include multicodec byte). I would be fine with using integer index (4) since this DID is not mutable. |
@OR13 how would you feel about a PR that introduces The old ids could be kept for backward compatibility.
|
Thanks for the header, you are proposing: {
"alg": "EdDSA",
"cap": "ipfs://bafyreicrjfqxxchdapxad2j67te3ltlgcuo3nyuwax6j2izxmbiffqawdi",
"kid": "did:key:z6MkvQizLyzkqTRyXB7bf67P7vVAYu61UzKNZDnyK6HaF5ju#z6MkvQizLyzkqTRyXB7bf67P7vVAYu61UzKNZDnyK6HaF5ju"
} be changed to: {
"alg": "EdDSA",
"cap": "ipfs://bafyreicrjfqxxchdapxad2j67te3ltlgcuo3nyuwax6j2izxmbiffqawdi",
"kid": "did:key:z6MkvQizLyzkqTRyXB7bf67P7vVAYu61UzKNZDnyK6HaF5ju#0"
} I am open to such a PR. It would be a major breaking change, and we would have to make a bunch of updates, but we are willing to do that to make the identifiers that end up in credentials shorter. However, we are not the only implementers of did:key. It's one of the most popular, if not the most popular and interoperable did method. So breaking changes may take a long time to negotiate. cc @msporny @kimdhamilton @mavarley @mprorock ... please add others to help with the discussion. |
Note that it would be possible to keep the old |
Digital Bazaar would be a -1 on this change for the following reasons:
Just signalling very early that we will be opposed to this change for architectural layering and security design reasons. |
I agree with @msporny Adding to his argument: Sending this (from @OR13's examples above) base64 encoded string: saves you about 64 bytes. We're not saving much here. Using CBOR is probably a better option for saving bytes than JSON based messages. Also a didKey is a special kind of DID document without a service bloc. Its |
Currently the id, specifically what comes after
#
, is the entire encoded public key. Is this really needed? Can they be made shorter by just using the first few characters of the pubkey?The text was updated successfully, but these errors were encountered: