Maybe I wasn't clear earlier in the thread, but since this code is used for both encrypt and decrypt I wanted to provide a slightly more useful error during decrypt if the modulus_size didn't match the key_size. Otherwise the only message you'll ever get out of decryption is "decryption failed" when we can be slightly more helpful than that.

I could move that check up into the decrypt only path though, which would resolve this whole issue (and then I could make it more strict by saying `key_size_bytes == len(data)` since that is a hard requirement for decryption. I'll push a commit with that change shortly.