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

Side by Side Diff: net/data/verify_signed_data_unittest/ecdsa-prime256v1-sha512.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-3ecdsatestvectors.zip (Si gVer.rsp)
3
4 The algorithm DER was synthesized to match, and the signature (provided as an r
5 and s tuple) was encoded into a Ecdsa-Sig-Value and then a BIT STRING.
6
7 It uses ECDSA verification, using curve prime256v1 and SHA-512
8
9
10 $ openssl asn1parse -i < [PUBLIC KEY]
11 0:d=0 hl=2 l= 89 cons: SEQUENCE
12 2:d=1 hl=2 l= 19 cons: SEQUENCE
13 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey
14 13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1
15 23:d=1 hl=2 l= 66 prim: BIT STRING
16 -----BEGIN PUBLIC KEY-----
17 MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEnLDPaTA9r8dh1ORoe07PA55tNKuWSvgIENjVWKS
18 o1vctUSM6F4iSCobuCKGWLHnvoxf7eHnil9rSFG25lfoceA==
19 -----END PUBLIC KEY-----
20
21
22 $ openssl asn1parse -i < [ALGORITHM]
23 0:d=0 hl=2 l= 10 cons: SEQUENCE
24 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA512
25 -----BEGIN ALGORITHM-----
26 MAoGCCqGSM49BAME
27 -----END ALGORITHM-----
28
29
30 -----BEGIN DATA-----
31 bikyFTMBpO72gOZCiSmtrpiMEI1mijH/VdBImUfXX/gaRr+J6E1kAfAjvm6HaI+814TXhcqEZzV
32 SSstS0ARSyEBApHnnzDMJNkQdk7vnIqlDKm4dsRK1yUA7ECcssTR/1hnUY/ep0iOtdv3gbYpog1
33 APuEMjWr/5jiQb37VTjD4=
34 -----END DATA-----
35
36
37 $ openssl asn1parse -i < [SIGNATURE]
38 0:d=0 hl=2 l= 71 prim: BIT STRING
39 -----BEGIN SIGNATURE-----
40 A0cAMEQCIEufkeQoUocmGh0ckjz2Gc1SwXXP5/G+YKUljGEDSLo9AiAoxF+QHXHEGymGOOwNaoX
41 X/LDDO7/sWpyBCEa2OSiahA==
42 -----END SIGNATURE-----
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698