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

Side by Side Diff: net/data/verify_signed_data_unittest/ecdsa-prime256v1-sha512-using-rsa-algorithm.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 This test specified a valid ECDSA signature and EC key (the same as ecdsa-prime2 56v1-sha512.pem)
2
3 The problem however is the signature algorithm is indicated as being RSA PKCS#1 v1.5.
4
5 Signature verification consequently should fail.
6
7
8 $ openssl asn1parse -i < [PUBLIC KEY]
9 0:d=0 hl=2 l= 89 cons: SEQUENCE
10 2:d=1 hl=2 l= 19 cons: SEQUENCE
11 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey
12 13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1
13 23:d=1 hl=2 l= 66 prim: BIT STRING
14 -----BEGIN PUBLIC KEY-----
15 MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEnLDPaTA9r8dh1ORoe07PA55tNKuWSvgIENjVWKS
16 o1vctUSM6F4iSCobuCKGWLHnvoxf7eHnil9rSFG25lfoceA==
17 -----END PUBLIC KEY-----
18
19
20 $ openssl asn1parse -i < [ALGORITHM]
21 0:d=0 hl=2 l= 13 cons: SEQUENCE
22 2:d=1 hl=2 l= 9 prim: OBJECT :sha512WithRSAEncryption
23 13:d=1 hl=2 l= 0 prim: NULL
24 -----BEGIN ALGORITHM-----
25 MA0GCSqGSIb3DQEBDQUA
26 -----END ALGORITHM-----
27
28
29 -----BEGIN DATA-----
30 bikyFTMBpO72gOZCiSmtrpiMEI1mijH/VdBImUfXX/gaRr+J6E1kAfAjvm6HaI+814TXhcqEZzV
31 SSstS0ARSyEBApHnnzDMJNkQdk7vnIqlDKm4dsRK1yUA7ECcssTR/1hnUY/ep0iOtdv3gbYpog1
32 APuEMjWr/5jiQb37VTjD4=
33 -----END DATA-----
34
35
36 $ openssl asn1parse -i < [SIGNATURE]
37 0:d=0 hl=2 l= 71 prim: BIT STRING
38 -----BEGIN SIGNATURE-----
39 A0cAMEQCIEufkeQoUocmGh0ckjz2Gc1SwXXP5/G+YKUljGEDSLo9AiAoxF+QHXHEGymGOOwNaoX
40 X/LDDO7/sWpyBCEa2OSiahA==
41 -----END SIGNATURE-----
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698