diff options
author | Felix Lange <fjl@users.noreply.github.com> | 2017-01-13 04:29:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-13 04:29:11 +0800 |
commit | e0ceeab0d111ada7d847c83992d2ff3128bfb959 (patch) | |
tree | be9fcaa85d61ba461a3ee2293206f5f73c7e5451 /crypto/secp256k1/libsecp256k1/src/num.h | |
parent | 93077c98e43610122ad0933b20a44f04a8f4b6b2 (diff) | |
download | go-tangerine-e0ceeab0d111ada7d847c83992d2ff3128bfb959.tar go-tangerine-e0ceeab0d111ada7d847c83992d2ff3128bfb959.tar.gz go-tangerine-e0ceeab0d111ada7d847c83992d2ff3128bfb959.tar.bz2 go-tangerine-e0ceeab0d111ada7d847c83992d2ff3128bfb959.tar.lz go-tangerine-e0ceeab0d111ada7d847c83992d2ff3128bfb959.tar.xz go-tangerine-e0ceeab0d111ada7d847c83992d2ff3128bfb959.tar.zst go-tangerine-e0ceeab0d111ada7d847c83992d2ff3128bfb959.zip |
crypto/secp256k1: update to github.com/bitcoin-core/secp256k1 @ 9d560f9 (#3544)
- Use defined constants instead of hard-coding their integer value.
- Allocate secp256k1 structs on the C stack instead of converting []byte
- Remove dead code
Diffstat (limited to 'crypto/secp256k1/libsecp256k1/src/num.h')
-rw-r--r-- | crypto/secp256k1/libsecp256k1/src/num.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/secp256k1/libsecp256k1/src/num.h b/crypto/secp256k1/libsecp256k1/src/num.h index ebfa71eb4..7bb9c5be8 100644 --- a/crypto/secp256k1/libsecp256k1/src/num.h +++ b/crypto/secp256k1/libsecp256k1/src/num.h @@ -32,6 +32,9 @@ static void secp256k1_num_set_bin(secp256k1_num *r, const unsigned char *a, unsi /** Compute a modular inverse. The input must be less than the modulus. */ static void secp256k1_num_mod_inverse(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *m); +/** Compute the jacobi symbol (a|b). b must be positive and odd. */ +static int secp256k1_num_jacobi(const secp256k1_num *a, const secp256k1_num *b); + /** Compare the absolute value of two numbers. */ static int secp256k1_num_cmp(const secp256k1_num *a, const secp256k1_num *b); @@ -57,6 +60,9 @@ static void secp256k1_num_shift(secp256k1_num *r, int bits); /** Check whether a number is zero. */ static int secp256k1_num_is_zero(const secp256k1_num *a); +/** Check whether a number is one. */ +static int secp256k1_num_is_one(const secp256k1_num *a); + /** Check whether a number is strictly negative. */ static int secp256k1_num_is_neg(const secp256k1_num *a); |