Skip to content
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

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

Open
sbellem opened this issue Jun 9, 2017 · 1 comment
Open

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

sbellem opened this issue Jun 9, 2017 · 1 comment

Comments

@sbellem
Copy link
Collaborator

sbellem commented Jun 9, 2017

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 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:

  • For signature-based types: generate the signature and check that it matches the given signature.

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
Copy link
Contributor

Wouldn't this be covered implicitly by:

Parse fulfillment and validate, should return true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants