Hi,
I am looking for a precise definition of what exactly verify_strict does. I am not entirely confident in my understanding of the underlying math, but is the following sketch accurate?
- Adhere to RFC RFC8032, with the following modifications:
- In §5.1.7, step 1: reject the signature if S >= L.
- In §5.1.7, step 3: reject the signature if [8][S]B = [8]R + [8][k]A' does not hold.
This is what I get from the current doc comments. Is this alone sufficient to uniquely characterise the behaviour of verify_strict, or are there further requirements? According to the ZIP215 blogpost, there are additional sources of ambiguity:
- If the verification key is given as a byte array (as opposed to a curve point), whether its encoding is canonic.
- Whether R in the (unbatched) equality check [8][S]B = [8]R + [8][k]A' must have been encoded canonically.
How does verify_strict handle the canonicity requirements of A and R? Since from_bytes is infallible, am I right to assume that these checks are not performed?
I'd love to contribute an explicit definition to the API docs once I actually know what that definition would have to say =)
Hi,
I am looking for a precise definition of what exactly
verify_strictdoes. I am not entirely confident in my understanding of the underlying math, but is the following sketch accurate?This is what I get from the current doc comments. Is this alone sufficient to uniquely characterise the behaviour of
verify_strict, or are there further requirements? According to the ZIP215 blogpost, there are additional sources of ambiguity:How does
verify_stricthandle the canonicity requirements of A and R? Sincefrom_bytesis infallible, am I right to assume that these checks are not performed?I'd love to contribute an explicit definition to the API docs once I actually know what that definition would have to say =)