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

Side by Side Diff: src/platform/vboot_reference/tests/rsa_verify_benchmark.c

Issue 1593002: Revert "VBoot Reference: Refactor Part 2 - Crypto Libraries" (Closed)
Patch Set: Created 10 years, 8 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 unified diff | Download patch
OLDNEW
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 5
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "cryptolib.h"
10 #include "file_keys.h" 9 #include "file_keys.h"
10 #include "padding.h"
11 #include "rsa.h"
12 #include "rsa_utility.h"
11 #include "timer_utils.h" 13 #include "timer_utils.h"
12 #include "utility.h" 14 #include "utility.h"
13 15
14 #define FILE_NAME_SIZE 128 16 #define FILE_NAME_SIZE 128
15 #define NUM_OPERATIONS 100 /* Number of signature operations to time. */ 17 #define NUM_OPERATIONS 100 /* Number of signature operations to time. */
16 18
17 int SpeedTestAlgorithm(int algorithm) { 19 int SpeedTestAlgorithm(int algorithm) {
18 int i, key_size; 20 int i, key_size;
19 int error_code = 0; 21 int error_code = 0;
20 double speed, msecs; 22 double speed, msecs;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 87
86 int main(int argc, char* argv[]) { 88 int main(int argc, char* argv[]) {
87 int i; 89 int i;
88 int error_code = 0; 90 int error_code = 0;
89 for (i = 0; i < kNumAlgorithms; ++i) { 91 for (i = 0; i < kNumAlgorithms; ++i) {
90 if(SpeedTestAlgorithm(i)) 92 if(SpeedTestAlgorithm(i))
91 error_code = 1; 93 error_code = 1;
92 } 94 }
93 return error_code; 95 return error_code;
94 } 96 }
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/tests/rsa_padding_test.c ('k') | src/platform/vboot_reference/tests/sha_benchmark.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698