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

Side by Side Diff: net/data/verify_signed_data_unittest/rsa-pss-sha256-salt10.pem

Issue 1209283004: Implement VerifySignedData() for ECDSA, RSA PKCS#1 and RSA PSS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@parse_pss
Patch Set: add a test for non-BIT STRING signature value Created 5 years, 5 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
(Empty)
1 The key, message, and signature come from:
2 http://csrc.nist.gov/groups/STM/cavp/documents/dss/186-2rsatestvectors.zip (SigV erPSS_186-3.rsp)
3
4 (The algorithm DER was synthesized to match, and the signature wrapped in a BIT STRING).
5
6 It uses an RSA key with modulus length of 1024 bits, PSS padding,
7 SHA-256 as the digest, MGF1 with SHA-256, and salt length of 10.
8
9
10 $ openssl asn1parse -i < [PUBLIC KEY]
11 0:d=0 hl=3 l= 157 cons: SEQUENCE
12 3:d=1 hl=2 l= 13 cons: SEQUENCE
13 5:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption
14 16:d=2 hl=2 l= 0 prim: NULL
15 18:d=1 hl=3 l= 139 prim: BIT STRING
16 -----BEGIN PUBLIC KEY-----
17 MIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQC+SZtefwbIP6ApPjFGXI62tYr5ILrlKntbm/6
18 3qnLbEmQRLrP9Qx0xoqflCUFWaSlJSg6JHtVhORi0tRsNH7l3g7Jqz30POEz7NfTSgk9d04BiOi
19 a/GAtjlhxhnc2yDK5AbyL24nbICjcllJDP63LBpxqE8YRtMwh3uj4xAeycewIBEQ==
20 -----END PUBLIC KEY-----
21
22
23 $ openssl asn1parse -i < [ALGORITHM]
24 0:d=0 hl=2 l= 65 cons: SEQUENCE
25 2:d=1 hl=2 l= 9 prim: OBJECT :rsassaPss
26 13:d=1 hl=2 l= 52 cons: SEQUENCE
27 15:d=2 hl=2 l= 15 cons: cont [ 0 ]
28 17:d=3 hl=2 l= 13 cons: SEQUENCE
29 19:d=4 hl=2 l= 9 prim: OBJECT :sha256
30 30:d=4 hl=2 l= 0 prim: NULL
31 32:d=2 hl=2 l= 28 cons: cont [ 1 ]
32 34:d=3 hl=2 l= 26 cons: SEQUENCE
33 36:d=4 hl=2 l= 9 prim: OBJECT :mgf1
34 47:d=4 hl=2 l= 13 cons: SEQUENCE
35 49:d=5 hl=2 l= 9 prim: OBJECT :sha256
36 60:d=5 hl=2 l= 0 prim: NULL
37 62:d=2 hl=2 l= 3 cons: cont [ 2 ]
38 64:d=3 hl=2 l= 1 prim: INTEGER :0A
39 -----BEGIN ALGORITHM-----
40 MEEGCSqGSIb3DQEBCjA0oA8wDQYJYIZIAWUDBAIBBQChHDAaBgkqhkiG9w0BAQgwDQYJYIZIAWU
41 DBAIBBQCiAwIBCg==
42 -----END ALGORITHM-----
43
44
45 -----BEGIN DATA-----
46 x/UnD8pyX5vRn1GajXzKPMXAeQJAKfO65RD5sCFA/iOJCOT2wY8HqJxofIaEZpsfHbK6+SUaPIK
47 frMtJMIThbsnijViGgHSl1iIWZ91uUo0W/iyfPbTPr2xNzoyEOa84zqqqnOLsrnvI9KWlXjv5bf
48 nNV1xPnLMnlRuM3+QIcWg=
49 -----END DATA-----
50
51
52 $ openssl asn1parse -i < [SIGNATURE]
53 0:d=0 hl=3 l= 129 prim: BIT STRING
54 -----BEGIN SIGNATURE-----
55 A4GBABHhafL9QLB2Qbl2iiqxmWX7bCfxD88DI/zG0S608cBrMw3aoepQRAevop3p6+A3T+nR59D
56 /vV/Bzzo0RuQUVBXSqyT3ibNGTFxDola7wdaSz38EgB2sW7QBpKA6t9VyioYMGeGk3Hl8pULIID
57 zsLmAesMUfVn8u2gIrC5693u76
58 -----END SIGNATURE-----
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698