-
Notifications
You must be signed in to change notification settings - Fork 7
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
ecdsa-jcs-2019 Signature encoding / verification #1
Comments
I'm not seeing any obvious issues with the signature decoding, it looks like SetBytes expects big-endian format and that is the expected format. Maybe it's an issue with the public key encoding. In any case, P-384 isn't actually supported in the current specification (although this implementation still allows it) so you might just want to focus on Ed25519 support. |
And to be clear — the DIDDoc that is published using did:tdw can support any key types needed by the DID Controller. It’s the signature in the DI Proof on the DID Log Entry that is currently only supporting the @andrewwhitehead — I don’t think there is anything in the spec that says anything about limiting the public key types to Ed25519. It just says that |
Hm, I thought we had resolved to just use Ed25519 for now. Currently the |
Hmm…I got the sample proofs from the Python implementation — copy paste. Checked — the spec says to use @andrewwhitehead — can you update the Python implementation and examples, and I’ll update the spec? @stevenvegt — does that answer your question? |
Yes, mostly. My I think bcgov/trustdidweb#87 can help with creating an universal test and validation suite, so we don't rely on one implementation. It still bothers me a little bit that somewhere something is broken (either my lib or the python one), but for now that has become irrelevant. Thank you both for the quick responses 👍 I will publish and open source the lib soon. If it is up to your standards feel free to add it to the list with implementations. |
Great stuff. Do you have feedback to provide on the spec? Suggestions of changes, clarifications in the spec, etc.? We will have a working group starting very soon to maintain the spec, but for now we have a Signal group of collaborators if you want to join. |
The latest sample document does have the correct cryptosuite in the DI proofs, so I think this can be closed. |
Hi 👋
I'm implementing the Trust DID Web specification in Go and using the output of this library to verify my implementation. I'm unable to verify signatures of the
ecdsa-jcs-2019
cryptosuite. Since all the other data (hashed data and public key) are equal between our libs, I suspect the perhaps encoding of the signature.This is how the VC Proof specification of the crypto suite specifies the
proofBytes
:And indeed, after the multibase decoding of the signature, the resulting
proofBytes
, has a length of 96. But if I check the FIPS 186 specification on section 6.4.1, I see the signature is a coordinate on the curve, consisting of 2 components,r
ands
. How are these encoded into the 96 byte array?The Go library has two
Verify
methods, one accepting an ASN.1 encoded structure, the other accepting ther
ands
coordinates.The
proofBytes
is not ASN.1 encoded (it would be longer than 96 bytes), so I somehow need to 'decode' it into the correct parts.The Rust lib used by this library suggest that they are just concatenated, however splitting it equally like this does not seem to work.
Do you perhaps have any pointers?
Thanks!
The text was updated successfully, but these errors were encountered: