@@ -1012,6 +1012,17 @@ static int test_mp_montgomery_reduce(void)
10121012
10131013}
10141014
1015+ const uint8_t test_s_mp_radix_exponent_y [] = { 0 , 0 , /* 0 .. 1*/
1016+ 20 , 12 , 10 , 8 , 7 , 7 , 6 , 6 , /* 2 .. 9 */
1017+ 6 , 5 , 5 , 5 , 5 , 5 , 5 , 4 , /* 10 .. 17 */
1018+ 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , /* 18 .. 25 */
1019+ 4 , 4 , 4 , 4 , 4 , 4 , 4 , 3 , /* 26 .. 33 */
1020+ 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , /* 34 .. 41 */
1021+ 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , /* 42 .. 49 */
1022+ 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , /* 51 .. 57 */
1023+ 3 , 3 , 3 , 3 , 3 , 3 , 3 /* 58 .. 64 */
1024+ };
1025+
10151026static int test_mp_read_radix (void )
10161027{
10171028 char buf [4096 ];
@@ -1048,7 +1059,7 @@ static int test_mp_read_radix(void)
10481059 /* Test the fast method with a slightly larger number */
10491060
10501061 /* Must be bigger than the cut-off value, of course */
1051- bignum = 2 * (2 * s_mp_radix_exponent_y [2 ] * MP_RADIX_BARRETT_START_MULTIPLICATOR );
1062+ bignum = 2 * (2 * test_s_mp_radix_exponent_y [2 ] * MP_RADIX_BARRETT_START_MULTIPLICATOR );
10521063 printf ("Size of bignum_size = %d\n" , bignum );
10531064 /* Check if "bignum" is small enough for the result to fit into "buf"
10541065 otherwise lead tester to this function */
0 commit comments