<story><title>OpenSSH Keys: A Walkthrough</title><url>https://kyleisom.net/articles/ssh_keys.html</url></story><parent_chain></parent_chain><comment><author>aftbit</author><text>&amp;quot;If you’ve seen the low level parts of RSA keys, you’ll immediately recognise this. Otherwise, convert it to an unsigned integer and you get 65537 – a common RSA modulus. RSA public keys require two pieces: the modulus and the public exponent. Let’s take a guess that the next piece is going to be the public exponent.&amp;quot;&lt;p&gt;That&amp;#x27;s backwards - 65537 is a common public exponent. The modulus is the 2048-bit long thing.&lt;p&gt;Also, the writer says &amp;quot;2048-byte&amp;quot; RSA key when it&amp;#x27;s really 2048-bits.</text></comment>
<story><title>OpenSSH Keys: A Walkthrough</title><url>https://kyleisom.net/articles/ssh_keys.html</url></story><parent_chain></parent_chain><comment><author>hamiltont</author><text>Very clear and informative!&lt;p&gt;I got lost at this part, if anyone could clarify that would be great:&lt;p&gt;&lt;i&gt;3. The key uses the PKCS#5 padding scheme: the last byte contains the number of padding bytes; e.g. if there are 5 bytes of padding, it contains 0x05. The last five bytes of the plaintext should then be 0x05 (something you should validate if you are decrypting the key yourself). If you decrypt the key above, you’ll see the last eight bytes are, in fact, 0x08.&lt;/i&gt;&lt;p&gt;The key is the MD5 of the combination of IV+pass, so how could the last byte of the key be controllable? The last two bytes shown are &lt;i&gt;532b&lt;/i&gt;, which is not 0x08? I must be missing some step that happens between getting the MD5 and this padding scheme.</text></comment>