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

Implement Public Key Hash (PKH)-based DID Method #123

Closed
wyc opened this issue Mar 12, 2021 · 8 comments
Closed

Implement Public Key Hash (PKH)-based DID Method #123

wyc opened this issue Mar 12, 2021 · 8 comments

Comments

@wyc
Copy link
Contributor

wyc commented Mar 12, 2021

Blockchain accounts that are represented as did:tz, did:ethr, etc. have many possible resolution steps. It is not entirely fair to say that for an Address Controller credential that Temple has signed with did:tz or Metamask has signed with did:ethr if a full resolution process has not been completed. Those methods respectively have smart contracts that dictate further changes to the verification methods, service endpoints, and further DID document contents.

Therefore, I propose we implement did:pkh (Public Key Hash) which is very similar to did:key but works on the hashed public key instead. These may be further base32/base64/etc. encoded and prefixed such as in the case of a Tezos address.

Design considerations:

  • Should we use a cross-blockchain specification such as CAIP-10?
  • What about non-blockchain accounts? Should there be a toggle that allows for hex, base58, etc. encoded PKH? Perhaps use multihash or multibase for this? Is PKH even used outside of a significant number of blockchain contexts?
@agropper
Copy link

@wyc For those of us concerned with notarized auditable logs and/or non-repudiable signatures, can you describe a use-case where this would make a difference.

@wyc
Copy link
Contributor Author

wyc commented Mar 16, 2021

@agropper this will let you use a Bitcoin/Tezos/Ethereum/Solana/etc. address to create LD-Proofs, similar to did-key in that there is no supported updates to the DID document such as in did-peer, did-tezos, or did-ethr, but different in that it's the hash of the public key and not the encoded public key itself.

This can allow for simpler dependencies for implementing a notarizer because DID resolution will be fully implicit and will not require a blockchain indexer. For example, we could allow an auditor to use Metamask to sign off and persist some event, without modification of Metamask. If we were to use did:ethr instead of did:pkh, we would require that Metamask fully implement did:ethr to sign off on an event, which does not seem to be on their product roadmap.

@agropper
Copy link

agropper commented Mar 16, 2021 via email

@wyc
Copy link
Contributor Author

wyc commented Mar 16, 2021

The RS could potentially accept an additional VC that specifies a sameAs relationship cross-signed between the two DIDs with caveats. This would always need to be presented alongside the VC which has the "legacy" DID as the data subject.

@awoie
Copy link

awoie commented Mar 18, 2021

why not did:caip-xyz:blockchainAccountId?

this proposal might be similar to did:eth (not did:ethr) which is using the ethereumAddress as the identifier without going through erc1056. @mirceanis

@wyc
Copy link
Contributor Author

wyc commented Mar 18, 2021

We want to focus solely on the key material, whereas blockchainAccountId includes the chainId adding complexity. For now, we want to avoid extra surjective relationships from the DID to key material because it keeps the security model a lot simpler, e.g., did:caip10:0xab16a96d359ec26a11e2c2b3d8f8b8942d5bfcdb@eip155:1 and did:caip10:0xab16a96d359ec26a11e2c2b3d8f8b8942d5bfcdb@eip155:2 would map to the same keypair but it's not clear what the use case would be to have different DIDs.

Even if did:pkh:btc:... and did:pkh:tz:... have the same keypair mapping, the btc and tz tokens indicate the encoding scheme. We looked at multihash for this, but found it not descriptive enough to also describe the types of keys.

did:eth sounds great! Instead of also defining did:sol, did:btc (not did:btcr), etc. we thought it was cleaner to do it this way with less pollution in the namespace.

@awoie
Copy link

awoie commented Aug 9, 2021

@wyc What would be the DID Doc for a did:pkh ie a truncated secp256k1 hash aka public Ethereum address, e.g., 0xb9c5714089478a327f09197987f16f9e5d936e8a?

@wyc
Copy link
Contributor Author

wyc commented Dec 1, 2021

Hi all, please see https://github.com/spruceid/ssi/tree/main/did-pkh

@wyc wyc closed this as completed Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants