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

Side by Side Diff: src/platform/vboot_reference/crypto/genpadding.sh

Issue 660261: Refactor siglen_map[] to store key size in bytes instead of 32-bit words. (Closed)
Patch Set: Created 10 years, 9 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
« no previous file with comments | « no previous file | src/platform/vboot_reference/crypto/padding.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 # Script to generate padding.c containing PKCS 1.5 padding byte arrays for 7 # Script to generate padding.c containing PKCS 1.5 padding byte arrays for
8 # various combinations of RSA key lengths and message digest algorithms. 8 # various combinations of RSA key lengths and message digest algorithms.
9 9
10 Pad_Preamble="0x00,0x01" 10 Pad_Preamble="0x00,0x01"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 done 135 done
136 echo "};" 136 echo "};"
137 echo 137 echo
138 138
139 # Generate algorithm signature length map. 139 # Generate algorithm signature length map.
140 echo "const int siglen_map[NUMALGORITHMS] = {" 140 echo "const int siglen_map[NUMALGORITHMS] = {"
141 for rsaalgo in ${RSAAlgos[@]} 141 for rsaalgo in ${RSAAlgos[@]}
142 do 142 do
143 for hashalgo in ${HashAlgos[@]} 143 for hashalgo in ${HashAlgos[@]}
144 do 144 do
145 echo ${rsaalgo}NUMWORDS, 145 echo ${rsaalgo}NUMBYTES,
146 done 146 done
147 done 147 done
148 echo "};" 148 echo "};"
149 echo 149 echo
150 150
151 # Generate algorithm padding array map. 151 # Generate algorithm padding array map.
152 echo "const uint8_t* padding_map[NUMALGORITHMS] = {" 152 echo "const uint8_t* padding_map[NUMALGORITHMS] = {"
153 for rsaalgo in ${RSAAlgos[@]} 153 for rsaalgo in ${RSAAlgos[@]}
154 do 154 do
155 for hashalgo in ${HashAlgos[@]} 155 for hashalgo in ${HashAlgos[@]}
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 do 215 do
216 for hashalgo in ${HashAlgos[@]} 216 for hashalgo in ${HashAlgos[@]}
217 do 217 do
218 echo \"${rsaalgo} ${hashalgo}\", 218 echo \"${rsaalgo} ${hashalgo}\",
219 done 219 done
220 done 220 done
221 echo "};" 221 echo "};"
222 echo 222 echo
223 223
224 #echo "#endif /* VBOOT_REFERENCE_PADDING_H_ */" 224 #echo "#endif /* VBOOT_REFERENCE_PADDING_H_ */"
OLDNEW
« no previous file with comments | « no previous file | src/platform/vboot_reference/crypto/padding.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698