Fix overflow handling for private key loading #34558

pull gzJx0DuTRHytnHe7P5RmMbPf3wKy2BztweVGXTf wants to merge 1 commits into bitcoin:master from Bitcoin-Cypherpunk:master changing 1 files +1 −1
  1. gzJx0DuTRHytnHe7P5RmMbPf3wKy2BztweVGXTf commented at 1:04 pm on February 11, 2026: none

    This pull request makes a small but important change to the handling of invalid private keys in the secp256k1_ellswift_xdh function. The update ensures that the overflow flag properly reflects both cases: when the scalar is invalid due to overflow and when it is zero.

    • Improved private key validation logic: The overflow check now combines both overflow and zero checks using a bitwise OR, ensuring that invalid keys are consistently replaced with a safe default. (src/secp256k1/src/modules/ellswift/main_impl.h, src/secp256k1/src/modules/ellswift/main_impl.hL567-R567)
  2. Fix overflow handling for private key loading b3f70a5ead
  3. DrahtBot commented at 1:05 pm on February 11, 2026: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  4. fanquake commented at 1:38 pm on February 11, 2026: member
    Changes to subtrees should be opened against that repo. i.e https://github.com/bitcoin-core/secp256k1
  5. fanquake closed this on Feb 11, 2026


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-02-17 06:13 UTC

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