MicroStrategy / did-btc-spec

did:btc Method Specification
https://microstrategy.github.io/did-btc-spec/
43 stars 12 forks source link

Confirming publicKeyMultibase originated from ed25519PubKey #21

Open andrewlunde opened 1 month ago

andrewlunde commented 1 month ago

While I understand that only the holder of the ed25519 private key would be able to sign a message that could be verified by the corresponding ed25519 public key, I would like to confirm that the didDocument retrieved from the blockchain was in fact created with the particular ed25519 public key.

Can the verificationMethod[0].publicKeyMultibase be decoded in some way as to reveal the ed25519 public key?

didDocument: {
  "@context": [
    "https://www.w3.org/ns/did/v1",
    "https://w3id.org/security/multikey/v1"
  ],
...
    {
...
      "publicKeyMultibase": "z2bK9Bq1zYQ5YQd8d5PcQNnoYBYudbAMo5gTQ9Vf6Jd6nM4vjDAfdt2ieG7RZ2AfGdXE6C45NZhTWUqjcgpExccrEMzF"
    }
  ],
...
}

Or can we apply the same encodings to the didID and pubKey to produce the publicKeyMultibase and compare that with the one found in the resulting didDoc?

This seems to be the best ability to prove the verifiably of the didID without having to explicitly challenge the private key holder.