公钥密码学如何工作?

发布于 2024-10-10 09:48:50 字数 1459 浏览 0 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

放血 2024-10-17 09:48:51

您可能应该重新表述您的问题:

公钥加密使用非对称方法,其中用于加密的密钥和用于解密消息的密钥不同。下面是 RSA 非对称算法的描述:RSA(非对称加密)

可能没有“常规算法”密码学”。您可能的意思是对称算法,其中两个密钥相同。 对称密钥算法

You should probably re-phrase your question:

Public-key cryptography uses an asymmetric approach where the key used to encrypt and the key used to decrypt a message are not the same. Here is a description of the RSA asymmetric algorithm: RSA (asymmetric cryptography)

There is probably no "conventional crypthography". What you probably mean are symmetric algorithms where both keys are the same. Symmetric key algorithm

惯饮孤独 2024-10-17 09:48:51

基本上,公钥加密意味着您拥有一对“公钥/私钥”密钥。公钥可用于加密消息,但不能解密消息。顾名思义,私钥是秘密的,可用于解密消息。

典型用法如下:

  • Alice 创建一个公钥/私钥对。
  • Alice 将她的公钥发送给 Bob,并将私钥保存在安全的位置。
  • Bob 将加密的消息发送给 Alice。
  • Alice 收到消息并使用她的私钥对其进行解密。

非对称加密的使用示例:

  • 在无法建立可信通道来交换对称密钥(例如 HTTPS)的情况下:因为公钥无法解密,所以通过不可信连接发送它是安全的
  • 当需要使用相同的公钥时由多个用户(例如加密的电子邮件):即使所有发件人都使用相同的公钥,他们也无法使用它来解密任何消息;只有接收者拥有私钥

Basically, public-key cryptography means that you have a "public/private" pair of keys. The public key can be used to encrypt messages, but not decrypt them. The private key is, as the name suggests, secret, and can be used to decrypt the messages.

Typical usage goes like this:

  • Alice creates a public/private key pair.
  • Alice sends her public key to Bob, keeping the private key in a safe location.
  • Bob sends the encrypted message to Alice.
  • Alice receives the message and uses her private key to decrypt it.

Usage examples of asymmetric encryption:

  • In situations where no trusted channel can be established for exchanging symmetric keys (e.g. HTTPS): because the public key cannot decrypt, it is safe to send it over an untrusted connection
  • When the same public key needs to be used by more than one user (e.g. encrypted e-mail): even though all the senders use the same public key, they cannot use it to decrypt any messages; only the recipient has the private key
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文