void printUsage(const string& progName)
{
- cout << "Usage: " << progName << " [tests|time-measures]" << endl;
+ cout << "Usage: " << progName << " <command>" << endl;
+ cout << " <command> can be one of the following:" << endl;
+ cout << " * tests: Do some tests for RSA and RSA-CRT" << endl;
+ cout << " * time-measures: Compute the ratio between RSA and RSA-CRT" << endl;
+ cout << " * attack: Simulate the Boneh-DeMillo-Lipton attack against RSA-CRT" << endl;
+ cout << " * attack-fixed: [TODO]" << endl;
}
int main(int argc, char** argv)
Tests(KEY_SIZE_BITS, RSA_PUBLIC_EXPONENT).runTests();
else if (args.size() >= 2 && args[1] == "time-measures")
Tests(KEY_SIZE_BITS, RSA_PUBLIC_EXPONENT).runTimeMeasures();
+ else if (args.size() >= 2 && args[1] == "attack")
+ Tests(KEY_SIZE_BITS, RSA_PUBLIC_EXPONENT).doAttack();
else
printUsage(args[0]);