Click here to Skip to main content
15,911,039 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi.

I have been researching about the padding method that uses RSACryptoServiceProvider.SignData in the .NET Framework. What I have found is that it uses PKCS by default but I can't find if it is PKCS#1.5, PKCS#2 or another version. ¿Does anyone know this? And most important, ¿can this feature be changed?

Thanks in advance

Ivan
Posted

1 solution

Look at the second parameter of Encrypt. It looks like you only have a choice between RSA_PADDING_PKCS1 and RSA_PADDING_PKCS1_OAEP.

See:
http://msdn.microsoft.com/en-us/library/system.security.cryptography.rsacryptoserviceprovider.aspx[^],
http://msdn.microsoft.com/en-us/library/system.security.cryptography.rsacryptoserviceprovider.aspx[^] (see sample code illustrating the issue),
see also this discussion: http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/15f9e2d8-99bb-4ed0-bc8b-4a608c6272b7/[^].

It's likely that the full research may require your own implementation of RSA :-(.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900