关于私钥和公钥加密 [英] Regarding private and public key encryption

查看:96
本文介绍了关于私钥和公钥加密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我使用c#进行私钥和公钥加密。所以,当我加密任何东西并转发到x先生那么x先生应该解密的密钥和x先生应该加密哪些密钥我可以解密?
suppose i am using private and public key encryption with c#. so when i encrypt anything and forward to Mr x then what key Mr x should have to decrypt and what key Mr x should have to encrypt which i can decrypt?

推荐答案

一般情况下,双方都会保留自己的私钥,并互相提供公钥。

In general, both side will keep their own private key, and provide the public key to each other.

让我们说,您可以使用X先生提供的公钥进行加密,然后X先生可以用他的私钥解密您的邮件。

Let say, you could use your public key provided by Mr. X to do the encryption, and then Mr. X could decrypt your message with his private key.

另一方面,X先生可以使用您的公钥加密他的消息,然后您可以使用您的私钥来执行解密。

On the other hand, Mr. X could encrypt his message with your public key, and then your could use your private key to perform the decryption.

我认为以下链接应该对你有所帮助:

I think the following links should be helpful to you:

使用C#的RSA算法

非常简单的不对称c C#中的RSA加密





这篇关于关于私钥和公钥加密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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