How do I make RSACryptoServiceProvider work without padding (nopadding)?

I need to make my C # application compatible with Java application.

The Java application uses an initializer Cipher.getInstance("RSA/ECB/nopadding");

to make the ECB cipher and no padding.

However, in C # you have 2 padding options: OAEP padding or PKCS # 1 v1.5. I need a no additions version, otherwise I am definitely stuck with my project.

I don't think there is a way to force the C # .NET RSACryptoServiceProvider to use a no-padded schema. However, is there a custom RSA class or library that allows this precision?

PS: Is C # .NET RSACryptoServiceProvider ECB default? I cannot find any documentation on this.

+2


source to share


3 answers


Using OpenSSL.NET will not make it available. However, I cannot get it to work ( See this question if you want to help me get it to work )



+3


source


Doing RSA without shim will almost certainly leave you with a broken (insecure) cryptosystem. If C # won't let you do that, then the point in C # is taking advantage of. Correct the Java side.



+1


source


Okay, the point is, if you don't have any padding, you must match the block size exactly. Of course, it's pretty weird ok to get to the block size, so you push.

You can always place it yourself, with some characters, which you then remove on the other side.

What exactly is the reason why you need to do this?

0


source







All Articles