rfcs / crypto-conditions

Composable cryptographic conditionals (signatures, hashes)
https://tools.ietf.org/html/draft-thomas-crypto-conditions-03
22 stars 12 forks source link

[test vectors] Should generated signatures be tested? #15

Open sbellem opened 7 years ago

sbellem commented 7 years ago

NOTE: The answer is obviously yes, but what I wonder is whether it should be added to the existing list under https://github.com/rfcs/crypto-conditions#test-vectors

See https://github.com/rfcs/crypto-conditions/compare/master...sbellem:test-vectors-signatures#diff-04c6e90faac2675aa89e2176d2eec7d8R35 for example.

The current list of things to test against the test vector does not include signing (for signature-based types: rsa & ed25519).

For example, if an implementation solely relies on the proposed list of things to test against the test vectors, the signature operation is simply untested. That is, the code of the signature operation is not executed at all during the test run.

We could add something like so to the existing list:

If that makes sense, I can create a PR for it.

One important detail

The test vectors should include the required secret information (e.g. private key for ed25519). This information is currently not in the test vectors but can be found under https://github.com/rfcs/crypto-conditions/tree/master/src/tests. For example, for the minimal ed25519 test vector, it is here: https://github.com/rfcs/crypto-conditions/blob/master/src/tests/minimal.js#L31

adrianhopebailie commented 6 years ago

Wouldn't this be covered implicitly by:

Parse fulfillment and validate, should return true.