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

Side by Side Diff: src/platform/vboot_reference/tests/firmware_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 * Timing benchmark for verifying a firmware image. 5 * Timing benchmark for verifying a firmware image.
6 */ 6 */
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 10
11 #include "cryptolib.h"
12 #include "file_keys.h" 11 #include "file_keys.h"
13 #include "firmware_image.h" 12 #include "firmware_image.h"
13 #include "padding.h"
14 #include "rsa_utility.h"
14 #include "test_common.h" 15 #include "test_common.h"
15 #include "timer_utils.h" 16 #include "timer_utils.h"
16 #include "utility.h" 17 #include "utility.h"
17 18
18 #define FILE_NAME_SIZE 128 19 #define FILE_NAME_SIZE 128
19 #define NUM_OPERATIONS 100 /* Number of verify operations to time. */ 20 #define NUM_OPERATIONS 100 /* Number of verify operations to time. */
20 21
21 #define FIRMWARE_SIZE_SMALL 512000 22 #define FIRMWARE_SIZE_SMALL 512000
22 #define FIRMWARE_SIZE_MEDIUM 1024000 23 #define FIRMWARE_SIZE_MEDIUM 1024000
23 #define FIRMWARE_SIZE_LARGE 4096000 24 #define FIRMWARE_SIZE_LARGE 4096000
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 122
122 123
123 int main(int argc, char* argv[]) { 124 int main(int argc, char* argv[]) {
124 int i, error_code = 0; 125 int i, error_code = 0;
125 for (i = 0; i < kNumAlgorithms; ++i) { 126 for (i = 0; i < kNumAlgorithms; ++i) {
126 if (0 != (error_code = SpeedTestAlgorithm(i))) 127 if (0 != (error_code = SpeedTestAlgorithm(i)))
127 return error_code; 128 return error_code;
128 } 129 }
129 return 0; 130 return 0;
130 } 131 }
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/tests/firmware_splicing_tests.c ('k') | src/platform/vboot_reference/tests/kernel_image_tests.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698