Did-core: publicKeyJwk, publicKeyHex, publicKeyBase64, publicKeyBase58 missing from context.

Created on 20 Sep 2019  路  18Comments  路  Source: w3c/did-core

@OR13 moved from CCG (https://github.com/w3c-ccg/did-spec/issues/152)

discuss extensibility high priority

Most helpful comment

The publicKeyHex, publicKeyBase64, and publicKeyBase58 structures are duplicative representations of the same information. Having more than one way to do things will inevitably create interop problems, as developers will only build the ones that they think they need at present. And these sets will differ between implementations and deployments.

It should be no surprise that I'd advocate replacing all of them with JWK, since it's already a widely-implemented JSON-based standard. That would increase interoperability and reduce unnecessary code fragmentation and bloat.

All 18 comments

I suggest hosting the JSON-LD Contexts and their human readable documentation under this github repo, so that contributors can open a single PR to fix both human and machine readable spec's related to DID security.

Security and usability issues arise when documentation becomes out of date and JSON-LD context resolution spans many domains controlled by various 3rd parties.

This issue is related to #55 . Support for ethereumAddress is also missing.

Also related to #67

The publicKeyHex, publicKeyBase64, and publicKeyBase58 structures are duplicative representations of the same information. Having more than one way to do things will inevitably create interop problems, as developers will only build the ones that they think they need at present. And these sets will differ between implementations and deployments.

It should be no surprise that I'd advocate replacing all of them with JWK, since it's already a widely-implemented JSON-based standard. That would increase interoperability and reduce unnecessary code fragmentation and bloat.

I suggest hosting the JSON-LD Contexts and their human readable documentation under this github repo

Tagging @OR13 since he could close this issue out by putting in a PR for an experimental Ethereum @context hosted in the /contexts/ directory of this repo... that is then added to the did-core-registry for publicKeyHex. We should have publicKeyJwk and publicKeyBase58 in the core context and not have publicKeyBase64 anywhere (as it's used in publicKeyJwk and we don't have to define it for its use there)

I'm a bit confused about what goes in what repo now... shouldn't the context and schema definitions go in the registry repo?

publicKeyHex blocked, but we will probably just define that in the next did spec registries updates.

I'm not sure of the consensus around which of these will be defined in the DID Core spec. I think publicKeyJwk and publicKeyBase58 for sure? Any not in the Core Spec will be added to the Registries (linking to external specs and contexts). I can PR to add the agreed ones to the Core context and to the spec (#281) when there's a definitive answer.

I think publicKeyJwk and publicKeyBase58 for sure?

Correct.

The only issue with publicKeyBase58 might be pointing to a normative spec. We can get around that by not making any normative statements on what the expected encoding is. We may want to try to say something like using the "Base58 Bitcoin alphabet"... or referring to the I-D at IETF.

Any not in the Core Spec will be added to the Registries (linking to external specs and contexts).

Yep, exactly.

I found that publicKeyHex was already defined in the did-spec-registries, so wasn't sure what the best approach for context definitions would be. Looking to get it added to the CCG security-vocab as well soon.

Yes, we need publicKeyHex to be defined in security-vocab jsonld and the html documentation which the jsonld contexts reference.. we have an open PR for the HTML we need context update in the W3C CCG

Suggest closing, we have this in the spec registries.

recommend opening a new issue remove 'publicKeyPem`.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shigeya picture shigeya  路  4Comments

selfissued picture selfissued  路  6Comments

rhiaro picture rhiaro  路  3Comments

brentzundel picture brentzundel  路  6Comments

brentzundel picture brentzundel  路  7Comments