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

Side by Side Diff: src/platform/vboot_reference/tests/rsa_padding_test.h

Issue 1585007: combined patch for: (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 * Signature tests vectors for checking RSA PKCS #1 v1.5 padding 5 * Signature tests vectors for checking RSA PKCS #1 v1.5 padding
6 * implementations. These check an RSA signature verification implementation 6 * implementations. These check an RSA signature verification implementation
7 * against Daniel Bleichhenbacher's RSA signature padding attack. 7 * against Daniel Bleichhenbacher's RSA signature padding attack.
8 * 8 *
9 * Test vectors are due to Daniel Bleichenbacher (bleichen@google.com). 9 * Test vectors are due to Daniel Bleichenbacher (bleichen@google.com).
10 */ 10 */
11 11
12 #ifndef VBOOT_REFERENCE_RSA_PADDING_TEST_H_ 12 #ifndef VBOOT_REFERENCE_RSA_PADDING_TEST_H_
13 #define VBOOT_REFERENCE_RSA_PADDING_TEST_H_ 13 #define VBOOT_REFERENCE_RSA_PADDING_TEST_H_
14 14
15 #include <inttypes.h> 15 #include "cryptolib.h"
16
17 #include "rsa.h"
18 16
19 /* The modulus of the public key (RSA-1024). */ 17 /* The modulus of the public key (RSA-1024). */
20 static const uint8_t pubkey_n[] = { 18 static const uint8_t pubkey_n[] = {
21 210, 136, 105, 162, 117, 171, 114, 146, 81, 242, 21, 222, 87, 60, 122, 176, 245, 19 210, 136, 105, 162, 117, 171, 114, 146, 81, 242, 21, 222, 87, 60, 122, 176, 245,
22 57, 213, 159, 196, 165, 40, 75, 146, 35, 114, 118, 25, 196, 150, 38, 40, 195, 20 57, 213, 159, 196, 165, 40, 75, 146, 35, 114, 118, 25, 196, 150, 38, 40, 195,
23 56, 109, 145, 47, 171, 117, 57, 220, 176, 186, 70, 175, 222, 65, 60, 65, 31, 88, 21 56, 109, 145, 47, 171, 117, 57, 220, 176, 186, 70, 175, 222, 65, 60, 65, 31, 88,
24 93, 220, 27, 74, 73, 43, 112, 6, 242, 78, 38, 229, 58, 206, 200, 4, 196, 67, 8, 22 93, 220, 27, 74, 73, 43, 112, 6, 242, 78, 38, 229, 58, 206, 200, 4, 196, 67, 8,
25 141, 21, 141, 79, 214, 221, 179, 184, 64, 92, 8, 222, 68, 16, 97, 101, 68, 210, 23 141, 21, 141, 79, 214, 221, 179, 184, 64, 92, 8, 222, 68, 16, 97, 101, 68, 210,
26 155, 217, 238, 78, 207, 202, 43, 16, 241, 194, 78, 28, 172, 124, 44, 111, 181, 24 155, 217, 238, 78, 207, 202, 43, 16, 241, 194, 78, 28, 172, 124, 44, 111, 181,
27 187, 71, 57, 190, 50, 109, 254, 170, 103, 126, 124, 156, 169, 36, 164, 186, 136, 25 187, 71, 57, 190, 50, 109, 254, 170, 103, 126, 124, 156, 169, 36, 164, 186, 136,
(...skipping 14 matching lines...) Expand all
42 /* The test signatures (RSA-1024/SHA-1). signature[0] is correct, 40 /* The test signatures (RSA-1024/SHA-1). signature[0] is correct,
43 * all other signatures are incorrect. 41 * all other signatures are incorrect.
44 * 42 *
45 * TODO(gauravsh): Add similar test vectors for other string 43 * TODO(gauravsh): Add similar test vectors for other string
46 */ 44 */
47 static const uint8_t signatures[][RSA1024NUMBYTES] = { 45 static const uint8_t signatures[][RSA1024NUMBYTES] = {
48 #include "testcases/padding_test_vectors.inc" 46 #include "testcases/padding_test_vectors.inc"
49 }; 47 };
50 48
51 #endif /* VBOOT_REFERENCE_RSA_PADDING_TEST_H_ */ 49 #endif /* VBOOT_REFERENCE_RSA_PADDING_TEST_H_ */
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/tests/rollback_index_mock.c ('k') | src/platform/vboot_reference/tests/rsa_padding_test.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698