Skip to content

Context handling #1

Description

@scgbckbone

In current implementation both contexts (sign/verify) are created when library is initialized. They are also randomized during this phase. Then they are used all the time (without further randomization). Is this approach correct? Or should at least context_sign be randomized more frequently?

I secp256k1 all function take context as first argument. Here context cannot be passed to function as it will use the ones created at initialization phase. Should this be reworked?

If one needs to randomize (for reasons not know to me at the moment) you can import default context that is used throughout the library and randomize it:

from pysecp256k1 import context_randomize, secp256k1_context_sign
context_randomize(secp256k1_context_sign)

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions