Very clear and informative!<p>I got lost at this part, if anyone could clarify that would be great:<p><i>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.</i><p>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 <i>532b</i>, which is not 0x08? I must be missing some step that happens between getting the MD5 and this padding scheme.