在C#.net中生成数字签名 [英] Generating the digital signature in C#.net

查看:214
本文介绍了在C#.net中生成数字签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我是ASP .NET编程的新手,我遇到了数字签名的问题,我对数字签名一无所知,请尝试解释一下这件事

为在文本框中和
中给出的我的文本生成数字签名 验证数字签名(如果消息被相同的哈希值更改,则应该说无效签名)

非常感谢您,它对我有很大帮助.

Hi all,
i am new to the asp .net programming,i had the problem with digital signature, i don''t know anything about the digital signature , try to explain this thing

Generate a digital signature for the my text which was given in text box and
Validate the digital signature(if the message is altered with same hash, it should say invalid signature )

thanks alot in advanced it is much more helpful for me

推荐答案

首先,请尝试了解数字签名的工作原理.

看到这个:
http://en.wikipedia.org/wiki/Digital_signature [ http://en.wikipedia. org/wiki/Public-key_cryptography [ ^ ].

您应该理解主要思想:使用两个键;使用一个密钥进行加密,然后使用另一个密钥进行解密.这件事在安全性方面的含义需要深入思考. 直到您掌握了它,您才能真正进行下去.

这全部基于单向功能的概念: http://en.wikipedia.org/wiki/单向功能 [ ^ ].

据我所知,单向函数的存在还没有得到严格的证明,但是数学相关领域的大多数专家认为它确实存在.一种用于单向函数的候选人是RSA算法: http://en.wikipedia.org/wiki/RSA [ ^ ].

它已在.NET中完全实现,请参见 http://msdn.microsoft.com /en-us/library/system.security.cryptography.rsa.aspx [
To start with, try to understand how digital signature works.

See this:
http://en.wikipedia.org/wiki/Digital_signature[^].

You also need to understand the idea of public-key cryptography: http://en.wikipedia.org/wiki/Public-key_cryptography[^].

You should understand the main idea: using two keys; encrypting using one key and decrypting with another one. Implications of this thing in security needs thorough thinking. You cannot really proceed until you get it.

This all is based on the notion of one-way function: http://en.wikipedia.org/wiki/One-way_function[^].

To best of my knowledge, the existence of one-way function is not strictly proven yet, but most specialists in the related field of mathematics believe it does exist. One candidate for a one-way function is RSA algorithm: http://en.wikipedia.org/wiki/RSA[^].

It is fully implemented in .NET, see http://msdn.microsoft.com/en-us/library/system.security.cryptography.rsa.aspx[^].

You have everything to get started now.

Good luck,
—SA


这篇关于在C#.net中生成数字签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆