Make randomization of a non-signing context a noop #587

pull real-or-random wants to merge 1 commits into bitcoin-core:master from real-or-random:randomize-verification-noop changing 3 files +15 −6
  1. real-or-random commented at 12:34 PM on January 27, 2019: contributor

    Before this commit secp256k1_context_randomize called illegal_callback when called on a context not initialized for signing. This is not documented. Moreover, it is not desirable because non-signing contexts may use randomization in the future.

    This commit makes secp256k1_context_randomize a noop in this case. This is safe because the context cannot be used for signing anyway.

    This fixes #573 and it fixes rust-bitcoin/rust-secp256k1#82.

  2. Make randomization of a non-signing context a noop
    Before this commit secp256k1_context_randomize called illegal_callback
    when called on a context not initialized for signing. This is not
    documented. Moreover, it is not desirable because non-signing contexts
    may use randomization in the future.
    
    This commit makes secp256k1_context_randomize a noop in this case. This
    is safe because the context cannot be used for signing anyway.
    
    This fixes #573 and it fixes rust-bitcoin/rust-secp256k1#82.
    6198375218
  3. gmaxwell commented at 2:54 AM on February 2, 2019: contributor

    I guess this seems reasonable to me. The only concern I have is minor: if someone has a signing and verifying context, this makes it easier to randomize the wrong one.

  4. sipa commented at 10:33 PM on February 4, 2019: contributor

    utACK 6198375218b8132f016b701ef049fb295ca28c95

  5. jonasnick commented at 10:04 AM on February 5, 2019: contributor

    Was about to NACK this PR because being explicit is better in general. However, if verification contexts can be randomized in the future, it's better to start allow to randomizing everything always.

    ACK 6198375218b8132f016b701ef049fb295ca28c95

  6. gmaxwell commented at 4:32 AM on February 21, 2019: contributor

    ACK

  7. gmaxwell merged this on Feb 21, 2019
  8. gmaxwell closed this on Feb 21, 2019

  9. gmaxwell referenced this in commit e96901a4b9 on Feb 21, 2019
  10. real-or-random cross-referenced this on Apr 1, 2019 from issue Changes necessary for usage on Trezor by real-or-random

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-01 14:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me