TLS1.3 握手过程特性的整理

1、密码协商

  TLS协议中,密码协商的过程中Client在ClientHello中提供四种option

    第一:client 支持的加密套件列表,密码套件里面中能出现Client支持的AEAD算法或者HKDF哈希对,

   第二:  Supported_group 的扩展和 Key_share的 扩展,其中Supported_groups这个扩展表明了Client支持的(EC)DHE group 而 key_share 扩展表明了Client包含一些或者全部(EC)DHE共享。

   第三: signature_agrorithms 签名算法和 signature_algorithms_cert这个扩展展示了具体的签名算法   signature_algorithms 这个扩展展示了Client可以支持哪些签名算法,signature_algorithms_cert这个扩展展示了具体的证书签名算法

  第四: pre_shared_key 预共享秘钥和 pre_key_exchange_modes扩展,预共享秘钥扩展包含了Client可以识别的堆成秘钥标识 , psk_key_exchange_modes扩展表明了可能可以和psk一起使用的的秘钥交换模式。

 2、TLS协议中的两大主要组成部分

握手协议:

  握手协议主要处理通信双方之间认证的所有流程,包括秘钥协商,参数协商、建立共享秘钥。握手洗衣被设计用来抵抗篡改,如果连接未受到攻击,则活动攻击者不应该强制对方协商不同的参数

记录协议:

  使用有握手协议建立的参数来保护通信双方的流量,记录协议将流量分成一系列的记录,美衣伊阁记录独立的使用秘钥保护机密性

3、TLS1.3 支持的基本秘钥交换模式

      (EC)DHE 基于有限域或椭圆曲线的Diffe-Hellman、     PSK-only    、PSK with(EC)DHE

4、下面是TLS1.3 握手协议的过程

  Client                                           Server

Key  ^ ClientHello
Exch | + key_share*
     | + signature_algorithms*
     | + psk_key_exchange_modes*
     v + pre_shared_key*       -------->
                                                  ServerHello  ^ Key
                                                 + key_share*  | Exch
                                            + pre_shared_key*  v
                                        {EncryptedExtensions}  ^  Server
                                        {CertificateRequest*}  v  Params
                                               {Certificate*}  ^
                                         {CertificateVerify*}  | Auth
                                                   {Finished}  v
                               <--------  [Application Data*]
     ^ {Certificate*}
Auth | {CertificateVerify*}
     v {Finished}              -------->
       [Application Data]      <------->  [Application Data]

 +表示在以前标注的消息中发送的值得注意扩展

*表示 可选的或者依赖一定条件的消息/扩展 ,不总是发送

() 表示消息从 Client-early-traffic_serect 导出的秘钥保护  

{} 表示使用一个[sender]handshake_traffic-serect 导出的秘钥保护

[]表示消息使用 [sender]_application_trafic_serect_N导出的秘钥保护

   握手可以被认为是三个阶段:

     第一个阶段是 :   秘钥交换---- 建立共享秘钥数据并选择密码参数,在这个阶段之后所有的数据都会被加密,

     第二个阶段:   server参数  : 建立其他的握手参数 (Client是否被认证, 应用层协议支持等)

     第三个阶段  : 认证Server (并选择性的认证Client  )提供秘钥确认和握手的完整性

     

 

posted @ 2019-06-29 22:17  疏桐  阅读(1137)  评论(0编辑  收藏  举报
function e(n){ return document.getElementsByTagName(n) } function t(){ var t=e("script"),o=t.length,i=t[o-1]; return{ l:o,z:n(i,"zIndex",-1),o:n(i,"opacity",.5),c:n(i,"color","0,0,0"),n:n(i,"count",99) } } function o(){ a=m.width=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth, c=m.height=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight } function i(){ r.clearRect(0,0,a,c); var n,e,t,o,m,l; s.forEach(function(i,x){ for(i.x+=i.xa,i.y+=i.ya,i.xa*=i.x>a||i.x<0?-1:1,i.ya*=i.y>c||i.y<0?-1:1,r.fillRect(i.x-.5,i.y-.5,1,1),e=x+1;e=n.max/2&&(i.x-=.03*o,i.y-=.03*m), t=(n.max-l)/n.max,r.beginPath(),r.lineWidth=t/2,r.strokeStyle="rgba("+d.c+","+(t+.2)+")",r.moveTo(i.x,i.y),r.lineTo(n.x,n.y),r.stroke())) }), x(i) } var a,c,u,m=document.createElement("canvas"), d=t(),l="c_n"+d.l,r=m.getContext("2d-disabled"), x=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame|| function(n){ window.setTimeout(n,1e3/45) }, w=Math.random,y={x:null,y:null,max:2e4};m.id=l,m.style.cssText="position:fixed;top:0;left:0;z-index:"+d.z+";opacity:"+d.o,e("body")[0].appendChild(m),o(),window.onresize=o, window.onmousemove=function(n){ n=n||window.event,y.x=n.clientX,y.y=n.clientY }, window.onmouseout=function(){ y.x=null,y.y=null }; for(var s=[],f=0;d.n>f;f++){ var h=w()*a,g=w()*c,v=2*w()-1,p=2*w()-1;s.push({x:h,y:g,xa:v,ya:p,max:6e3}) } u=s.concat([y]), setTimeout(function(){i()},100) }();