Skip to content

Commit 2ebc58e

Browse files
WIP docs: Get rid of "initialized for signing" terminology
1 parent f86bfdf commit 2ebc58e

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

include/secp256k1.h

+11-12
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,10 @@ typedef int (*secp256k1_nonce_function)(
217217
/** A built-in constant secp256k1 context object with static storage duration, to be
218218
* used in conjunction with secp256k1_selftest.
219219
*
220-
* This context object is *not* "initialized for signing", i.e., it cannot be used
221-
* for certain functions that operate on secret keys, e.g., signing and public key
222-
* generation. See secp256k1_context_create if you need a context object initialized
223-
* for signing.
220+
* This context object offers *only limited functionality* , i.e., it cannot be used
224221
* for most functions that operate on secret keys, e.g., signing and public key
222+
* generation. See secp256k1_context_create if you need a context object that does
223+
* not have this limitation.
225224
*
226225
* It is highly recommended to call secp256k1_selftest before using this context.
227226
*/
@@ -258,18 +257,18 @@ SECP256K1_API void secp256k1_selftest(void);
258257
* secp256k1_preallocated.h.
259258
*
260259
* Returns: a newly created context object.
261-
* In: flags: which parts of the context to initialize. Set this to
262-
* SECP256K1_CONTEXT_SIGN, see below.
260+
* In: flags: configuration flags. Set this to
261+
* SECP256K1_CONTEXT_DEFAULT, see below.
263262
*
264-
* Currently, the only valid non-deprecated flag is SECP256K1_CONTEXT_SIGN, which will
265-
* create a context "initialized for signing". This is sufficient for all functionality
263+
* Currently, the only valid non-deprecated flag is SECP256K1_CONTEXT_DEFAULT, which will
264+
* create a context sufficient for all functionality
266265
* currently offered by the library. All other (deprecated) flags will be treated as
267-
* equivalent to SECP256K1_CONTEXT_SIGN. Though the flags parameter primarily exists
266+
* equivalent to SECP256K1_CONTEXT_DEFAULT. Though the flags parameter primarily exists
268267
* for historical reasons, future versions of the library may introduce new flags.
269268
*
270269
* If the context is intended to be used for functions that operate on secret keys,
271270
* e.g., signing and public key generation (or strictly speaking, all functions that are
272-
* documented to require a context "initialized for signing"), then it is highly
271+
* documented to require a context which is not the static context), then it is highly
273272
* recommended to call secp256k1_context_randomize on the context before calling these
274273
* functions. This will provide enhanced protection against side-channel leakage.
275274
*/
@@ -628,7 +627,7 @@ SECP256K1_API extern const secp256k1_nonce_function secp256k1_nonce_function_def
628627
*
629628
* Returns: 1: signature created
630629
* 0: the nonce generation function failed, or the secret key was invalid.
631-
* Args: ctx: pointer to a context object, initialized for signing.
630+
* Args: ctx: pointer to a context object (not secp256k1_context_static).
632631
* Out: sig: pointer to an array where the signature will be placed.
633632
* In: msghash32: the 32-byte message hash being signed.
634633
* seckey: pointer to a 32-byte secret key.
@@ -672,7 +671,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_verify(
672671
*
673672
* Returns: 1: secret was valid, public key stores.
674673
* 0: secret was invalid, try again.
675-
* Args: ctx: pointer to a context object, initialized for signing.
674+
* Args: ctx: pointer to a context object (not secp256k1_context_static).
676675
* Out: pubkey: pointer to the created public key.
677676
* In: seckey: pointer to a 32-byte secret key.
678677
*/

0 commit comments

Comments
 (0)