For example if I have a 1024-bit key, and wish to encrypt precisely 128 bytes of data, then padding is not required.
This is a usual method of encrypting:
RSA rsa = RSA.Create();
byte[] encrypted = rsa.Encrypt(plaintext, RSAEncryptionPadding.Pkcs1);
But there appears to be no RSAEncryptionPadding.None
. Is there another way to do this?