mirror of
https://github.com/monero-project/monero.git
synced 2025-08-06 05:04:32 -04:00
bulletproofs: a few fixes from the Kudelski review
- fix integer overflow in n_bulletproof_amounts - check input scalars are in range - remove use of environment variable to tweak straus performance - do not use implementation defined signed shift for signum
This commit is contained in:
parent
c429176248
commit
869b3bf824
4 changed files with 23 additions and 15 deletions
|
@ -3707,9 +3707,8 @@ void sc_muladd(unsigned char *s, const unsigned char *a, const unsigned char *b,
|
|||
s[31] = s11 >> 17;
|
||||
}
|
||||
|
||||
/* Assumes that a != INT64_MIN */
|
||||
static int64_t signum(int64_t a) {
|
||||
return (a >> 63) - ((-a) >> 63);
|
||||
return a > 0 ? 1 : a < 0 ? -1 : 0;
|
||||
}
|
||||
|
||||
int sc_check(const unsigned char *s) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue