w3c / vc-data-integrity

W3C Data Integrity Specification
https://w3c.github.io/vc-data-integrity/
Other
40 stars 18 forks source link

Discrepancy Between DataIntegrityProof EdDSA `eddsa-2022` vs Crypto Suite `eddsa-rdfc-2022` Definition #221

Closed LuisOsta closed 6 months ago

LuisOsta commented 9 months ago

The Data Integrity Proof spec page shows this example - https://www.w3.org/TR/vc-data-integrity/#example-a-proof-set-in-a-data-document but the matching crypto suite mentioned for EdDSA seems to require a different cryptosuite value - https://www.w3.org/TR/vc-di-eddsa/#eddsa-rdfc-2022

Which one of these is correct? And do y'all know why there's a difference there?

dlongley commented 9 months ago

@LuisOsta,

Looks like those examples are wrong and need to be updated. We changed the cryptosuite string from eddsa-2022 to eddsa-rdfc-2022 a while back. The test suite and test vectors will be testing for eddsa-rdfc-2022 and we'll get those spec examples updated when we can.

LuisOsta commented 9 months ago

@dlongley Thanks! Can you share the link to the test suite and vectors we should be using to verify our implementations? All I've found so far is https://www.w3.org/TR/vc-di-eddsa/#test-vectors

Wind4Greg commented 9 months ago

Hi @LuisOsta those are the test vectors that we have published for EdDSA. Note that you can get the raw JSON and text files for the vectors directly from the W3C GitHub repo at: https://github.com/w3c/vc-di-eddsa/tree/main/TestVectors. Also I published the code used to generate these and ECDSA test vectors at https://github.com/Wind4Greg/EdDSA-Test-Vectors.

Cheers Greg

LuisOsta commented 9 months ago

@Wind4Greg Thanks! And Do we have test vectors or test suites for data integrity proofs more broadly? I appreciate all of the help

Wind4Greg commented 9 months ago

Hi @LuisOsta I started my test vector contributions from the "bottom up", i.e., with the specific crypto suites. For the selective disclosure stuff in ECCSA and for BBS see the spec repos and also my GitHub repo for generating the test vectors https://github.com/Wind4Greg/ECDSA-SD-TestVectors.

Note that I think there is separate test suite stuff available and maybe @dlongley can point towards that. For any issues with test vectors for the cryptosuites let me know.

Cheers Greg

LuisOsta commented 9 months ago

Awesome I'll try to integrate these test suites and I'll lyk!

msporny commented 9 months ago

@LuisOsta wrote:

Awesome I'll try to integrate these test suites and I'll lyk!

Yes! We have multiple test suites for ecdsa, eddsa, and are working on suites for ecdsa-sd and bbs:

https://w3c.github.io/vc-di-eddsa-test-suite/ https://w3c.github.io/vc-di-ecdsa-test-suite/

Instructions on how to integrate are here:

https://github.com/w3c/vc-di-eddsa-test-suite/#readme https://github.com/w3c/vc-di-ecdsa-test-suite/#readme

You can add your implementation to the list of all implementations under test right now, here:

https://github.com/w3c/vc-test-suite-implementations/#readme

/cc @BigBlueHat @aljones15 and @JSAssassin who will be able to help you further with more detailed questions, @LuisOsta.

LuisOsta commented 9 months ago

@msporny Once we realign our implementation with the new cryptosuite approach and other things we'll add our implementation to the list under test, thanks for everything!

msporny commented 6 months ago

Fixed in bf1cc602812d44c62a2fe134968e7c3e3432d725. Closing.