w3c / vc-jose-cose

Verifiable Credentials Working Group — VC JSON Web Tokens specification
https://w3c.github.io/vc-jose-cose/
Other
30 stars 9 forks source link

Explicitly allow key format conversion #209

Closed msporny closed 6 months ago

msporny commented 7 months ago

Key format conversion is allowed in the Data Integrity specifications. It is allowable to convert from a publicKeyJwk to a publicKeyMultibase. The same is true when going in the other direction. Implementations should be allowed to do key conversion, just as implementations convert from internal byte formats or PEM to JWK and back.

selfissued commented 7 months ago

Interoperability is improved when standards make choices that all implementations conform to. This specification chooses the JWK key representation for this reason.

Yes, implementations can and will convert between key formats at will. For instance, they almost certainly have to convert a JWK to an internal format used by the underlying cryptography library they are using to call them. And yes, if they choose, they can convert between multibase (which is not a standard) and JWK internally if they have a reason to do so. Key format conversions are already allowed without us adding anything to the specification.

That's different than defining and endorsing multiple key representations in the specification, which would hurt interoperability.

msporny commented 7 months ago

And yes, if they choose, they can convert

Good, so let's state that in the specification so it's clear that the WG contemplated this and acknowledges this reality. Best be explicit about the consensus position on doing key format conversion.