• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Same test as rsa-pkcs1-sha1.pem except the length of the first SEQUENCE has
2been increased by 2 (which makes it invalid).
3
4
5$ openssl asn1parse -i < [PUBLIC KEY]
6Error in encoding
7-----BEGIN PUBLIC KEY-----
8MIOfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQClbkoOcBAXWJpRh9x+qEHRVvLsDjatUqRN/rH
9mH3rZkdjFEFb/7bFitMDyg6EqiKOU3/Umq3KRy7MHzqv84LHf1c2VCAltWyuLbfXWce9jd8CSHL
10I8Jwpw4lmOb/idGfEFrMLT8Ms18pKA4Thrb2TE7yLh4fINDOjP+yJJvZohNwIDAQAB
11-----END PUBLIC KEY-----
12
13$ openssl asn1parse -i < [ALGORITHM]
14    0:d=0  hl=2 l=  13 cons: SEQUENCE
15    2:d=1  hl=2 l=   9 prim:  OBJECT            :sha1WithRSAEncryption
16   13:d=1  hl=2 l=   0 prim:  NULL
17-----BEGIN ALGORITHM-----
18MA0GCSqGSIb3DQEBBQUA
19-----END ALGORITHM-----
20
21-----BEGIN DATA-----
22zch9oiPXht87ReC7vHITJtHuKvgGzDFUdcxvDZxm4bYjcdRc4jkuGskoRMMQEC8Vag2NUsH0xAu
23jqmUJV4bLdpdXplY7qVj+0LzJhOi1F6PV9RWyO4pB50qoZ2k/kN+wYabobfqu5kRywA5fIJRXKc
24vr538Gznjgj0CY+6QfnWGTwDF+i2DUtghKy0LSnjgIo7w3LYXjMRcPy/fMctC3HClmSLOk0Q9BY
25pXQgHqmJcqydE/Z6o/SI8QlNwKYKL0WvgJUbxMP0uM7k20mduCK7RtzMYt1CgFn0A==
26-----END DATA-----
27
28$ openssl asn1parse -i < [SIGNATURE]
29    0:d=0  hl=3 l= 129 prim: BIT STRING
30-----BEGIN SIGNATURE-----
31A4GBAGvDoGZWhCkwokfjDVhktNgZI2unxollhirX28TiSvKOhrtTHwM1i+X7dHd8YIb4UMrviT8
32Nb8wtDJHsATaTtOoAuAzUmqxOy1+JEa/lOa2kqPOCPR0T5HLRSQVHxlnHYX89JAh9228rcglhZ/
33wJfKsY6aRY/LY0zc6O41iUxITX
34-----END SIGNATURE-----
35