As part of the ongoing RSA series, I will be walking you through the basics of ANS.1 objects and their role in RSA.
You will be using this online RSA key generator to generate keys so that you can follow along.
Upon visiting the online tool, you should be greeted with the ability to choose a key length and generate an RSA key pair. The output of such action will populate the public and private key boxes underneath. This output should be recognizable as base64 encoded data. If you followed along with my base64 article, you should have a tool that allows you to decode this data. Otherwise, you will need to use an online tool like this.
Here’s an example:
Public Key: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJgTm6UbtISP6oy4P4sU/PfSI6+E9VJn LXIGCZlDDhgYHMOlUAp/PEpbjyLxq2/dSUaqXle70/edfh9i2XnE/vMCAwEAAQ== Private Key: MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAmBObpRu0hI/qjLg/i xT899Ijr4T1UmctcgYJmUMOGBgcw6VQCn88SluPIvGrb91JRqpeV7vT951+H2LZec T+8wIDAQABAkBLhHEl7DwYF99BQb1MM3/rEE7oOf4YjWPj21uo38N/8rSJtkcG+1J Yhq+u/KAtTxtf/HQDmFGheOAuNSQ5fisBAiEA2GTNlFiZfhbRBAdUrlUd1LpWmMhH B6anfsGEElatRmUCIQCz6TQ8GBPcQG8Kj07WAnZjT/qBV/sMzjw28PWKGwTOdwIhA NYCg6rWIR+pkxfH5EDx3ynXC/PYBx+S+44J9wNoA8BdAiBE5gg1A1uHu71Ko/sjBi pkehqLMjBYhRqWR80gqJw8nQIgLL3uyV+nSiGgiozH7OYj427w7gG9ea2vJFRkgbV QhaA=
Running each of these through a base64 decoder yields:
Public Key: 305c300d06092a864886f70d0101010500034b0030480241009 8139ba51bb4848fea8cb83f8b14fcf7d223af84f552672d7206 0999430e18181cc3a5500a7f3c4a5b8f22f1ab6fdd4946aa5e5 7bbd3f79d7e1f62d979c4fef30203010001 Private Key: 30820154020100300d06092a864886f70d01010105000482013e 3082013a02010002410098139ba51bb4848fea8cb83f8b14fcf7 d223af84f552672d72060999430e18181cc3a5500a7f3c4a5b8f 22f1ab6fdd4946aa5e57bbd3f79d7e1f62d979c4fef302030100 0102404b847125ec3c1817df4141bd4c337feb104ee839fe188d 63e3db5ba8dfc37ff2b489b64706fb525886afaefca02d4f1b5f fc74039851a178e02e3524397e2b01022100d864cd9458997e16 d1040754ae551dd4ba5698c84707a6a77ec1841256ad46650221 00b3e9343c1813dc406f0a8f4ed60276634ffa8157fb0cce3c36 f0f58a1b04ce77022100d60283aad6211fa99317c7e440f1df29 d70bf3d8071f92fb8e09f7036803c05d022044e60835035b87bb bd4aa3fb23062a647a1a8b323058851a9647cd20a89c3c9d0220 2cbdeec95fa74a21a08a8cc7ece623e36ef0ee01bd79adaf2454 6481b55085a0
If you are wondering what it is that you are looking at, this article is for you. Continue reading “ANS.1 Object parsing”