doc: mention ctx requirement for _ellswift_create (not secp256k1_context_static) #1737

pull theStack wants to merge 1 commits into bitcoin-core:master from theStack:doc-ctx-requirement-for-ellswift_create changing 1 files +1 −1
  1. theStack commented at 5:27 pm on September 5, 2025: contributor

    Public functions that require a context for generator point multiplication (i.e. ctx->ecmult_gen_ctx is built) usually denote this in the API header by mentioning to not use secp256k1_context_static, so add this for _ellswift_create as well. This seems the only instance where this is missing currently, see

    0$ git grep ecmult_gen_context_is_built
    1$ git grep ctx:.*context_static
    

    (note that in the musig and schnorr modules, two public functions for nonce generation / signing map to a single internal function where the context requirement is checked).

    Noted while reviewing #1698.

  2. doc: mention ctx requirement for `_ellswift_create` (not secp256k1_context_static) 806de38bfc
  3. jonasnick approved
  4. jonasnick commented at 5:55 pm on September 5, 2025: contributor
    ACK 806de38bfc24b481c5858f1df011eb909208a674
  5. sipa commented at 5:56 pm on September 6, 2025: contributor
    Why “(not secp256k1_context_static)”?
  6. jonasnick commented at 8:14 am on September 7, 2025: contributor
    @sipa Because ellswift_create requires the ecmult_gen_context to be built, which is not the case for the static context. The wording “(not secp256k1_context_static)” is consistent with the other functions that have the same requirement on the context.
  7. real-or-random approved
  8. real-or-random commented at 7:43 am on September 8, 2025: contributor
    ACK 806de38bfc24b481c5858f1df011eb909208a674
  9. real-or-random added the label user-documentation on Sep 8, 2025
  10. real-or-random added the label tweak/refactor on Sep 8, 2025
  11. josibake commented at 9:26 am on September 8, 2025: member

    ACK https://github.com/bitcoin-core/secp256k1/pull/1737/commits/806de38bfc24b481c5858f1df011eb909208a674

    Did a quick grep to verify this wording matches the wording used in other places, and in general agree we should consistently document this for functions that won’t work with the static context.

  12. sipa commented at 2:34 pm on September 8, 2025: contributor
    ACK 806de38bfc24b481c5858f1df011eb909208a674
  13. real-or-random merged this on Sep 8, 2025
  14. real-or-random closed this on Sep 8, 2025


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: 2025-09-18 02:15 UTC

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