RSACryptoServiceProvider.SignData中的填充方法 [英] Padding method in RSACryptoServiceProvider.SignData
本文介绍了RSACryptoServiceProvider.SignData中的填充方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨.
我一直在研究在.NET Framework中使用RSACryptoServiceProvider.SignData的填充方法.我发现默认情况下它使用PKCS,但是我找不到它是PKCS#1.5,PKCS#2还是其他版本. ¿有人知道吗?最重要的是¿可以更改此功能吗?
在此先感谢
Ivan
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
推荐答案
查看Encrypt
的第二个参数.看来您只能在RSA_PADDING_PKCS1
和RSA_PADDING_PKCS1_OAEP
之间选择.
参见:
http://msdn.microsoft.com/en-us/library/system. security.cryptography.rsacryptoserviceprovider.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/system. security.cryptography.rsacryptoserviceprovider.aspx [ ^ ](请参见说明问题的示例代码),
另请参见以下讨论: http://social. msdn.microsoft.com/Forums/zh-CN/Vsexpressvcs/thread/15f9e2d8-99bb-4ed0-bc8b-4a608c6272b7/ [
Look at the second parameter ofEncrypt
. It looks like you only have a choice betweenRSA_PADDING_PKCS1
andRSA_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
这篇关于RSACryptoServiceProvider.SignData中的填充方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文