Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello. I have problem digital signature verification in c#. I want to receive string publicKey, string signature, string dataToCheck and check if signature decoded with public key really matches dataToCheck (i need this to verify if i expect person sent me data). I was experimenting, and looking C# System.Security.Cryptography but haven't found right functions (all of them require some big byte numbers as parameters, and I need to work with strings. I would really much appreciate help.
Posted
Comments
Sergey Alexandrovich Kryukov 15-Aug-14 15:20pm    
What is unclear? Everything is actually explained in the documentation on System.Security.Cryptography, but here is how it looks: you cannot find this information, but you are not giving us proper information, too. Say, which public-key algorithm do you want to use. If you did not decide on that, you could have mentioned that.

Now, do you understand public-key encryption in general? do you understand that encryption is done with one key and decryption with another one, and the implications of that? In other word, why public-key encryption based protection really protect, from what?

—SA
Member 10964391 15-Aug-14 15:33pm    
Ups, i forgot to mention algorithm. We will probably know which algorithm is used for (d)encryption. For now, I don't care which one will be. I'm aware how process of digital signing works (from mathematical point). I just don't know how to code it.
I have tried with RSACryptoProvider and many more, but they all ask me to set key via some modulus and exponent, and i didn't found way to extract those data from string.

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