Closed bnewbold closed 6 months ago
followed directly by the string encoded, un-compressed curve public key bytes... this is a different encoding from that used for did:key,
Don't do that -- you should align directly with the did:key format. :)
I had assumed that the un-compressed key format was required in a DID specification document somewhere
No, the DID specification doesn't express any requirements on key format, IIRC.
is there required multibase format?
The cryptosuite that uses the key type will define the required multibase format. For example, here's the one for Ed25519 public keys:
https://w3c.github.io/vc-di-eddsa/#multikey
and the one for ECDSA public keys:
https://w3c.github.io/vc-di-ecdsa/#multikey
One doesn't exist for k1 keys because no one has written that particular spec yet, but I'd expect it to use the bitcoin base58 header 'z' and the 0xe7
multikey header (remember to encode as a varint!) with a compressed key:
https://github.com/multiformats/multicodec/blob/master/table.csv#L92
is it ok to use the multicodec-based encoding, as used with did:key and Multikey?
Yes, in fact, the Multikey encoding of a did:key should be exactly the same. did:key uses the Multikey format.
Did that answer all of your questions @bnewbold ?
Yes, thank you for such a clear response!
This issue is fairly old and the question was answered some time ago. Seems like discussion on the issue has ended. I'm closing this issue. @bnewbold, please re-open a new issue if there is further discussion to be had.
With the
did:plc
method, we have been returningverificationMethod
objects with typeEcdsaSecp256k1VerificationKey2019
and apublicKeyMultibase
string encoding with:z
, indicating base58btc encodingThis is a different encoding from that used for
did:key
, which includes a varint multiformat table value indicating the specific key type, and compressed curve public key bytes.For example:
where the corresponding key has
did:key
format:did:key:zQ3shXjHeiBuRCKmM36cuYnm7YEMzhGnCmCyW92sRJ9pribSF
.I had assumed that the un-compressed key format was required in a DID specification document somewhere, but when I went looking just now, could find no reference in the Core 1.0 doc, https://www.w3.org/TR/did-spec-registries, Verifiable Credential Data Integrity 1.0 , etc. The last link does talk about how the
Multikey
method specifically requires apublicKeyMultibase
encoding with the multicodec included, but doesn't mention how other types likeEcdsaSecp256k1VerificationKey2019
should be encoded.This github issue is asking to clarify: is there required multibase format? is it ok to use the multicodec-based encoding, as used with
did:key
andMultikey
?