Remove some modn functions

This commit is contained in:
Zhi Guan
2024-04-17 20:55:20 +08:00
parent 3a6bfbe03f
commit 2a5dc640bd
4 changed files with 34 additions and 30 deletions

View File

@@ -46,7 +46,7 @@ static int test_sm2_z256_rshift(void)
uint64_t b[4];
unsigned int i;
sm2_z256_modn_rand(a);
sm2_z256_rand_range(a, sm2_z256_order());
sm2_z256_rshift(r, a, 0);
sm2_z256_copy(b, a);
@@ -79,7 +79,7 @@ static int test_sm2_z256_modp_mont_sqrt(void)
int i;
for (i = 0; i < 6; i++) {
sm2_z256_modn_rand(a);
sm2_z256_rand_range(a, sm2_z256_order());
sm2_z256_modp_neg(neg_a, a);
sm2_z256_modp_to_mont(a, mont_a);