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

Side by Side Diff: src/platform/vboot_reference/tests/run_rsa_tests.sh

Issue 626011: Vboot Reference: Add a RSA verify benchmark. (Closed)
Patch Set: 80 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 unified diff | Download patch
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Run tests for cryptographic routine implementations - Message digests 7 # Run tests for cryptographic routine implementations - Message digests
8 # and RSA Signature verification. 8 # and RSA Signature verification.
9 9
10 return_code=0 10 return_code=0
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 done 48 done
49 } 49 }
50 50
51 function test_verification { 51 function test_verification {
52 algorithmcounter=0 52 algorithmcounter=0
53 for keylen in ${key_lengths[@]} 53 for keylen in ${key_lengths[@]}
54 do 54 do
55 for hashalgo in ${hash_algos[@]} 55 for hashalgo in ${hash_algos[@]}
56 do 56 do
57 echo -e "For ${COL_YELLOW}RSA-$keylen and $hashalgo${COL_STOP}:" 57 echo -e "For ${COL_YELLOW}RSA-$keylen and $hashalgo${COL_STOP}:"
58 cd ${UTIL_DIR} && ${TEST_DIR}/firmware_image_tests $algorithmcounter testk eys/key_rsa8192.pem \ 58 cd ${UTIL_DIR} && ${TEST_DIR}/firmware_image_tests $algorithmcounter \
59 testkeys/key_rsa8192.keyb testkeys/key_rsa${keylen}.pem \ 59 ${TEST_DIR}/testkeys/key_rsa8192.pem \
60 testkeys/key_rsa${keylen}.keyb 60 ${TEST_DIR}/testkeys/key_rsa8192.keyb \
61 ${TEST_DIR}/testkeys/key_rsa${keylen}.pem \
62 ${TEST_DIR}/testkeys/key_rsa${keylen}.keyb
61 let algorithmcounter=algorithmcounter+1 63 let algorithmcounter=algorithmcounter+1
62 done 64 done
63 done 65 done
64 } 66 }
65 67
66 function pre_work { 68 function pre_work {
67 # Generate a file with random bytes for signature tests. 69 # Generate a file with random bytes for signature tests.
68 echo "Generating test file..." 70 echo "Generating test file..."
69 dd if=/dev/urandom of=${TEST_FILE} bs=${TEST_FILE_SIZE} count=1 71 dd if=/dev/urandom of=${TEST_FILE} bs=${TEST_FILE_SIZE} count=1
70 echo "Generating signatures..." 72 echo "Generating signatures..."
(...skipping 28 matching lines...) Expand all
99 echo 101 echo
100 echo "Testing high-level image verification..." 102 echo "Testing high-level image verification..."
101 test_verification 103 test_verification
102 104
103 echo 105 echo
104 echo "Cleaning up..." 106 echo "Cleaning up..."
105 cleanup 107 cleanup
106 108
107 exit $return_code 109 exit $return_code
108 110
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/tests/rsa_verify_benchmark.c ('k') | src/platform/vboot_reference/tests/testcases/test_file » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698