Wrong documentation for secp256k1_ec_seckey_tweak_add #1322

issue MatthewLM opened this issue on May 23, 2023
  1. MatthewLM commented at 4:58 PM on May 23, 2023: none

    The documentation for secp256k1_ec_seckey_tweak_add states that If the tweak is invalid according to secp256k1_ec_seckey_verify, this function returns 0. However if tweak32 is zero, it will not produce an error unlike the tests in secp256k1_ec_seckey_verify so this is incorrect. It only produces an error on an overflow.

    Either it should test for zero, or the documentation should be changed. A zero scalar results in the same private key. I'm not sure if allowing a zero scalar is sensible or not.

  2. jonasnick cross-referenced this on May 23, 2023 from issue tweak_add: fix API doc for tweak=0 by jonasnick
  3. jonasnick closed this on Jul 3, 2023


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-04-18 21:15 UTC

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