03d11737f596ce50d7aced80fce1c7441c7818ab
3 * It uses GMPxx lib and C++11.
4 * It needs the RNG file "/dev/urandom".
6 * Author: Grégory Burri
17 const uint KEY_SIZE_BITS
= 1024;
18 const uint RSA_PUBLIC_EXPONENT
= 65537;
20 void printUsage(const string
& progName
)
22 cout
<< "Usage: " << progName
<< " [tests|time-measures]" << endl
;
25 int main(int argc
, char** argv
)
28 for (int i
= 0; i
< argc
; i
++)
29 args
.push_back(string(argv
[i
]));
31 if (args
.size() >= 2 && args
[1] == "tests")
32 Tests(KEY_SIZE_BITS
, RSA_PUBLIC_EXPONENT
).runTests();
33 else if (args
.size() >= 2 && args
[1] == "time-measures")
34 Tests(KEY_SIZE_BITS
, RSA_PUBLIC_EXPONENT
).runTimeMeasures();