mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-21 22:08:08 +00:00
fix(crypto): fix assertion
This commit is contained in:
parent
4a686d9231
commit
72acf9d285
@ -886,7 +886,7 @@ void bn_sqrt(bignum256 *x, const bignum256 *prime) {
|
||||
// http://en.wikipedia.org/wiki/Quadratic_residue#Prime_or_prime_power_modulus
|
||||
// If prime % 4 == 3, then sqrt(x) % prime == x**((prime+1)//4) % prime
|
||||
|
||||
assert(prime->val[BN_LIMBS - 1] % 4 == 3);
|
||||
assert(prime->val[0] % 4 == 3);
|
||||
|
||||
// e = (prime + 1) // 4
|
||||
bignum256 e = {0};
|
||||
|
Loading…
Reference in New Issue
Block a user