blob: 6e104e841bac88fe9b800b0f6440ff3034934306 [file] [log] [blame]
The key, message, and signature come from:
http://csrc.nist.gov/groups/STM/cavp/documents/dss/186-3ecdsatestvectors.zip (SigVer.rsp)
The algorithm DER was synthesized to match, and the signature (provided as an r
and s tuple) was encoded into a Ecdsa-Sig-Value and then a BIT STRING.
It uses ECDSA verification, using curve prime256v1 and SHA-512
$ openssl asn1parse -i < [PUBLIC KEY]
0:d=0 hl=2 l= 89 cons: SEQUENCE
2:d=1 hl=2 l= 19 cons: SEQUENCE
4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey
13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1
23:d=1 hl=2 l= 66 prim: BIT STRING
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEnLDPaTA9r8dh1ORoe07PA55tNKuWSvgIENjVWKS
o1vctUSM6F4iSCobuCKGWLHnvoxf7eHnil9rSFG25lfoceA==
-----END PUBLIC KEY-----
$ openssl asn1parse -i < [ALGORITHM]
0:d=0 hl=2 l= 10 cons: SEQUENCE
2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA512
-----BEGIN ALGORITHM-----
MAoGCCqGSM49BAME
-----END ALGORITHM-----
-----BEGIN DATA-----
bikyFTMBpO72gOZCiSmtrpiMEI1mijH/VdBImUfXX/gaRr+J6E1kAfAjvm6HaI+814TXhcqEZzV
SSstS0ARSyEBApHnnzDMJNkQdk7vnIqlDKm4dsRK1yUA7ECcssTR/1hnUY/ep0iOtdv3gbYpog1
APuEMjWr/5jiQb37VTjD4=
-----END DATA-----
$ openssl asn1parse -i < [SIGNATURE]
0:d=0 hl=2 l= 71 prim: BIT STRING
-----BEGIN SIGNATURE-----
A0cAMEQCIEufkeQoUocmGh0ckjz2Gc1SwXXP5/G+YKUljGEDSLo9AiAoxF+QHXHEGymGOOwNaoX
X/LDDO7/sWpyBCEa2OSiahA==
-----END SIGNATURE-----