1 This test specified a valid RSA PKCS#1 v.1.5 signature and RSA key (the same as rsa-pkcs1-sha256.pem).
3 The problem however is the signature algorithm is indicated as being ECDSA.
5 Signature verification consequently should fail.
9 -----BEGIN PUBLIC KEY-----
10 MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqR+B2Mj1irNp1JnY2zQIQRQPz7ybs6mUjHT3
11 hf5APyaig2u6fBPThqxssgg0YviqIj/70hVK/JXcqP1zgR5AhsA0agnwAjfB/ow4EH+3HEYV52q
12 pxN98pUxC+1l2hgVtn8xCS/JGyjK+6dv+lZw3ixJoX2RjVtdJ4/cn318EhhQIDAQAB
13 -----END PUBLIC KEY-----
15 $ openssl asn1parse -i < [PUBLIC KEY]
16 0:d=0 hl=3 l= 159 cons: SEQUENCE
17 3:d=1 hl=2 l= 13 cons: SEQUENCE
18 5:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption
19 16:d=2 hl=2 l= 0 prim: NULL
20 18:d=1 hl=3 l= 141 prim: BIT STRING
24 -----BEGIN ALGORITHM-----
26 -----END ALGORITHM-----
28 $ openssl asn1parse -i < [ALGORITHM]
29 0:d=0 hl=2 l= 10 cons: SEQUENCE
30 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA256
35 MIIB46ADAgECAgkA3l4tFOVii0UwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCQVUxEzARBgN
36 VBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEPMA0GA1
37 UEAwwGTXkga2V5MB4XDTE1MDcwMjE3MDYzOVoXDTE2MDcwMTE3MDYzOVowVjELMAkGA1UEBhMCQ
38 VUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0
39 ZDEPMA0GA1UEAwwGTXkga2V5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqR+B2Mj1irNp
40 1JnY2zQIQRQPz7ybs6mUjHT3hf5APyaig2u6fBPThqxssgg0YviqIj/70hVK/JXcqP1zgR5AhsA
41 0agnwAjfB/ow4EH+3HEYV52qpxN98pUxC+1l2hgVtn8xCS/JGyjK+6dv+lZw3ixJoX2RjVtdJ4/
42 cn318EhhQIDAQABo1AwTjAdBgNVHQ4EFgQUzQBVKTEknyLndWd2HTsBdTKvyikwHwYDVR0jBBgw
43 FoAUzQBVKTEknyLndWd2HTsBdTKvyikwDAYDVR0TBAUwAwEB/w==
48 -----BEGIN SIGNATURE-----
49 A4GBADrHSmFSJw/Gv7hs5PNzpaJwAri/sitarIZfzN/SjR+n8L8yeTEoiDb1+BkxlFvXvPHTaOK
50 oO3WlslNNOxh1W5/JkYYGOUkCcyIjnln6qS560imcr3VNjomT/M8M2Iss+rJiKau1TRuaP7H8i6
51 +Gqf3saGdr8/LnvFAdNQvkalQt
52 -----END SIGNATURE-----
54 $ openssl asn1parse -i < [SIGNATURE]
55 0:d=0 hl=3 l= 129 prim: BIT STRING