Cleaning.
[crypto_lab3.git] / src / Tests.h
1 #ifndef TESTS_H
2 #define TESTS_H
3
4 #include "Utils.h"
5
6 class Tests
7 {
8 public:
9 Tests(uint keySizeBits, uint rsaPublicExponent);
10
11 void runTests();
12 void runTestsWithShamirsTrick();
13 void runTimeMeasures();
14
15 void doAttack();
16 void doAttackFixed();
17
18 private:
19 bool rsaStandard();
20 bool rsaCrt();
21 bool rsaCrtWithShamirsTrick();
22
23 /**
24 * Return the time in [ms] required to sign N times with RSA standard.
25 * One key pair and a message is generated.
26 */
27 int timeSignRsaStd(int N);
28
29 /**
30 * Return the time in [ms] required to sign N times with RSA CRT.
31 * One key pair and a message is generated.
32 */
33 int timeSignRsaCRT(int N);
34
35 int timeSignRsaCRTShamirsTrick(int N);
36
37 const uint KEY_SIZE_BITS;
38 const uint RSA_PUBLIC_EXPONENT;
39 };
40
41 #endif