tests: SHA-256 override use is unchecked for explicit callbacks and randomization #2005

pull l0rinc wants to merge 1 commits into bitcoin-core:master from l0rinc:l0rinc/hashctx-override-callers-upstream-20261117 changing 2 files +16 −2
  1. l0rinc commented at 1:14 PM on November 17, 2026: contributor

    Problem: The SHA-256 override tests added in #1777 check ECDSA and ECDH when the nonce or hash function pointer is NULL. A [review comment on #1900](https://github.com/bitcoin-core/secp256k1/pull/1900#discussion_r3673085176) identified explicit pointers to the built-in functions as a separate context-aware route, which #1900 then fixed. The probes still do not exercise that route, and the setter test does not check context randomization.

    Fix: Extend the existing ECDSA and ECDH probes to require that explicit built-in callbacks invoke the override and produce exactly the same output as the NULL callback route. Check that context randomization invokes the installed compressor.

  2. tests: cover more SHA-256 override routes
    The existing probes check SHA-256 override use when ECDSA and ECDH receive NULL callback pointers.
    They miss the explicit built-in pointer routes and context randomization.
    Require the explicit-pointer routes to call the override and match the NULL-pointer output, and require context randomization to call the override.
    f5196e6a8f
  3. real-or-random commented at 3:55 PM on November 17, 2026: contributor

    cc @furszy

  4. real-or-random added the label assurance on Nov 17, 2026
  5. real-or-random added the label tweak/refactor on Nov 17, 2026

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-11-21 14:15 UTC

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