Blind RSA signature using .NET cryptography API?

别说谁变了你拦得住时间么 提交于 2019-12-10 20:46:50

问题


I'd like to implement a blind RSA signature in .NET. Is there any way to use the standard System.Security.Cryptography APIs to achieve this?

The "obvious" idea doesn't work:

using (var rsa = new RSACryptoServiceProvider())
  signed = rsa.Decrypt(messageBytes, false);
                // CryptographicException: bad data

I appreciate the dangers of blind signature but let's ignore those for a moment. Also, I'm not interested in other types of digital signatures.


回答1:


You are going to have to roll you own. You can use the BigInteger class of .NET 4 or just use the Bouncycastle C# library.




回答2:


You can use the "SignData" method to sign any data you like. It has overloads for byte arrays and streams. As far as the blinding goes, you would probably want to use encrypted data (using a key not available to the signer) and then sign that.



来源:https://stackoverflow.com/questions/4372271/blind-rsa-signature-using-net-cryptography-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!