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

Add public key examples using JWKs #171

Closed
selfissued opened this issue Jan 31, 2020 · 16 comments
Closed

Add public key examples using JWKs #171

selfissued opened this issue Jan 31, 2020 · 16 comments
Assignees
Labels
editorial Editors should update the spec then close jose Related to JOSE specifications pending close Issue will be closed shortly if no objections

Comments

@selfissued
Copy link
Contributor

Given that programmers often program to the examples, please add multiple example public keys to the examples that use JWK representations. For instance, these could be added to the "Various public keys" examples at https://w3c.github.io/did-core/#example-12-various-public-keys and https://w3c.github.io/did-core/#example-13-various-public-keys.

(At the same time, the publicKeyHex example could be removed, as there doesn't appear to be working group consensus to include it.)

@rhiaro rhiaro added the editorial Editors should update the spec then close label Feb 4, 2020
@OR13
Copy link
Contributor

OR13 commented Feb 7, 2020

Example did document:

{
  "@context": "https://identity.foundation/context/did-latest.jsonld",
  "id": "did:example:123",
  "publicKey": [
    {
      "id": "did:example:123#gb3fR275xH8I_9frTsPu4xPAvIvP_SGn0L24Ooi1TMA",
      "type": "JoseVerificationKey2020",
      "controller": "did:example:123",
      "publicKeyJwk": {
        "crv": "Ed25519",
        "x": "2xQyOeya0hhRCD4mU0p4QUoUCzlhhLZZYKBq7edP3Uk",
        "kty": "OKP",
        "kid": "gb3fR275xH8I_9frTsPu4xPAvIvP_SGn0L24Ooi1TMA"
      }
    },
    {
      "id": "did:example:123#QhxsKsp2LNvS9cNp1STyryOiOrEs6f819AGemNVN5N0",
      "type": "JoseVerificationKey2020",
      "controller": "did:example:123",
      "publicKeyJwk": {
        "crv": "secp256k1",
        "x": "JA5UfdPhdE3EdABYdSmhx06Xts7xCWOc0-zTMO-7byg",
        "y": "2ptGJHu6oSdyEMk--9yAD6okUK9h-2BU4mzyn7rDzxE",
        "kty": "EC",
        "kid": "QhxsKsp2LNvS9cNp1STyryOiOrEs6f819AGemNVN5N0"
      }
    },
    {
      "id": "did:example:123#CZAHrzBc-MUDGPTepWmKOGAjj3SituYp-jXeei2iHv4",
      "type": "JoseVerificationKey2020",
      "controller": "did:example:123",
      "publicKeyJwk": {
        "e": "AQAB",
        "n": "wtcFdcFX3zUw80ivB_GOxrupncDc474A22PVHU6S1jgv4OvHsolwRDXKyCFTJUhOVKpjwyL76bLKplAWveBu8Sdod4hxHE7ydc5N569LO4ZoktYIfEkHHCsMiLmH0Bt8o-HxBwz58ur1nJgPfmxvWF_eRr5jU3keo_cC20aT2yEKItCo8AiGEo8mpYCCZjHQpo5lE0Fgd7yvTC_O1NIrymMBLTKWe7zfRh3zHvXzCWq86idG4r6OP5_MfkwMn2owZTDDRfa38aFue2VckBzH6QlBvBm9qLq5NRf_OqBLFclQV2SK-iAxrWUDAFX-arcwpED4NHGDLQ-6aePUnbMVE9RPeDhR7BoVJaBas-NqyhmcKqb7uO4pi9PK3JNWZ2S4eM9K4FqAy3Xnji0-Q3hNSg-S-8A0mUsWTZFXj9B81ewJihopISWhuQYiU6CJIVKRPf5g9N6l7lwQzyMHTysuUkWr_c6EbsmJG3DOUkjAhrfqGkOyt78_1peBTzof7Yj2dI4bE-l_tgpbPlcchjGZnH5V6GS2FKuE9INvtn3Gllc-vPhKEZcMMBSX35RA1MI1uORANm6ps7Ryaa6GX5fqxss63kjjs4keCDEebKyzaQTwg2p18o6qHfV0HOuE2EuP2c27Uat-16mlGr70vRs35WQ563w57pfRUXvZDU52fU0",
        "kty": "RSA",
        "kid": "CZAHrzBc-MUDGPTepWmKOGAjj3SituYp-jXeei2iHv4"
      }
    },
    {
      "id": "did:example:123#x66q_lHDt3nG_MeFcEqtHYQyh49UhB25YbpGlZmSsyY",
      "type": "JoseVerificationKey2020",
      "controller": "did:example:123",
      "publicKeyJwk": {
        "crv": "P-256",
        "x": "2YvkXVqxcfo2QiykZEt0iW1zu0yGyvxLw6cNQ362srI",
        "y": "Uiab1n9HdVC23Qa70E8BEOCKABzHEAuZaraYx6KiXzI",
        "kty": "EC",
        "kid": "x66q_lHDt3nG_MeFcEqtHYQyh49UhB25YbpGlZmSsyY"
      }
    }
  ],
  "authentication": [
    "did:example:123#gb3fR275xH8I_9frTsPu4xPAvIvP_SGn0L24Ooi1TMA",
    "did:example:123#QhxsKsp2LNvS9cNp1STyryOiOrEs6f819AGemNVN5N0",
    "did:example:123#CZAHrzBc-MUDGPTepWmKOGAjj3SituYp-jXeei2iHv4",
    "did:example:123#x66q_lHDt3nG_MeFcEqtHYQyh49UhB25YbpGlZmSsyY"
  ],
  "assertionMethod": [
    "did:example:123#gb3fR275xH8I_9frTsPu4xPAvIvP_SGn0L24Ooi1TMA",
    "did:example:123#QhxsKsp2LNvS9cNp1STyryOiOrEs6f819AGemNVN5N0",
    "did:example:123#CZAHrzBc-MUDGPTepWmKOGAjj3SituYp-jXeei2iHv4",
    "did:example:123#x66q_lHDt3nG_MeFcEqtHYQyh49UhB25YbpGlZmSsyY"
  ],
  "capabilityDelegation": [
    "did:example:123#gb3fR275xH8I_9frTsPu4xPAvIvP_SGn0L24Ooi1TMA",
    "did:example:123#QhxsKsp2LNvS9cNp1STyryOiOrEs6f819AGemNVN5N0",
    "did:example:123#CZAHrzBc-MUDGPTepWmKOGAjj3SituYp-jXeei2iHv4",
    "did:example:123#x66q_lHDt3nG_MeFcEqtHYQyh49UhB25YbpGlZmSsyY"
  ],
  "capabilityInvocation": [
    "did:example:123#gb3fR275xH8I_9frTsPu4xPAvIvP_SGn0L24Ooi1TMA",
    "did:example:123#QhxsKsp2LNvS9cNp1STyryOiOrEs6f819AGemNVN5N0",
    "did:example:123#CZAHrzBc-MUDGPTepWmKOGAjj3SituYp-jXeei2iHv4",
    "did:example:123#x66q_lHDt3nG_MeFcEqtHYQyh49UhB25YbpGlZmSsyY"
  ]
}

The linked data signature key types might seem new, they are not registered anywhere yet...

We have this blog post about this stuff: https://medium.com/transmute-techtalk/linked-data-proofs-vs-jose-why-not-both-1594393418cc

https://lds.jsld.org/

Waiting for the registry stuff to get settled before trying to update it.

@OR13
Copy link
Contributor

OR13 commented Mar 10, 2020

Here is an example from the did core registry: https://w3c.github.io/did-core-registry/#ecdsasecp256k1verificationkey2019

@selfissued
Copy link
Contributor Author

We should take the referenced examples from the core registries and add them to the core spec, since it's well known that developers often code to the examples.

@selfissued
Copy link
Contributor Author

I will write a PR updating the examples to include JWK representations.

@selfissued
Copy link
Contributor Author

There's currently only one JWK example in the spec, which is for an Ed25519 key. It would be good to also add examples for RSA and P-256 keys.

@OR13
Copy link
Contributor

OR13 commented May 12, 2020

Here is an example DID Document, which could be used to add more examples:

{
  "@context": "https://www.w3.org/ns/did/v1",
  "id": "did:example:123",
  "publicKey": [
    {
      "id": "did:example:123#_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A",
      "type": "JsonWebKey",
      "controller": "did:example:123",
      "publicKeyJwk": {
        "crv": "Ed25519",
        "x": "VCpo2LMLhn6iWku8MKvSLg2ZAoC-nlOyPVQaO3FxVeQ",
        "kty": "OKP",
        "kid": "_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A"
      }
    },
    {
      "id": "did:example:123#4SZ-StXrp5Yd4_4rxHVTCYTHyt4zyPfN1fIuYsm6k3A",
      "type": "JsonWebKey",
      "controller": "did:example:123",
      "publicKeyJwk": {
        "crv": "secp256k1",
        "x": "Z4Y3NNOxv0J6tCgqOBFnHnaZhJF6LdulT7z8A-2D5_8",
        "y": "i5a2NtJoUKXkLm6q8nOEu9WOkso1Ag6FTUT6k_LMnGk",
        "kty": "EC",
        "kid": "4SZ-StXrp5Yd4_4rxHVTCYTHyt4zyPfN1fIuYsm6k3A"
      }
    },
    {
      "id": "did:example:123#n4cQ-I_WkHMcwXBJa7IHkYu8CMfdNcZKnKsOrnHLpFs",
      "type": "JsonWebKey",
      "controller": "did:example:123",
      "publicKeyJwk": {
        "e": "AQAB",
        "n": "omwsC1AqEk6whvxyOltCFWheSQvv1MExu5RLCMT4jVk9khJKv8JeMXWe3bWHatjPskdf2dlaGkW5QjtOnUKL742mvr4tCldKS3ULIaT1hJInMHHxj2gcubO6eEegACQ4QSu9LO0H-LM_L3DsRABB7Qja8HecpyuspW1Tu_DbqxcSnwendamwL52V17eKhlO4uXwv2HFlxufFHM0KmCJujIKyAxjD_m3q__IiHUVHD1tDIEvLPhG9Azsn3j95d-saIgZzPLhQFiKluGvsjrSkYU5pXVWIsV-B2jtLeeLC14XcYxWDUJ0qVopxkBvdlERcNtgF4dvW4X00EHj4vCljFw",
        "kty": "RSA",
        "kid": "n4cQ-I_WkHMcwXBJa7IHkYu8CMfdNcZKnKsOrnHLpFs"
      }
    },
    {
      "id": "did:example:123#_TKzHv2jFIyvdTGF1Dsgwngfdg3SH6TpDv0Ta1aOEkw",
      "type": "JsonWebKey",
      "controller": "did:example:123",
      "publicKeyJwk": {
        "crv": "P-256",
        "x": "38M1FDts7Oea7urmseiugGW7tWc3mLpJh6rKe7xINZ8",
        "y": "nDQW6XZ7b_u2Sy9slofYLlG03sOEoug3I0aAPQ0exs4",
        "kty": "EC",
        "kid": "_TKzHv2jFIyvdTGF1Dsgwngfdg3SH6TpDv0Ta1aOEkw"
      }
    },
    {
      "id": "did:example:123#8wgRfY3sWmzoeAL-78-oALNvNj67ZlQxd1ss_NX1hZY",
      "type": "JsonWebKey",
      "controller": "did:example:123",
      "publicKeyJwk": {
        "crv": "P-384",
        "x": "GnLl6mDti7a2VUIZP5w6pcRX8q5nvEIgB3Q_5RI2p9F_QVsaAlDN7IG68Jn0dS_F",
        "y": "jq4QoAHKiIzezDp88s_cxSPXtuXYFliuCGndgU4Qp8l91xzD1spCmFIzQgVjqvcP",
        "kty": "EC",
        "kid": "8wgRfY3sWmzoeAL-78-oALNvNj67ZlQxd1ss_NX1hZY"
      }
    },
    {
      "id": "did:example:123#NjQ6Y_ZMj6IUK_XkgCDwtKHlNTUTVjEYOWZtxhp1n-E",
      "type": "JsonWebKey",
      "controller": "did:example:123",
      "publicKeyJwk": {
        "crv": "P-521",
        "x": "AVlZG23LyXYwlbjbGPMxZbHmJpDSu-IvpuKigEN2pzgWtSo--Rwd-n78nrWnZzeDc187Ln3qHlw5LRGrX4qgLQ-y",
        "y": "ANIbFeRdPHf1WYMCUjcPz-ZhecZFybOqLIJjVOlLETH7uPlyG0gEoMWnIZXhQVypPy_HtUiUzdnSEPAylYhHBTX2",
        "kty": "EC",
        "kid": "NjQ6Y_ZMj6IUK_XkgCDwtKHlNTUTVjEYOWZtxhp1n-E"
      }
    }
  ],
  "authentication": [
    "did:example:123#_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A",
    "did:example:123#4SZ-StXrp5Yd4_4rxHVTCYTHyt4zyPfN1fIuYsm6k3A",
    "did:example:123#n4cQ-I_WkHMcwXBJa7IHkYu8CMfdNcZKnKsOrnHLpFs",
    "did:example:123#_TKzHv2jFIyvdTGF1Dsgwngfdg3SH6TpDv0Ta1aOEkw",
    "did:example:123#8wgRfY3sWmzoeAL-78-oALNvNj67ZlQxd1ss_NX1hZY",
    "did:example:123#NjQ6Y_ZMj6IUK_XkgCDwtKHlNTUTVjEYOWZtxhp1n-E"
  ],
  "assertionMethod": [
    "did:example:123#_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A",
    "did:example:123#4SZ-StXrp5Yd4_4rxHVTCYTHyt4zyPfN1fIuYsm6k3A",
    "did:example:123#n4cQ-I_WkHMcwXBJa7IHkYu8CMfdNcZKnKsOrnHLpFs",
    "did:example:123#_TKzHv2jFIyvdTGF1Dsgwngfdg3SH6TpDv0Ta1aOEkw",
    "did:example:123#8wgRfY3sWmzoeAL-78-oALNvNj67ZlQxd1ss_NX1hZY",
    "did:example:123#NjQ6Y_ZMj6IUK_XkgCDwtKHlNTUTVjEYOWZtxhp1n-E"
  ],
  "capabilityDelegation": [
    "did:example:123#_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A",
    "did:example:123#4SZ-StXrp5Yd4_4rxHVTCYTHyt4zyPfN1fIuYsm6k3A",
    "did:example:123#n4cQ-I_WkHMcwXBJa7IHkYu8CMfdNcZKnKsOrnHLpFs",
    "did:example:123#_TKzHv2jFIyvdTGF1Dsgwngfdg3SH6TpDv0Ta1aOEkw",
    "did:example:123#8wgRfY3sWmzoeAL-78-oALNvNj67ZlQxd1ss_NX1hZY",
    "did:example:123#NjQ6Y_ZMj6IUK_XkgCDwtKHlNTUTVjEYOWZtxhp1n-E"
  ],
  "capabilityInvocation": [
    "did:example:123#_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A",
    "did:example:123#4SZ-StXrp5Yd4_4rxHVTCYTHyt4zyPfN1fIuYsm6k3A",
    "did:example:123#n4cQ-I_WkHMcwXBJa7IHkYu8CMfdNcZKnKsOrnHLpFs",
    "did:example:123#_TKzHv2jFIyvdTGF1Dsgwngfdg3SH6TpDv0Ta1aOEkw",
    "did:example:123#8wgRfY3sWmzoeAL-78-oALNvNj67ZlQxd1ss_NX1hZY",
    "did:example:123#NjQ6Y_ZMj6IUK_XkgCDwtKHlNTUTVjEYOWZtxhp1n-E"
  ],
  "proof": [
    {
      "type": "JsonWebSignature2020",
      "created": "2020-02-15T17:13:18Z",
      "verificationMethod": "did:example:123#_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A",
      "proofPurpose": "assertionMethod",
      "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..Y0KqovWCPAeeFhkJxfQ22pbVl43Z7UI-X-1JX32CA9MkFHkmNprcNj9Da4Q4QOl0cY3obF8cdDRdnKr0IwNrAw"
    },
    {
      "type": "JsonWebSignature2020",
      "created": "2020-02-15T17:13:18Z",
      "verificationMethod": "did:example:123#4SZ-StXrp5Yd4_4rxHVTCYTHyt4zyPfN1fIuYsm6k3A",
      "proofPurpose": "assertionMethod",
      "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFUzI1NksifQ..It0x3nXBPRzszpBjWmAVnyNGG60a9JrFBzeUweRbZhCgZb7piyRD9o7xjUp9ZwaOtzCYjR62qLaSPt6jCMY3lg"
    },
    {
      "type": "JsonWebSignature2020",
      "created": "2020-02-15T17:13:18Z",
      "verificationMethod": "did:example:123#n4cQ-I_WkHMcwXBJa7IHkYu8CMfdNcZKnKsOrnHLpFs",
      "proofPurpose": "assertionMethod",
      "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJQUzI1NiJ9..WBMRV34Bm9BRTQtw-wlVP01y27vlbYRRv2BDfGVIjAG5GLppLfOuPOd5CmnApnVMV4Sy-2GLZMEie0qeUYwUbt9tk-euWEM3cy36iESugdEwL4GrOUUmr1YoE7ahEKn5CjPGq397V_96ljEeA5KJeV9ORro6rdk-CMMEMxCkLwgu3TFOwDMoJ7GBN3HviyNwf9MXQ3bWNwAN_TYuYXf7r8L50DAjp1mK2JdFgAc5dLbu4Jpb-qHUDyxguP0N5AeM0n-brndOlmyj8FeRe3Chj9JK8xw04HfScv0OMTNLu1QcZn32z9xytIIneo9TEnD25sEClrcNb_W6fl31wtsvdQ"
    },
    {
      "type": "JsonWebSignature2020",
      "created": "2020-02-15T17:13:18Z",
      "verificationMethod": "did:example:123#_TKzHv2jFIyvdTGF1Dsgwngfdg3SH6TpDv0Ta1aOEkw",
      "proofPurpose": "assertionMethod",
      "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFUzI1NiJ9..cfQf4j7rKwq7gbkZHOnNRYXRvTDNPeQM2UZ9cQCysV9GlgoLQ2jlM41FkJ511z2s3Li3rZy2wwq1A1-IlVbmeg"
    },
    {
      "type": "JsonWebSignature2020",
      "created": "2020-02-15T17:13:18Z",
      "verificationMethod": "did:example:123#8wgRfY3sWmzoeAL-78-oALNvNj67ZlQxd1ss_NX1hZY",
      "proofPurpose": "assertionMethod",
      "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFUzM4NCJ9..Y6Vo7QwpbvT6zUPx0hQXepVMq7pp2kHbprRoSu7dwC6OFiLdTRgRFw5CKrmIrxraraB78kuR7uSoytcHA3ZE4gTNFWx4QRBlBZw5HPoyO-crB5xKAv7Kkc7KJTJbrCnb"
    },
    {
      "type": "JsonWebSignature2020",
      "created": "2020-02-15T17:13:18Z",
      "verificationMethod": "did:example:123#NjQ6Y_ZMj6IUK_XkgCDwtKHlNTUTVjEYOWZtxhp1n-E",
      "proofPurpose": "assertionMethod",
      "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFUzUxMiJ9..ALdN7TneGKKxn8NyfVyqK1qS8j0g9-tzeKDuhJenZ6xklv_Xi5gdpbT2xhnTeDbprQxzhWajv8tZhemB18ZbAT6XAY-jrlVTJWnQW-f16v-e_nfDg9G2nLLm82BvWoketSzKNI19ZqokPWHrtI38TYjz-_TM-VddJcZG380kwgHbnBJu"
    }
  ]
}

@kdenhartog
Copy link
Member

Here is an example DID Document, which could be used to add more examples:

{
  "@context": "https://www.w3.org/ns/did/v1",
  "id": "did:example:123",
  "publicKey": [
    {
      "id": "did:example:123#_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A",
      "type": "JsonWebKey",
      "controller": "did:example:123",
      "publicKeyJwk": {
        "crv": "Ed25519",
        "x": "VCpo2LMLhn6iWku8MKvSLg2ZAoC-nlOyPVQaO3FxVeQ",
        "kty": "OKP",
        "kid": "_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A"
      }
    },
    {
      "id": "did:example:123#4SZ-StXrp5Yd4_4rxHVTCYTHyt4zyPfN1fIuYsm6k3A",
      "type": "JsonWebKey",
      "controller": "did:example:123",
      "publicKeyJwk": {
        "crv": "secp256k1",
        "x": "Z4Y3NNOxv0J6tCgqOBFnHnaZhJF6LdulT7z8A-2D5_8",
        "y": "i5a2NtJoUKXkLm6q8nOEu9WOkso1Ag6FTUT6k_LMnGk",
        "kty": "EC",
        "kid": "4SZ-StXrp5Yd4_4rxHVTCYTHyt4zyPfN1fIuYsm6k3A"
      }
    },
    {
      "id": "did:example:123#n4cQ-I_WkHMcwXBJa7IHkYu8CMfdNcZKnKsOrnHLpFs",
      "type": "JsonWebKey",
      "controller": "did:example:123",
      "publicKeyJwk": {
        "e": "AQAB",
        "n": "omwsC1AqEk6whvxyOltCFWheSQvv1MExu5RLCMT4jVk9khJKv8JeMXWe3bWHatjPskdf2dlaGkW5QjtOnUKL742mvr4tCldKS3ULIaT1hJInMHHxj2gcubO6eEegACQ4QSu9LO0H-LM_L3DsRABB7Qja8HecpyuspW1Tu_DbqxcSnwendamwL52V17eKhlO4uXwv2HFlxufFHM0KmCJujIKyAxjD_m3q__IiHUVHD1tDIEvLPhG9Azsn3j95d-saIgZzPLhQFiKluGvsjrSkYU5pXVWIsV-B2jtLeeLC14XcYxWDUJ0qVopxkBvdlERcNtgF4dvW4X00EHj4vCljFw",
        "kty": "RSA",
        "kid": "n4cQ-I_WkHMcwXBJa7IHkYu8CMfdNcZKnKsOrnHLpFs"
      }
    },
    {
      "id": "did:example:123#_TKzHv2jFIyvdTGF1Dsgwngfdg3SH6TpDv0Ta1aOEkw",
      "type": "JsonWebKey",
      "controller": "did:example:123",
      "publicKeyJwk": {
        "crv": "P-256",
        "x": "38M1FDts7Oea7urmseiugGW7tWc3mLpJh6rKe7xINZ8",
        "y": "nDQW6XZ7b_u2Sy9slofYLlG03sOEoug3I0aAPQ0exs4",
        "kty": "EC",
        "kid": "_TKzHv2jFIyvdTGF1Dsgwngfdg3SH6TpDv0Ta1aOEkw"
      }
    },
    {
      "id": "did:example:123#8wgRfY3sWmzoeAL-78-oALNvNj67ZlQxd1ss_NX1hZY",
      "type": "JsonWebKey",
      "controller": "did:example:123",
      "publicKeyJwk": {
        "crv": "P-384",
        "x": "GnLl6mDti7a2VUIZP5w6pcRX8q5nvEIgB3Q_5RI2p9F_QVsaAlDN7IG68Jn0dS_F",
        "y": "jq4QoAHKiIzezDp88s_cxSPXtuXYFliuCGndgU4Qp8l91xzD1spCmFIzQgVjqvcP",
        "kty": "EC",
        "kid": "8wgRfY3sWmzoeAL-78-oALNvNj67ZlQxd1ss_NX1hZY"
      }
    },
    {
      "id": "did:example:123#NjQ6Y_ZMj6IUK_XkgCDwtKHlNTUTVjEYOWZtxhp1n-E",
      "type": "JsonWebKey",
      "controller": "did:example:123",
      "publicKeyJwk": {
        "crv": "P-521",
        "x": "AVlZG23LyXYwlbjbGPMxZbHmJpDSu-IvpuKigEN2pzgWtSo--Rwd-n78nrWnZzeDc187Ln3qHlw5LRGrX4qgLQ-y",
        "y": "ANIbFeRdPHf1WYMCUjcPz-ZhecZFybOqLIJjVOlLETH7uPlyG0gEoMWnIZXhQVypPy_HtUiUzdnSEPAylYhHBTX2",
        "kty": "EC",
        "kid": "NjQ6Y_ZMj6IUK_XkgCDwtKHlNTUTVjEYOWZtxhp1n-E"
      }
    }
  ],
  "authentication": [
    "did:example:123#_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A",
    "did:example:123#4SZ-StXrp5Yd4_4rxHVTCYTHyt4zyPfN1fIuYsm6k3A",
    "did:example:123#n4cQ-I_WkHMcwXBJa7IHkYu8CMfdNcZKnKsOrnHLpFs",
    "did:example:123#_TKzHv2jFIyvdTGF1Dsgwngfdg3SH6TpDv0Ta1aOEkw",
    "did:example:123#8wgRfY3sWmzoeAL-78-oALNvNj67ZlQxd1ss_NX1hZY",
    "did:example:123#NjQ6Y_ZMj6IUK_XkgCDwtKHlNTUTVjEYOWZtxhp1n-E"
  ],
  "assertionMethod": [
    "did:example:123#_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A",
    "did:example:123#4SZ-StXrp5Yd4_4rxHVTCYTHyt4zyPfN1fIuYsm6k3A",
    "did:example:123#n4cQ-I_WkHMcwXBJa7IHkYu8CMfdNcZKnKsOrnHLpFs",
    "did:example:123#_TKzHv2jFIyvdTGF1Dsgwngfdg3SH6TpDv0Ta1aOEkw",
    "did:example:123#8wgRfY3sWmzoeAL-78-oALNvNj67ZlQxd1ss_NX1hZY",
    "did:example:123#NjQ6Y_ZMj6IUK_XkgCDwtKHlNTUTVjEYOWZtxhp1n-E"
  ],
  "capabilityDelegation": [
    "did:example:123#_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A",
    "did:example:123#4SZ-StXrp5Yd4_4rxHVTCYTHyt4zyPfN1fIuYsm6k3A",
    "did:example:123#n4cQ-I_WkHMcwXBJa7IHkYu8CMfdNcZKnKsOrnHLpFs",
    "did:example:123#_TKzHv2jFIyvdTGF1Dsgwngfdg3SH6TpDv0Ta1aOEkw",
    "did:example:123#8wgRfY3sWmzoeAL-78-oALNvNj67ZlQxd1ss_NX1hZY",
    "did:example:123#NjQ6Y_ZMj6IUK_XkgCDwtKHlNTUTVjEYOWZtxhp1n-E"
  ],
  "capabilityInvocation": [
    "did:example:123#_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A",
    "did:example:123#4SZ-StXrp5Yd4_4rxHVTCYTHyt4zyPfN1fIuYsm6k3A",
    "did:example:123#n4cQ-I_WkHMcwXBJa7IHkYu8CMfdNcZKnKsOrnHLpFs",
    "did:example:123#_TKzHv2jFIyvdTGF1Dsgwngfdg3SH6TpDv0Ta1aOEkw",
    "did:example:123#8wgRfY3sWmzoeAL-78-oALNvNj67ZlQxd1ss_NX1hZY",
    "did:example:123#NjQ6Y_ZMj6IUK_XkgCDwtKHlNTUTVjEYOWZtxhp1n-E"
  ],
  "proof": [
    {
      "type": "JsonWebSignature2020",
      "created": "2020-02-15T17:13:18Z",
      "verificationMethod": "did:example:123#_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A",
      "proofPurpose": "assertionMethod",
      "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..Y0KqovWCPAeeFhkJxfQ22pbVl43Z7UI-X-1JX32CA9MkFHkmNprcNj9Da4Q4QOl0cY3obF8cdDRdnKr0IwNrAw"
    },
    {
      "type": "JsonWebSignature2020",
      "created": "2020-02-15T17:13:18Z",
      "verificationMethod": "did:example:123#4SZ-StXrp5Yd4_4rxHVTCYTHyt4zyPfN1fIuYsm6k3A",
      "proofPurpose": "assertionMethod",
      "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFUzI1NksifQ..It0x3nXBPRzszpBjWmAVnyNGG60a9JrFBzeUweRbZhCgZb7piyRD9o7xjUp9ZwaOtzCYjR62qLaSPt6jCMY3lg"
    },
    {
      "type": "JsonWebSignature2020",
      "created": "2020-02-15T17:13:18Z",
      "verificationMethod": "did:example:123#n4cQ-I_WkHMcwXBJa7IHkYu8CMfdNcZKnKsOrnHLpFs",
      "proofPurpose": "assertionMethod",
      "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJQUzI1NiJ9..WBMRV34Bm9BRTQtw-wlVP01y27vlbYRRv2BDfGVIjAG5GLppLfOuPOd5CmnApnVMV4Sy-2GLZMEie0qeUYwUbt9tk-euWEM3cy36iESugdEwL4GrOUUmr1YoE7ahEKn5CjPGq397V_96ljEeA5KJeV9ORro6rdk-CMMEMxCkLwgu3TFOwDMoJ7GBN3HviyNwf9MXQ3bWNwAN_TYuYXf7r8L50DAjp1mK2JdFgAc5dLbu4Jpb-qHUDyxguP0N5AeM0n-brndOlmyj8FeRe3Chj9JK8xw04HfScv0OMTNLu1QcZn32z9xytIIneo9TEnD25sEClrcNb_W6fl31wtsvdQ"
    },
    {
      "type": "JsonWebSignature2020",
      "created": "2020-02-15T17:13:18Z",
      "verificationMethod": "did:example:123#_TKzHv2jFIyvdTGF1Dsgwngfdg3SH6TpDv0Ta1aOEkw",
      "proofPurpose": "assertionMethod",
      "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFUzI1NiJ9..cfQf4j7rKwq7gbkZHOnNRYXRvTDNPeQM2UZ9cQCysV9GlgoLQ2jlM41FkJ511z2s3Li3rZy2wwq1A1-IlVbmeg"
    },
    {
      "type": "JsonWebSignature2020",
      "created": "2020-02-15T17:13:18Z",
      "verificationMethod": "did:example:123#8wgRfY3sWmzoeAL-78-oALNvNj67ZlQxd1ss_NX1hZY",
      "proofPurpose": "assertionMethod",
      "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFUzM4NCJ9..Y6Vo7QwpbvT6zUPx0hQXepVMq7pp2kHbprRoSu7dwC6OFiLdTRgRFw5CKrmIrxraraB78kuR7uSoytcHA3ZE4gTNFWx4QRBlBZw5HPoyO-crB5xKAv7Kkc7KJTJbrCnb"
    },
    {
      "type": "JsonWebSignature2020",
      "created": "2020-02-15T17:13:18Z",
      "verificationMethod": "did:example:123#NjQ6Y_ZMj6IUK_XkgCDwtKHlNTUTVjEYOWZtxhp1n-E",
      "proofPurpose": "assertionMethod",
      "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFUzUxMiJ9..ALdN7TneGKKxn8NyfVyqK1qS8j0g9-tzeKDuhJenZ6xklv_Xi5gdpbT2xhnTeDbprQxzhWajv8tZhemB18ZbAT6XAY-jrlVTJWnQW-f16v-e_nfDg9G2nLLm82BvWoketSzKNI19ZqokPWHrtI38TYjz-_TM-VddJcZG380kwgHbnBJu"
    }
  ]
}

@OR13 Do we want those types on JWKs to be JsonWebKey2020

@OR13
Copy link
Contributor

OR13 commented May 13, 2020

@kdenhartog I think you, me, @tplooker, @csuwildcat and potentially also @selfissued want them to be defined that way.... I know @msporny does not....

There is nothing stopping us for creating an extension that adds support for all JOSE, and sharing those definitions across did:elem, did:ion and whatever other methods want to use them.... they could also theoretically be defined in DID Core.

@msporny
Copy link
Member

msporny commented May 13, 2020

There is nothing stopping us for creating an extension that adds support for all JOSE, and sharing those definitions across did:elem, did:ion and whatever other methods want to use them.... they could also theoretically be defined in DID Core.

If you're doing this to avoid having the difficult discussion that the group needs to have regarding this cryptosuite, please don't... it's an abuse of the standardization and registry process, especially given that people will probably start using this mechanism without knowing all the ways that it can blow up in their face, especially if you guys decide to allow all sorts of terrible optionality.

Remember, that what you're calling "JsonWebKey" above is a verification method, not the expression of public key material. That is, it's a part of a (DID Document, verification relationship, verification method) tuple. It is the "verification method" part of that tuple, of which public keys are one type.

Dating the type with at least a year is a best practice in case you want to constrain future key types (or even this key type). Thinking that you're never going to have to change the rules associated with the verification method is poor planning. With all of this crypto stuff, assume that you're making a mistake and give yourself space to fix the error in the future... date stamping the time gives you a way to do this easily.

@OR13
Copy link
Contributor

OR13 commented May 13, 2020

Sorry, I missed the date part... I totally meant for it to be JsonWebKey2020.

If the goal of the verificationMethod is support everything that is a JWK... I question if it needs a date though, none of these properties are date postfixed... https://www.iana.org/assignments/jose/jose.xhtml

some of them are prohibited, others are optional, some are recommended.... the whole document has a last updated date... which if it were 6 years ago... would seem to indicate that you should not trust any of it.... the first thing I check on a repo is how many contributors, and how often are new versions published.

@msporny
Copy link
Member

msporny commented Jun 16, 2020

This needs a special topic call so we can settle on what the examples look like. We need at least @kdenhartog, @OR13, and @selfissued on that call.

@msporny msporny added the needs special call Needs a special topic call to make progress label Jun 16, 2020
@msporny msporny added the jose Related to JOSE specifications label Jun 23, 2020
@OR13
Copy link
Contributor

OR13 commented Aug 18, 2020

We had special topic call, we now just need to make sure that the verification method section of did core contains a couple JWK examples... ready for PR... examples in the thread.

@burnburn burnburn assigned OR13 and unassigned selfissued Aug 18, 2020
@msporny
Copy link
Member

msporny commented Aug 18, 2020

Pending discussion around naming, this will happen in next couple of weeks... we will get JWK examples into the spec.

@selfissued
Copy link
Contributor Author

This will be fixed by #377

@msporny msporny removed the needs special call Needs a special topic call to make progress label Sep 8, 2020
@OR13
Copy link
Contributor

OR13 commented Sep 8, 2020

Recommend closing.

@msporny msporny added the pending close Issue will be closed shortly if no objections label Sep 8, 2020
@brentzundel
Copy link
Member

No comments since marked pending close, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial Editors should update the spec then close jose Related to JOSE specifications pending close Issue will be closed shortly if no objections
Projects
None yet
Development

No branches or pull requests

6 participants