ecdsa-prime256v1-sha512-unused-bits-signature.pem 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. This is the same test as ecdsa-prime256v1-sha512.pem, however the SIGNATURE has
  2. been changed to a (valid) BIT STRING containing two unused bits.
  3. Note that the last two bits of the original signature were 0, so the
  4. DER-encoded bytes portion of the mutated BIT STRING remains the same. All that
  5. changes is the octet at the start which indicates the number of unused bits.
  6. In other words SIGNATURE changes from:
  7. 03 47 00 30 ... 84
  8. To:
  9. 03 47 02 30 ... 84
  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. $ openssl asn1parse -i < [ALGORITHM]
  21. 0:d=0 hl=2 l= 10 cons: SEQUENCE
  22. 2:d=1 hl=2 l= 8 prim: OBJECT :ecdsa-with-SHA512
  23. -----BEGIN ALGORITHM-----
  24. MAoGCCqGSM49BAME
  25. -----END ALGORITHM-----
  26. -----BEGIN DATA-----
  27. bikyFTMBpO72gOZCiSmtrpiMEI1mijH/VdBImUfXX/gaRr+J6E1kAfAjvm6HaI+814TXhcqEZzV
  28. SSstS0ARSyEBApHnnzDMJNkQdk7vnIqlDKm4dsRK1yUA7ECcssTR/1hnUY/ep0iOtdv3gbYpog1
  29. APuEMjWr/5jiQb37VTjD4=
  30. -----END DATA-----
  31. $ openssl asn1parse -i < [SIGNATURE]
  32. 0:d=0 hl=2 l= 71 prim: BIT STRING
  33. -----BEGIN SIGNATURE-----
  34. A0cCMEQCIEufkeQoUocmGh0ckjz2Gc1SwXXP5/G+YKUljGEDSLo9AiAoxF+QHXHEGymGOOwNaoX
  35. X/LDDO7/sWpyBCEa2OSiahA==
  36. -----END SIGNATURE-----