I am encrypting on JAVA using RSA and attempting to decrypt using .NET. I am including my JAVA code and .NET code in hopes that someone has some experience with this sort o
On the Java side, you need to use "RSA/ECB/PKCS1Padding"
as algorithm name. With the plain "RSA"
name, Java does not add the PKCS#1 padding which the C# implementation expects, hence the "bad data".
The padding is a transformation of the input data (your encoded string) into a somewhat larger string which has the same length than the RSA modulus (128 bytes here). It is important for security and injects some randomness (the same input string will not yield the same encrypted string every time; but the decryption process removes that randomness and recovers the right string nonetheless).