v3: Update test vectors with normalized S value sigs #130
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #122
Before this change, we had the signatures generated by
v3.public
be tested to be reproducible. Such that we given the same input could generate the same token. This is possible because we employ deterministic nonces.New test vectors for
v3.public
have been issued (https://github.com/paseto-standard/test-vectors/releases/tag/v1.3.0) to only include low-S/normalized S. These test vectors we can't reproduce the tokens for, and thus that part of the tests have been removed. Justification of removal:pasetors
uses, but encourages it: https://github.com/paseto-standard/paseto-spec/blob/master/docs/01-Protocol-Versions/Version3.md#sign This is what enabled us to perform the reproducebility tests in the first place. Since it isn't a requirement, we won't be incompatible with the spec when not testing for this (other impls cannot be expected to be deterministic for example).v3.public
into consideration.Note: During tests with the new vectors and using
elliptic-curve
's providednormalize_s()
internally for the signature, didn't reproduce either, suggesting maybe the new test vectors were generated non-deterministically or the normalization routine used in generation of them differed somehow.