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

Issue 661038: Add a test for RSA PKCS #1 v1.5 signature verification. (Closed)

Created:
10 years, 10 months ago by gauravsh
Modified:
9 years, 6 months ago
Reviewers:
petkov
CC:
chromium-os-reviews_chromium.org
Visibility:
Public.

Description

Add a test for RSA PKCS #1 v1.5 signature verification. This test checks that signatures with improper padding do not get accepted by the RSA signature verification implementation.

Patch Set 1 #

Patch Set 2 : Move padding test vectors to a separate file. #

Total comments: 8

Patch Set 3 : Misc spacing fixes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -1 line) Patch
M src/platform/vboot_reference/tests/Makefile View 2 chunks +7 lines, -2 lines 0 comments Download
A src/platform/vboot_reference/tests/rsa_padding_test.h View 2 1 chunk +51 lines, -0 lines 0 comments Download
A src/platform/vboot_reference/tests/rsa_padding_test.c View 1 2 1 chunk +45 lines, -0 lines 0 comments Download
M src/platform/vboot_reference/tests/run_rsa_tests.sh View 1 chunk +2 lines, -0 lines 0 comments Download
A src/platform/vboot_reference/tests/testkeys/rsa_padding_test_pubkey.keyb View 0 chunks +-1 lines, --1 lines 0 comments Download
A src/platform/vboot_reference/tests/testkeys/rsa_padding_test_pubkey.pem View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
gauravsh
10 years, 10 months ago (2010-02-25 00:16:46 UTC) #1
gauravsh
load balancing...
10 years, 10 months ago (2010-02-25 00:20:56 UTC) #2
petkov
A few nits, LGTM otherwise http://codereview.chromium.org/661038/diff/1005/9 File src/platform/vboot_reference/tests/rsa_padding_test.c (right): http://codereview.chromium.org/661038/diff/1005/9#newcode34 src/platform/vboot_reference/tests/rsa_padding_test.c:34: for(i = 1; i ...
10 years, 10 months ago (2010-02-25 00:31:43 UTC) #3
gauravsh
10 years, 10 months ago (2010-02-25 00:42:19 UTC) #4
Thanks. Fixed and submitted.

http://codereview.chromium.org/661038/diff/1005/9
File src/platform/vboot_reference/tests/rsa_padding_test.c (right):

http://codereview.chromium.org/661038/diff/1005/9#newcode34
src/platform/vboot_reference/tests/rsa_padding_test.c:34: for(i = 1; i <
sizeof(signatures)/sizeof(signatures[0]); i++) {
On 2010/02/25 00:31:43, petkov wrote:
> space after for, spaces around /
done.

http://codereview.chromium.org/661038/diff/1005/9#newcode35
src/platform/vboot_reference/tests/rsa_padding_test.c:35: if(RSA_verify(key,
signatures[i], RSA1024NUMBYTES, 0,
On 2010/02/25 00:31:43, petkov wrote:
> space after if
Done.

http://codereview.chromium.org/661038/diff/1005/1007
File src/platform/vboot_reference/tests/rsa_padding_test.h (right):

http://codereview.chromium.org/661038/diff/1005/1007#newcode20
src/platform/vboot_reference/tests/rsa_padding_test.h:20: static const uint8_t
pubkey_n[] = {210, 136, 105, 162, 117, 171, 114, 146, 81, 242, 21, 222, 87, 60,
122, 176, 245, 57, 213, 159, 196, 165, 40, 75, 146, 35, 114, 118, 25, 196, 150,
38, 40, 195, 56, 109, 145, 47, 171, 117, 57, 220, 176, 186, 70, 175, 222, 65,
60, 65, 31, 88, 93, 220, 27, 74, 73, 43, 112, 6, 242, 78, 38, 229, 58, 206, 200,
4, 196, 67, 8, 141, 21, 141, 79, 214, 221, 179, 184, 64, 92, 8, 222, 68, 16, 97,
101, 68, 210, 155, 217, 238, 78, 207, 202, 43, 16, 241, 194, 78, 28, 172, 124,
44, 111, 181, 187, 71, 57, 190, 50, 109, 254, 170, 103, 126, 124, 156, 169, 36,
164, 186, 136, 108, 66, 44, 147, 137};
On 2010/02/25 00:31:43, petkov wrote:
> 80 chars?

Done.

http://codereview.chromium.org/661038/diff/1005/1007#newcode30
src/platform/vboot_reference/tests/rsa_padding_test.h:30: static const uint8_t
test_message_sha1_hash[] = {144, 105, 202, 120, 231, 69, 10, 40, 81, 115, 67,
27, 62, 82, 197, 194, 82, 153, 228, 115};
On 2010/02/25 00:31:43, petkov wrote:
> 80 chars?
Done.

Powered by Google App Engine
This is Rietveld 408576698