@@ -58,7 +58,7 @@ SECP256K1_API int secp256k1_pedersen_commitment_serialize(
58
58
/** Initialize a context for usage with Pedersen commitments. */
59
59
void secp256k1_pedersen_context_initialize (secp256k1_context * ctx );
60
60
61
- /** Generate a pedersen commitment.
61
+ /** Generate a Pedersen commitment.
62
62
* Returns 1: Commitment successfully created.
63
63
* 0: Error. The blinding factor is larger than the group order
64
64
* (probability for random 32 byte number < 2^-127) or results in the
@@ -89,7 +89,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_pedersen_commit(
89
89
* In: ctx: pointer to a context object (cannot be NULL)
90
90
* blinds: pointer to pointers to 32-byte character arrays for blinding factors. (cannot be NULL)
91
91
* n: number of factors pointed to by blinds.
92
- * npositive: how many of the initial factors should be treated with a positive sign.
92
+ * npositive: how many of the input factors should be treated with a positive sign.
93
93
* Out: blind_out: pointer to a 32-byte array for the sum (cannot be NULL)
94
94
*/
95
95
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_pedersen_blind_sum (
@@ -100,28 +100,28 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_pedersen_blind_sum(
100
100
size_t npositive
101
101
) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 );
102
102
103
- /** Verify a tally of pedersen commitments
103
+ /** Verify a tally of Pedersen commitments
104
104
* Returns 1: commitments successfully sum to zero.
105
105
* 0: Commitments do not sum to zero or other error.
106
- * In: ctx: pointer to a context object (cannot be NULL)
107
- * commits : pointer to array of pointers to the commitments. (cannot be NULL if pcnt is non-zero)
108
- * pcnt : number of commitments pointed to by commits .
109
- * ncommits : pointer to array of pointers to the negative commitments. (cannot be NULL if ncnt is non-zero)
110
- * ncnt : number of commitments pointed to by ncommits .
106
+ * In: ctx: pointer to a context object (cannot be NULL)
107
+ * pos : pointer to array of pointers to the commitments. (cannot be NULL if `n_pos` is non-zero)
108
+ * n_pos : number of commitments pointed to by `pos` .
109
+ * neg : pointer to array of pointers to the negative commitments. (cannot be NULL if `n_neg` is non-zero)
110
+ * n_neg : number of commitments pointed to by `neg` .
111
111
*
112
- * This computes sum(commit [0..pcnt )) - sum(ncommit [0..ncnt )) == 0.
112
+ * This computes sum(pos [0..n_pos )) - sum(neg [0..n_neg )) == 0.
113
113
*
114
- * A pedersen commitment is xG + vA where G and A are generators for the secp256k1 group and x is a blinding factor,
114
+ * A Pedersen commitment is xG + vA where G and A are generators for the secp256k1 group and x is a blinding factor,
115
115
* while v is the committed value. For a collection of commitments to sum to zero, for each distinct generator
116
116
* A all blinding factors and all values must sum to zero.
117
117
*
118
118
*/
119
119
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_pedersen_verify_tally (
120
120
const secp256k1_context * ctx ,
121
- const secp256k1_pedersen_commitment * const * commits ,
122
- size_t pcnt ,
123
- const secp256k1_pedersen_commitment * const * ncommits ,
124
- size_t ncnt
121
+ const secp256k1_pedersen_commitment * const * pos ,
122
+ size_t n_pos ,
123
+ const secp256k1_pedersen_commitment * const * neg ,
124
+ size_t n_neg
125
125
) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (4 );
126
126
127
127
/** Sets the final Pedersen blinding factor correctly when the generators themselves
0 commit comments