Sunday, January 3, 2021

DID document to try

 DID document to try:

{
  "@context": "https://www.w3.org/ns/did/v1",
  "id": "did:example:F9C36F8964623378BDC068D4BCE07ED17C8FA486F9AC0C2613CA3C8C306D7BB6",
  "authentication": [{
    


    "id": "did:example:F9C36F8964623378BDC068D4BCE07ED17C8FA486F9AC0C2613CA3C8C306D7BB#keys-1",
    "type": "JsonWebKey2020",
    "controller": "did:example:F9C36F8964623378BDC068D4BCE07ED17C8FA486F9AC0C2613CA3C8C306D7BB6",
     "publicKeyJwk": {
        "kty": "EC",
        "crv": "P-256",
        "x": "F9C36F8964623378BDC068D4BCE07ED17C8FA486F9AC0C2613CA3C8C306D7BB6",
        "y": "1CD36717B8AC5E4FEA8AD23DC8D0783C2318EE4AD7A80DB6E0026AD0B072A24F"
    }
  }],
  "service": [{
    
    "id":"did:example:F9C36F8964623378BDC068D4BCE07ED17C8FA486F9AC0C2613CA3C8C306D7BB#vcss",
    "type": "VerifiableCredentialService",
    "serviceEndpoint": "https://example.com/vc/"
  }]
}

Possible Workflow. Create DID document with public key,hash with sha256, sign with the private key.
Send signed DID document and unsigned DID document to register with the service endpoint. Use the DID document
to get the public key to decrypt signed messages.

-----------------------------------------------------------------------------------------------------

Create a sha256 hash of this DID document. Sign the sha256 hash with the private key.
Compare the unsigned hash with the signed hash. (like you did with the message).
Figure out DLT later. I am not sure why BigChainDB isn't working.

References: https://www.youtube.com/watch?v=Uu651GJ5YY0
(Adventures in Self-Sovereign Identity: From...- June 28 | Identiverse 2019)

Can I advertise my DID with the device to look up my public key? Is that how it works?


Can I list my DID based on a P-256 key on a public ledger created with Ed25519 keys?

Perhaps it looks like this:

{
  "@context": "https://www.w3.org/ns/did/v1",
  "id": "did:example:F9C36F8964623378BDC068D4BCE07ED17C8FA486F9AC0C2613CA3C8C306D7BB6",
  "authentication": [{
    "id": "did:example:F9C36F8964623378BDC068D4BCE07ED17C8FA486F9AC0C2613CA3C8C306D7BB#keys-1",
    "type": "JsonWebKey2020",
    "controller": "did:example:F9C36F8964623378BDC068D4BCE07ED17C8FA486F9AC0C2613CA3C8C306D7BB6",
     "publicKeyJwk": {
        "kty": "EC",
        "crv": "P-256",
        "x": "F9C36F8964623378BDC068D4BCE07ED17C8FA486F9AC0C2613CA3C8C306D7BB6",
        "y": "1CD36717B8AC5E4FEA8AD23DC8D0783C2318EE4AD7A80DB6E0026AD0B072A24F"
    }
  }],
  "verificationMethod": [{
    "id": "did:example:F9C36F8964623378BDC068D4BCE07ED17C8FA486F9AC0C2613CA3C8C306D7BB6#keys-2",
    "type": "Ed25519VerificationKey2018",
    "controller": "did:example:F9C36F8964623378BDC068D4BCE07ED17C8FA486F9AC0C2613CA3C8C306D7BB6",
    "publicKeyBase58": "H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"
  }],
  "service": [{
    
    "id":"did:example:F9C36F8964623378BDC068D4BCE07ED17C8FA486F9AC0C2613CA3C8C306D7BB#vcss",
    "type": "VerifiableCredentialService",
    "serviceEndpoint": "https://example.com/vc/"
  }]
}

Possible Workflow. Request Ed25519 key from another device, Put Ed25519 key in DID document along with P-256 key.
Sign the document with P-256 private key in program on edge device. Put the DID document on ledger with the Ed25519 key.

No comments:

Post a Comment