Add check that restrict pointers don't alias with all parameters.

This commit is contained in:
Russell O'Connor
2018-07-06 07:26:57 -04:00
parent 95e99f196f
commit 4efb3f8dd1
3 changed files with 3 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ SECP256K1_INLINE static void secp256k1_fe_mul_inner(uint64_t *r, const uint64_t
VERIFY_BITS(b[3], 56);
VERIFY_BITS(b[4], 52);
VERIFY_CHECK(r != b);
VERIFY_CHECK(a != b);
/* [... a b c] is a shorthand for ... + a<<104 + b<<52 + c<<0 mod n.
* px is a shorthand for sum(a[i]*b[x-i], i=0..x).