@@ -17,9 +17,6 @@ extern "C" {
17
17
* however guaranteed to be 33 bytes in size, and can be safely copied/moved.
18
18
* If you need to convert to a format suitable for storage or transmission, use
19
19
* secp256k1_pedersen_commitment_serialize and secp256k1_pedersen_commitment_parse.
20
- *
21
- * Furthermore, it is guaranteed to identical signatures will have identical
22
- * representation, so they can be memcmp'ed.
23
20
*/
24
21
typedef struct {
25
22
unsigned char data [33 ];
@@ -55,7 +52,7 @@ SECP256K1_API int secp256k1_pedersen_commitment_serialize(
55
52
/** Initialize a context for usage with Pedersen commitments. */
56
53
void secp256k1_pedersen_context_initialize (secp256k1_context * ctx );
57
54
58
- /** Generate a pedersen commitment.
55
+ /** Generate a Pedersen commitment.
59
56
* Returns 1: Commitment successfully created.
60
57
* 0: Error. The blinding factor is larger than the group order
61
58
* (probability for random 32 byte number < 2^-127) or results in the
@@ -86,7 +83,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_pedersen_commit(
86
83
* In: ctx: pointer to a context object (cannot be NULL)
87
84
* blinds: pointer to pointers to 32-byte character arrays for blinding factors. (cannot be NULL)
88
85
* n: number of factors pointed to by blinds.
89
- * npositive: how many of the initial factors should be treated with a positive sign.
86
+ * npositive: how many of the input factors should be treated with a positive sign.
90
87
* Out: blind_out: pointer to a 32-byte array for the sum (cannot be NULL)
91
88
*/
92
89
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_pedersen_blind_sum (
@@ -97,28 +94,28 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_pedersen_blind_sum(
97
94
size_t npositive
98
95
) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 );
99
96
100
- /** Verify a tally of pedersen commitments
97
+ /** Verify a tally of Pedersen commitments
101
98
* Returns 1: commitments successfully sum to zero.
102
99
* 0: Commitments do not sum to zero or other error.
103
- * In: ctx: pointer to a context object (cannot be NULL)
104
- * commits : pointer to array of pointers to the commitments. (cannot be NULL if pcnt is non-zero)
105
- * pcnt : number of commitments pointed to by commits .
106
- * ncommits : pointer to array of pointers to the negative commitments. (cannot be NULL if ncnt is non-zero)
107
- * ncnt : number of commitments pointed to by ncommits .
100
+ * In: ctx: pointer to a context object (cannot be NULL)
101
+ * pos : pointer to array of pointers to the commitments. (cannot be NULL if `n_pos` is non-zero)
102
+ * n_pos : number of commitments pointed to by `pos` .
103
+ * neg : pointer to array of pointers to the negative commitments. (cannot be NULL if `n_neg` is non-zero)
104
+ * n_neg : number of commitments pointed to by `neg` .
108
105
*
109
- * This computes sum(commit [0..pcnt )) - sum(ncommit [0..ncnt )) == 0.
106
+ * This computes sum(pos [0..n_pos )) - sum(neg [0..n_neg )) == 0.
110
107
*
111
- * A pedersen commitment is xG + vA where G and A are generators for the secp256k1 group and x is a blinding factor,
108
+ * A Pedersen commitment is xG + vA where G and A are generators for the secp256k1 group and x is a blinding factor,
112
109
* while v is the committed value. For a collection of commitments to sum to zero, for each distinct generator
113
110
* A all blinding factors and all values must sum to zero.
114
111
*
115
112
*/
116
113
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_pedersen_verify_tally (
117
114
const secp256k1_context * ctx ,
118
- const secp256k1_pedersen_commitment * const * commits ,
119
- size_t pcnt ,
120
- const secp256k1_pedersen_commitment * const * ncommits ,
121
- size_t ncnt
115
+ const secp256k1_pedersen_commitment * const * pos ,
116
+ size_t n_pos ,
117
+ const secp256k1_pedersen_commitment * const * neg ,
118
+ size_t n_neg
122
119
) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (4 );
123
120
124
121
/** Sets the final Pedersen blinding factor correctly when the generators themselves
0 commit comments