加入收藏 | 设为首页 | 会员中心 | 我要投稿 西安站长网 (https://www.029zz.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 教程 > 正文

理解 HTTPS 的工作原理

发布时间:2019-08-20 21:47:22 所属栏目:教程 来源:IT生涯
导读:副标题#e# HTTPS,也称作HTTP over TLS。TLS的前身是SSL,TLS 1.0通常被标示为SSL 3.1,TLS 1.1为SSL 3.2,TLS 1.2为SSL 3.3。本文着重描述TLS协议的1.2版本。 下图描述了在TCP/IP协议栈中TLS(各子协议)和HTTP的关系 Credit: Kaushal Kumar Panday From: SS

This message conveys the client’s certificate chain to the server; the server will use it when verifying the CertificateVerify message (when the client authentication is based on signing) or calculating thepremaster secret (for non-ephemeral Diffie- Hellman). The certificate MUST be appropriate for the negotiated cipher suite’s key exchange algorithm, and any negotiated extensions.

Alert protocol有什么作用?

Closure Alerts:防止Truncation Attack

In a truncation attack, an attacker inserts into a message a TCP code indicating the message has finished, thus preventing the recipient picking up the rest of the message. To prevent this, SSL from version v3 onward has a closing handshake, so the recipient knows the message has not ended until this has been performed.

Error Alerts:错误处理

master secret是如何计算的

  1. master_secret = PRF(pre_master_secret, "master secret", 
  2.  ClientHello.random + ServerHello.random) 
  3.  [0..47]; 

加密,压缩和MAC算法参数是如何计算的

Handshaking Protocols使得客户端和服务端交换了三个参数:client_random,server_random和master_secret,通过以下算法生成算法所需要的参数

  1. To generate the key material, compute 
  2.  key_block = PRF(SecurityParameters.master_secret, 
  3.  "key expansion", 
  4.  SecurityParameters.`server_random ` + 
  5.  SecurityParameters.`client_random`); 
  6. until enough output has been generated. Then, the key_block is 
  7. partitioned as follows: 
  8.  client_write_MAC_key[SecurityParameters.mac_key_length] 
  9.  server_write_MAC_key[SecurityParameters.mac_key_length] 
  10.  client_write_key[SecurityParameters.enc_key_length] 
  11.  server_write_key[SecurityParameters.enc_key_length] 
  12.  client_write_IV[SecurityParameters.fixed_iv_length] 
  13.  server_write_IV[SecurityParameters.fixed_iv_length] 

(编辑:西安站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

推荐文章
    热点阅读