Closed OR13 closed 3 years ago
In order to discourage forks / implementations of did:key that are identical in every way but key representation, support for key transformation SHOULD be provided by the did key resolver, and they spec should call this out directly.
https://github.com/decentralized-identity/did-spec-extensions/blob/master/parameters/transform-keys.md
This would allow a did key to produce a JWK directly =>
did:key:z6Mkf5rGMoatrSj1f4CyvuHBeXJELe9RPdzo2PKGNCKVtZxP?transform-keys=jwk { crv: 'Ed25519', kid: 'ovsDKYBjFemIy8DVhc-w2LSi8CvXMw2AYDzHj04yxkc', kty: 'OKP', x: 'CV-aGlld3nVdgnhoZK0D36Wk-9aIMlZjZOK2XhPMnkQ', kid: 'did:key:z6Mkf5rGMoatrSj1f4CyvuHBeXJELe9RPdzo2PKGNCKVtZxP#z6Mkf5rGMoatrSj1f4CyvuHBeXJELe9RPdzo2PKGNCKVtZxP' }
Or a JWKs =>
did:key:z6Mkf5rGMoatrSj1f4CyvuHBeXJELe9RPdzo2PKGNCKVtZxP?transform-keys=jwks [{ crv: 'Ed25519', kid: 'ovsDKYBjFemIy8DVhc-w2LSi8CvXMw2AYDzHj04yxkc', kty: 'OKP', x: 'CV-aGlld3nVdgnhoZK0D36Wk-9aIMlZjZOK2XhPMnkQ', kid: 'did:key:z6Mkf5rGMoatrSj1f4CyvuHBeXJELe9RPdzo2PKGNCKVtZxP#z6Mkf5rGMoatrSj1f4CyvuHBeXJELe9RPdzo2PKGNCKVtZxP' },{ kty: 'OKP', crv: 'X25519', x: 'pE_mG098rdQjY3MKK2D5SUQ6ZOEW3a6Z6T7Z4SgnzCE', kid: ''did:key:z6Mkf5rGMoatrSj1f4CyvuHBeXJELe9RPdzo2PKGNCKVtZxP#z6LSnjagzhe8Df6gZmroW3wjDd7XQLwAuYfwa4ZeTBCGFoYc'', }]
just use did+json to get JWK formatted keys.
did+json
In order to discourage forks / implementations of did:key that are identical in every way but key representation, support for key transformation SHOULD be provided by the did key resolver, and they spec should call this out directly.
https://github.com/decentralized-identity/did-spec-extensions/blob/master/parameters/transform-keys.md
This would allow a did key to produce a JWK directly =>
Or a JWKs =>