该查询涉及在Vb.net 2010中生成和使用一组非对称密钥 [英] The query is regarding generating and using a set of asymmetric keys in Vb.net 2010
本文介绍了该查询涉及在Vb.net 2010中生成和使用一组非对称密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我不熟悉密码学,急需帮助。
*我想基于密码生成一组非对称密钥。
*使用私钥加密字符串以加密文本
*在我的程序中使用公钥解密来自文本文件的密文
*使用解密的信息为我的应用程序的用户授予权利。
请建议输出命令的例子,如果可能的话。
我试过在网上和书中搜索但没有成功。
提前谢谢。
hello all,
I am new to cryptography and need you urgent help.
* I want to generate a set of asymmetric keys based on a password.
* Use Private key to encrypt a string to cipher text
* Use public key in my program to decrypt the cipher text from a text file
* Use the decryped information to give rights to users of my application.
Please suggest the wayout with example of commands, if possible.
I have tried searching on net and in books but no success.
Thanks in advance.
推荐答案
这里解释了所有的想法: http://en.wikipedia.org/wiki/Public-key_cryptography [ ^ ]。请仔细阅读。
由于您希望公开解密密钥,您的数据可以被任何人解密。那么,有什么用?它是这样的:它可以用来保护源文档使用数字签名方案伪造: http://en.wikipedia.org/wiki/Digital_signature [ ^ ]。
反过来,数字签名可用于数字证书:http://en.wikipedia.org/wiki/Digital_certificate [ ^ ]。
使用.NET FCL,已经为您实现了许多加密功能。由于您对非对称算法(以及公钥加密)感兴趣,您可以从这里开始: http://msdn.microsoft.com/en-us/library/system.security.cryptography.asymmetricalgorithm%28v=vs.110%29.aspx [ ^ ]。
-SA
All the ideas are explained here: http://en.wikipedia.org/wiki/Public-key_cryptography[^]. Please read very carefully.
As you want to make the decryption key public, your data can be decrypted by anyone. So, what's the use? Here is what it is: it can be used to protect the source document from faking using the digital signature schemes: http://en.wikipedia.org/wiki/Digital_signature[^].
In turn, digital signatures can be use in digital certificates: http://en.wikipedia.org/wiki/Digital_certificate[^].
With .NET FCL, a lot of encryption stuff is already implemented for you. As you are interested in asymmetric algorithms (and public-key cryptography) in particular, you can start here: http://msdn.microsoft.com/en-us/library/system.security.cryptography.asymmetricalgorithm%28v=vs.110%29.aspx[^].
—SA
这篇关于该查询涉及在Vb.net 2010中生成和使用一组非对称密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文