w3c / vc-di-ecdsa-test-suite

Interoperability Test Suite for Data Integrity Ecdsa Signatures.
https://w3c.github.io/vc-di-ecdsa-test-suite/
BSD 3-Clause "New" or "Revised" License
5 stars 6 forks source link

ECDSA-SD-2023: empty mandatory and selective pointers tests #46

Open filip26 opened 6 months ago

filip26 commented 6 months ago

Hi, please consider testing corner cases when pointers are empty/null. The tests could show real maturity/stability of an implementation.

  1. Issuer.sign - empty/null mandatory pointers An implementation should return a base proof with no mandatory/always disclosed/ data.

  2. Holder.derive - base proof from 1. + empty/null selective pointers An implementation should fail, as there is nothing to disclose. @Wind4Greg please can you confirm? Thank you!

  3. Holder.derive - base having mandatory pointers + empty/null selective pointers An implementation should return a derived proof disclosing only mandatory data.

Wind4Greg commented 6 months ago

@filip26 good cases. I think you found an error in my server side checks. I was rejecting the case with nothing selected but forgot that there could be mandatory reveal information.

I've gotten some requests to update the spec test vectors with something a bit more relevant than fictional windsurfing races. Also the longer test cases from @aljones15 helped me find a bug in my primitives so I'm going to try to come up with something more relevant for the spec and something longer and a bit more realistic for adding here. Ideas are welcome.

aljones15 commented 6 months ago

@filip26 I'm not aware of a normative statement for empty mandatoryPointers and selectiveDisclosure in the spec, but this is a good idea.