Skip to content

Commit 1cbfbe0

Browse files
committed
do 2 MR rounds for numbers >=2048bits
1 parent d46cb16 commit 1cbfbe0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bn_mp_prime_rabin_miller_trials.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ static const struct {
1919
{ 768, 5 },
2020
{ 896, 4 },
2121
{ 1024, 4 },
22-
{ 2048, 2 },
23-
{ 4096, 1 },
22+
{ 2048, 2 } /* For bigger keysizes use always at least 2 Rounds */
2423
};
2524

2625
/* returns # of RM trials required for a given bit size and max. error of 2^(-96)*/
@@ -35,7 +34,7 @@ int mp_prime_rabin_miller_trials(int size)
3534
return (x == 0) ? sizes[0].t : sizes[x - 1].t;
3635
}
3736
}
38-
return sizes[x-1].t + 1;
37+
return sizes[x-1].t;
3938
}
4039

4140

0 commit comments

Comments
 (0)