There's a check in the code that raises if key_size < data, but there's also the intermediate case where the data is smaller than key_size but is still too large due to PKCS1v15/OAEP minimum padding. They're two different code paths so I separated the tests.