Public and private key lengths
There is no need to manually add padding to the RSA public key.

Normally we'd expect the library to do whatever is needed to make key generation secure.  You shouldn't need to do manual tweaks to the public key it produces.  If the library doesn't do that, the library sucks; throw it away and get a better one.

And, for this specific case, no padding is needed during RSA key generation.  There's no need to add any padding to the RSA public key.  Depending upon how the private key is represented, the private key will often be of different length than the public key, so this is not something to worry about.