- From: Nikos Fotiou <fotiou@aueb.gr>
- Date: Fri, 12 Mar 2021 12:33:30 +0200
- To: "'Brent Shambaugh'" <brent.shambaugh@gmail.com>, "'Credentials Community Group'" <public-credentials@w3.org>
- Message-ID: <007701d7172b$25720160$70560420$@aueb.gr>
I believe what you are making in publicHexKeyToDIDKey is correct: convert your key to byte array, convert they byte array to base58 and prefix it with zru (the last part is done in lines 17,18) You can also find some test vectors here https://github.com/transmute-industries/did-key.js/tree/master/packages/test-vectors Best, Nikos -- Nikos Fotiou - <http://pages.cs.aueb.gr/~fotiou> http://pages.cs.aueb.gr/~fotiou Researcher - Mobile Multimedia Laboratory Athens University of Economics and Business https://mm.aueb.gr From: Brent Shambaugh <brent.shambaugh@gmail.com> Sent: Friday, March 12, 2021 5:46 AM To: Credentials Community Group <public-credentials@w3.org> Subject: Building a did:key document with a publicKeyJwk Dear all, I am building a did:key document. The base64url for multibase puts a u prefix in front. In my publicKeyJwk I keep the prefix for the x and y coordinates of the key. I've attached some scratch code. <https://gist.github.com/bshambaugh/0996f89023b54aababe1d5ff48a6ca2b> https://gist.github.com/bshambaugh/0996f89023b54aababe1d5ff48a6ca2b Would it be correct, or incorrect to remove the prefix? I am not sure what to make of RFC7518. Perhaps since the example with P-256 <https://w3c-ccg.github.io/lds-jws2020/> https://w3c-ccg.github.io/lds-jws2020/ is missing the prefix u from <https://github.com/multiformats/multibase> https://github.com/multiformats/multibase I need to remove it. Thanks, Brent
Attachments
- application/pkcs7-signature attachment: smime.p7s
Received on Friday, 12 March 2021 10:33:50 UTC