Skip to content

A self-contained definition of verify_strict #852

Description

@AljoschaMeyer

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 =)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions