HTTPS是否使用非对称或对称加密? [英] Does HTTPS use Asymmetric or Symmetric encryption?

查看:346
本文介绍了HTTPS是否使用非对称或对称加密?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我整个上午都在搜索,但是我发现据说使用TLS协议通过非对称加密发送数据的网站.然后我发现相反.请您告诉我那是真的吗?谢谢.谁知道一个指南,该指南逐步解释了通过HTTP进行TLS协议的握手吗?

I have searched all this morning but I've found websites where it is said that data is sent through an asymmetric encryption using the TLS protocol. Then I found the contrary. Please can you tell me which is true? Thanks. And does anyone know a guide where it is explained step by step the handshake of TLS protocol over http?

推荐答案

HTTPS(非HTTP)中使用对称密钥和非对称密钥.但是只有对称密钥用于加密.它们比非对称算法快得多,因此更适合处理大型消息(网络流量很大).

Both symmetric and asymmetric keys are used in HTTPS (not HTTP). But only symmetric key is used for encryption. They are much faster than asymmetric algorithms and thus serve better for working with large messages (which web traffic is).

但是对称密钥需要以某种方式共享,您不能只是按原样发送它.否则,中间人将知道它,从而能够解密消息.因此,其他算法(

But symmetric key needs to be shared somehow, you can't just send it as is. Otherwise the man-in-the-middle will know it and thus will be able to decrypt the messages. Hence additional algorithm (Diffie-Helman) is used - it's a nice trick to exchange private data on the open channel. This algorithm uses asymmetric keys for data signing (not encryption).

PS:SSH中使用了类似的机制.

PS: similar mechanism is used in SSH.

这篇关于HTTPS是否使用非对称或对称加密?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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