服务器是否同时生成私钥和公共密钥?

发布于 2025-02-08 09:32:16 字数 76 浏览 1 评论 0原文

在通过浏览器浏览网络时,服务器何时将公共密钥发送给客户端?还是相反? 我正在阅读对问题的回答,并想发表评论,但是由于我缺乏声誉,我做不到。

While surfing the web through a browser, when does the server send the public key to the client? or is it the other way around?
I was reading a response to a questions earlier and wanted to comment but due to my lack in reputation, I couldn't.

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

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

发布评论

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

评论(1

鱼忆七猫命九 2025-02-15 09:32:16

我希望这可以回答您的问题:

使用“ https”或“ http over tls/ssl”访问网站时,
钥匙交换机工作类似:\

  • 客户端向服务器发送“客户端Hello”。
  • 服务器同时生成 public 私有密钥
  • 服务器用“服务器Hello”回答,并将公共密钥发送给客户端。
  • 客户端使用此 public键对所谓的 pre-Master Secret 加密并将其发送到服务器。
  • 然后,服务器可以用他的私钥与
  • 服务器和客户端从 pre-Master pre-Master Secret 计算 Master Secret 的服务器 >。
  • 服务器和客户端都从此秘密计算 session键(用于对称加密)。

现在,客户端和服务器可以与此会话密钥通信。

参考:

I hope this can answer your question:

When visiting a website using 'https' or 'http over tls/ssl',
the key exchange works something like this:\

  • The Client sends a "Client Hello" to the server.
  • The server generates both the public and private key.
  • The Server answers with "Server Hello" and sends the public key to the Client.
  • The Client encrypts a so-called pre-master secret with this public key and sends it to the server.
  • The Server can then decrypt this pre-master secret with his private key
  • Both the Server and the Client calculate a master secret from the pre-master secret.
  • Both the Server and the Client calculate the session key (for a symmetric encryption) from this secret.

Now the Client and Server can communicate with this session key.

Reference:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文