OLD | NEW |
(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 |
| 9 -----BEGIN PUBLIC KEY----- |
| 10 MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEnLDPaTA9r8dh1ORoe07PA55tNKuWSvgIENjVWKS |
| 11 o1vctUSM6F4iSCobuCKGWLHnvoxf7eHnil9rSFG25lfoceA== |
| 12 -----END PUBLIC KEY----- |
| 13 |
| 14 $ openssl asn1parse -i < [PUBLIC KEY] |
| 15 0:d=0 hl=2 l= 89 cons: SEQUENCE |
| 16 2:d=1 hl=2 l= 19 cons: SEQUENCE |
| 17 4:d=2 hl=2 l= 7 prim: OBJECT :id-ecPublicKey |
| 18 13:d=2 hl=2 l= 8 prim: OBJECT :prime256v1 |
| 19 23:d=1 hl=2 l= 66 prim: BIT STRING |
| 20 |
| 21 |
| 22 |
| 23 -----BEGIN ALGORITHM----- |
| 24 MA0GCSqGSIb3DQEBDQUA |
| 25 -----END ALGORITHM----- |
| 26 |
| 27 $ openssl asn1parse -i < [ALGORITHM] |
| 28 0:d=0 hl=2 l= 13 cons: SEQUENCE |
| 29 2:d=1 hl=2 l= 9 prim: OBJECT :sha512WithRSAEncryption |
| 30 13:d=1 hl=2 l= 0 prim: NULL |
| 31 |
| 32 |
| 33 |
| 34 -----BEGIN DATA----- |
| 35 bikyFTMBpO72gOZCiSmtrpiMEI1mijH/VdBImUfXX/gaRr+J6E1kAfAjvm6HaI+814TXhcqEZzV |
| 36 SSstS0ARSyEBApHnnzDMJNkQdk7vnIqlDKm4dsRK1yUA7ECcssTR/1hnUY/ep0iOtdv3gbYpog1 |
| 37 APuEMjWr/5jiQb37VTjD4= |
| 38 -----END DATA----- |
| 39 |
| 40 |
| 41 |
| 42 -----BEGIN SIGNATURE----- |
| 43 A0cAMEQCIEufkeQoUocmGh0ckjz2Gc1SwXXP5/G+YKUljGEDSLo9AiAoxF+QHXHEGymGOOwNaoX |
| 44 X/LDDO7/sWpyBCEa2OSiahA== |
| 45 -----END SIGNATURE----- |
| 46 |
| 47 $ openssl asn1parse -i < [SIGNATURE] |
| 48 0:d=0 hl=2 l= 71 prim: BIT STRING |
OLD | NEW |