[CryptoAPI] How to encrypt with out OAEP padding (CryptoAPI 2.1.1)

Forge Component
(19)
Published on 3 Mar by Ricardo Silva
19 votes
Published on 3 Mar by Ricardo Silva

I have public key and i want to encrypt data by RSA_Encrytp function. But i need encrypt by only RSA algorithm , because encrypt by your function data invalid. I tried encrypt by https://8gwifi.org/rsafunctions.jsp and select RSA on RSA Cipters ,it work !!!

Hello Thirajet,

"textbook" RSA encryption is utterly broken and not secure. With CryptoAPI you can only encrypt using one of two padding modes: OAEP (the most secure one) and PKCS1.5.

You can select which padding you want to use using the new parameters for the RSA_Encrypt functions introduced in version 2.0 of CryptoAPI.

I was testing your site and it seems that for the same key and plaintext it generates a different ciphertext. This is a strong indicator that in "RSA" mode it's using OAEP or some other form of randomized encryption / padding.

Do you have a sample of the code being used in the backoffice to clear out what algorithm specifically is being used?

Ricardo Silva wrote:

Hello Thirajet,

"textbook" RSA encryption is utterly broken and not secure. With CryptoAPI you can only encrypt using one of two padding modes: OAEP (the most secure one) and PKCS1.5.

You can select which padding you want to use using the new parameters for the RSA_Encrypt functions introduced in version 2.0 of CryptoAPI.

I was testing your site and it seems that for the same key and plaintext it generates a different ciphertext. This is a strong indicator that in "RSA" mode it's using OAEP or some other form of randomized encryption / padding.

Do you have a sample of the code being used in the backoffice to clear out what algorithm specifically is being used?


Thank you for reply.
Currently i have using another solution. So i don't have problem now. :)