field: Document return value of fe_sqrt()
Co-authored-by: Jonas Nick <jonasd.nick@gmail.com>
This commit is contained in:
parent
67214f5f7d
commit
5779137457
@ -267,8 +267,10 @@ static void secp256k1_fe_sqr(secp256k1_fe *r, const secp256k1_fe *a);
|
|||||||
/** Compute a square root of a field element.
|
/** Compute a square root of a field element.
|
||||||
*
|
*
|
||||||
* On input, a must be a valid field element with magnitude<=8; r need not be initialized.
|
* On input, a must be a valid field element with magnitude<=8; r need not be initialized.
|
||||||
* Performs {r = sqrt(a)} or {r = sqrt(-a)}, whichever exists. The resulting value
|
* If sqrt(a) exists, performs {r = sqrt(a)} and returns 1.
|
||||||
* represented by r will be a square itself. Variables r and a must not point to the same object.
|
* Otherwise, sqrt(-a) exists. The function performs {r = sqrt(-a)} and returns 0.
|
||||||
|
* The resulting value represented by r will be a square itself.
|
||||||
|
* Variables r and a must not point to the same object.
|
||||||
* On output, r will have magnitude 1 but will not be normalized.
|
* On output, r will have magnitude 1 but will not be normalized.
|
||||||
*/
|
*/
|
||||||
static int secp256k1_fe_sqrt(secp256k1_fe * SECP256K1_RESTRICT r, const secp256k1_fe * SECP256K1_RESTRICT a);
|
static int secp256k1_fe_sqrt(secp256k1_fe * SECP256K1_RESTRICT r, const secp256k1_fe * SECP256K1_RESTRICT a);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user