Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Unified Diff: src/platform/vboot_reference/tests/rsa_verify_benchmark.c

Issue 660310: Fix a typo in the RSA benchmark. (Closed)
Patch Set: Follow output convention. Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/platform/vboot_reference/utils/file_keys.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/vboot_reference/tests/rsa_verify_benchmark.c
diff --git a/src/platform/vboot_reference/tests/rsa_verify_benchmark.c b/src/platform/vboot_reference/tests/rsa_verify_benchmark.c
index 29acf75c8a64136ea2947aedf9caddef79a488d9..e72c36fdc8e32c6d7e3b410c4e0310a993249095 100644
--- a/src/platform/vboot_reference/tests/rsa_verify_benchmark.c
+++ b/src/platform/vboot_reference/tests/rsa_verify_benchmark.c
@@ -26,7 +26,7 @@ int SpeedTestAlgorithm(int algorithm) {
RSAPublicKey* key = NULL;
ClockTimerState ct;
char* sha_strings[] = { /* Maps algorithm->SHA algorithm. */
- "sha1", "sha256", "psha512", /* RSA-1024 */
+ "sha1", "sha256", "sha512", /* RSA-1024 */
"sha1", "sha256", "sha512", /* RSA-2048 */
"sha1", "sha256", "sha512", /* RSA-4096 */
"sha1", "sha256", "sha512", /* RSA-8192 */
@@ -37,7 +37,7 @@ int SpeedTestAlgorithm(int algorithm) {
snprintf(file_name, FILE_NAME_SIZE, "testkeys/key_rsa%d.keyb", key_size);
key = RSAPublicKeyFromFile(file_name);
if (!key) {
- fprintf(stderr, "Couldn't read key from file.\n");
+ fprintf(stderr, "Couldn't read RSA Public key from file: %s\n", file_name);
error_code = 1;
goto failure;
}
@@ -74,7 +74,8 @@ int SpeedTestAlgorithm(int algorithm) {
fprintf(stderr, "# rsa%d/%s:\tTime taken per verification = %.02f ms,"
" Speed = %.02f verifications/s\n", key_size, sha_strings[algorithm],
msecs, speed);
- fprintf(stdout, "rsa%d/%s:%.02f\n", key_size, sha_strings[algorithm], msecs);
+ fprintf(stdout, "ms_rsa%d_%s:%.02f\n", key_size, sha_strings[algorithm],
+ msecs);
failure:
Free(signature);
« no previous file with comments | « no previous file | src/platform/vboot_reference/utils/file_keys.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698