Merge bitcoin-core/secp256k1#1737: doc: mention ctx requirement for _ellswift_create (not secp256k1_context_static)

806de38bfc doc: mention ctx requirement for `_ellswift_create` (not secp256k1_context_static) (Sebastian Falbesoner)

Pull request description:

  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
  ```
  $ git grep ecmult_gen_context_is_built
  $ 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.

ACKs for top commit:
  sipa:
    ACK 806de38bfc
  jonasnick:
    ACK 806de38bfc
  real-or-random:
    ACK 806de38bfc
  josibake:
    ACK 806de38bfc

Tree-SHA512: 902e9e21060e09e8e7d72fec8cdc42e0ed18f95824d3220100d7b65720511f934d38e3e556e38bb510d98284bccc12b857f329997640d1c07edd5b55ef6d8e09
This commit is contained in:
merge-script
2025-09-08 16:44:54 +02:00

View File

@@ -130,7 +130,7 @@ SECP256K1_API int secp256k1_ellswift_decode(
*
* Returns: 1: secret was valid, public key was stored.
* 0: secret was invalid, try again.
* Args: ctx: pointer to a context object
* Args: ctx: pointer to a context object (not secp256k1_context_static)
* Out: ell64: pointer to a 64-byte array to receive the ElligatorSwift
* public key
* In: seckey32: pointer to a 32-byte secret key