Skip to content

Commit dc7d8fd

Browse files
committed
scalar: extend docstring of secp256k1_scalar_set_b32
1 parent 074ab58 commit dc7d8fd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/scalar.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ static unsigned int secp256k1_scalar_get_bits(const secp256k1_scalar *a, unsigne
3232
/** Access bits from a scalar. Not constant time. */
3333
static unsigned int secp256k1_scalar_get_bits_var(const secp256k1_scalar *a, unsigned int offset, unsigned int count);
3434

35-
/** Set a scalar from a big endian byte array. */
35+
/** Set a scalar from a big endian byte array. The scalar will be reduced modulo group order `n`.
36+
* In: bin: pointer to a 32-byte array.
37+
* Out: r: scalar to be set.
38+
* overflow: non-zero if the scalar was bigger or equal to `n` before reduction, zero otherwise (can be NULL).
39+
*/
3640
static void secp256k1_scalar_set_b32(secp256k1_scalar *r, const unsigned char *bin, int *overflow);
3741

3842
/** Set a scalar to an unsigned integer. */

0 commit comments

Comments
 (0)