LTS秘钥协商算法分析

1、根据RCF文档说法 在1-RTT中有两种密钥协商算法(1-RTT ECDHE和 1-RTT PSK  )和4中0-RTT密钥协商方式(0-RTT PSK, 0-RTT ECDH ,0-RTT ECDHE-PSK  ,0-RTT ECDH-ECDHE)

 首先看ECDH密钥的协商:

       计算存在两种方法:

        第一种:密钥生成算法 ECDH_Generate_key 输出一个公钥和私钥对 (ECDH_pub_key,ECDH_pri_key),ECDH_pri_key需要秘密的保存,ECDH_pub_key可以公开发送给对方。

       第二种:密钥协商算法 ECDH_Computer_key ,以对方的公钥最为自己的私钥输入,计算一个key。这样双方计算出来的key 是一致的‘

这种算法存在明显的漏洞,攻击者可以将发送给对方的公钥截获,使用ECDH_Generate_key计算出一对(公钥、私钥)对,然后将公钥发送给对方。这样产生的key就是和攻击者协商的。产生中间人攻击时因为没有经过身份认证。

2、带认证的密钥协商

        ECDH认证密钥协商就是在ECDH密钥协商上加上数字签名,双方协商时对自己发送的 ECDH_pub_key进行签名,收到信息之后首先验证签名是否正确,正确之后再进行协商。签名算法 ECDA_verify_key是公开的。攻击者没有办法阻止对方获得公钥。因此无法伪造签名。

 

posted @ 2019-07-20 22:38  疏桐  阅读(438)  评论(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) }();