7

I have an exam tomorrow in Advanced Development, but I am stuck on the topic of Encryption. I have read up on it at http://support.microsoft.com/kb/246071. However I am still confused.

If a message is encrypted using Asymmetric Encryption, using the public key, how is the decryptor going to know the private key with which to decrypt it? Surely the only way to do this is to make the private key public, but that defeats the object of Asymmetric Encryption.

Can someone please explain this in a way that a non-techie would be able to understand it? Its only Asymmetric Encryption I dont understand, not Symmetric Encryption. Thanks in advance.

Regards,

Richard

Edit: So to sum up all the answers in the case of a web application (the specific use for which I need to know about this):

  1. User visits a website;
  2. User is requested to provide a public key;
  3. User creates public and private key-pair, keep the private one private and sends back the public key to the server;
  4. Server uses the public key to encrypt anything which needs to be sent to the user and sends the information to the user;
  5. User uses his / her private key to decrypt the response from the server;
  6. User does what they need to and sends back a response to the server, using the private key to encrypt it;
  7. Server decrypts using the public key. Steps 4 - 7 may continue many times, or they may only happen once, or only 4 and 5 may occur.

Is this all correct? If so then it should be all I need to know for the exam. I shouldnt think I would need to know any more to get the maximum 40% should a question on this subject come up - will mention the existence of certificates and signatures though.

Thank you for all the help.

Regards,

Richard

Edit: Well I have just got back from my exam and it went fairly ok I think. But no question on cryptography came up, however... The help was appreciated anyway. Thanks all.

Regards,

Richard

4

5 回答 5

13

私钥意味着只有其合法用户知道而不是分发。其对应的公钥可以分发给任何人。

基于此,可以得到4个操作:

  • 使用公钥加密
  • 使用私钥解密
  • 使用私钥签名
  • 使用公钥验证签名

您可能遇到的下一个问题是将身份绑定到公钥(因为您不希望使用冒名顶替者的公钥对某些内容进行加密或信任某些内容)。有多种公钥分发模型。通常,您可以:

  • 信任网络,人们在公钥和身份之间签署彼此的关联:这通常是 PGP 模型。
  • 一种公钥基础设施(PKI),您可以在其中让证书颁发机构以树状层次结构生成证书,通常带有中间体。(PGP 也可以使用这种模型,但这似乎不太常见。)
于 2010-08-30T20:23:24.640 回答
7

Alice 创建了她的私钥 + 公钥。她将她的私钥保密。她公开了她的公钥。

Bob 使用 Alice 的公钥(他应该首先验证它确实是 Alice 的公钥!),并使用它来加密一条消息,然后发送给 Alice。

Alice 可以使用她的私钥解密消息。

于 2010-08-30T20:02:13.790 回答
5

其他人提供了“通用”描述,我将更深入地探讨现实生活。

大多数现代非对称加密标准不使用原始公钥和私钥,而是使用更复杂的包装器,例如 X.509 证书或 OpenPGP 密钥(这是当今两种最流行的非对称加密基础设施)。证书和 OpenPGP 密钥都包含额外信息,可以轻松识别、搜索和管理它们。

现在,加密的数据块通常包括用于加密的公共部分(即证书或公共OpenPGP密钥),或者至少包括ID(这个公共部分的哈希)。数据的接收者通常拥有(或应该拥有)公共和私人部分(私钥通常与证书或公共 openpgp 密钥一起保存)。因此,当接收者收到加密数据时,他知道他需要在他的私钥存储中查找具有给定 ID 的公共部分(或者当它包含在加密数据中时为给定的公共部分)。

存在不包含任何内容的情况。然后接收者无事可做,只需尝试所有可用的私钥进行解密。但这种情况很少见,因为默认情况下证书或密钥 ID 存在于加密数据块中。

于 2010-08-30T20:20:51.380 回答
2

公钥由“解密器”提供给“加密器”,因此,根据定义,“解密器”知道私钥(因为它是“解密器”创建的密钥对的一部分。

于 2010-08-30T19:53:20.483 回答
1

假设“解密器”= D,“加密器”= E。

D 之前将他的公钥发送给 E,因此 E 可以加密消息。因为只有 D 知道自己的私钥,所以只有 D 知道如何解密 E 刚刚发送给他的消息(记住:一个密钥用于加密,另一个用于解密)。通过这种方式,您可以获得隐私。

于 2010-08-30T20:00:24.687 回答