当前位置:网站首页>价值超高的CA证书解析
价值超高的CA证书解析
2022-06-12 16:49:00 【早起之王】
目录
什么是CA证书
CA证书,是公钥基础设施的核心,是CA机构签发的身份凭证。如果网页没有申请CA证书,在访问的时候就会弹出没有证书的提示。
CA证书的建立
首先是服务器会生成自己的公钥和私钥,服务器申请CA证书,需要把公钥交给CA机构。
接着就是为这个服务器创建CA证书。CA证书结构如下:内容和签名第一部分:服务端的公钥,服务器名称、授权中心名称、有效期、序列号等第二部分:数字签名。
用哈希加密算法对第一部分进行压缩,这是不可逆的,无法通过压缩后的数据得到原数据。
CA机构为服务器分配一套CA的公钥和私钥。当然 “ 分配 ” 给服务器的私钥,并不是发送给服务器,只是用于加密。CA 机构使用私钥对压缩后的内容进行加密,得到数字签名。
CA证书发送给服务端。
CA 根证书的 CA 根公钥内置在浏览器,CA 根证书内置在客户端的操作系统。
CA证书在HTTPS中是怎样应用的
现在开始 https请求流程:首先是三次握手建立TCP连接。
TCP三次握手,建立连接。
服务端向客户端发送证书。
客户端收到证书,将证书上的CA根证书与操作系统内置的CA根证书匹配。
如果匹配失败,说明证书不合法。匹配成功,则继续。
客户端进行哈希压缩证书的内容得到一段数据。
客户端使用浏览器内置的 CA公钥解密数字签名,获得一段数据。
两段数据对比,如果相同,代表没有问题。
如果不同,可能证书被修改过或者不是使用CA公钥加密的。
从匹配证书之后的操作,是保护CA证书本身的。
客户端生成随机对称密钥,使用服务端的公钥(通过证书获取)给这个密钥加密,发送给服务端。
然后通过客户端生成的对称密钥进行http通信。
CA证书在HTTPS中的作用
在 https 中CA证书的作用是判断网站是否合法,顺便把服务器的公钥带到客户端。
注意:
CA证书确认了网站是否合法。
HTTPS的数据加密是由客户端生成的随机密钥和服务器的公钥、私钥完成的。
早睡早起,一日千里
边栏推荐
- Object. Keys traverses an object
- Google browser debugging skills
- Probation period and overtime compensation -- knowledge before and after entering the factory labor law
- Uniapp壁纸小程序源码/双端微信抖音小程序源码
- [MySQL] Cartesian product - multi table query (detailed explanation)
- Joint recruitment notice of ganfei research group of Wuhan University and xuzhenjiang research group of Nanchang University
- Pat class a 1139 first contact
- IDEA在控制台显示出services,统一管理所有的jetty服务,
- Recommend 6 open source projects of yyds
- Google浏览器调试技巧
猜你喜欢

使用GCC的PGO(Profile-guided Optimization)优化整个系统

【湖南大学】考研初试复试资料分享

redis. clients. jedis. exceptions. JedisConnectionException: Could not get a resource from the pool

Project training of Shandong University rendering engine system (III)
![[Hunan University] information sharing of the first and second postgraduate entrance examinations](/img/15/298ea6f7367741e1e085007c498e51.jpg)
[Hunan University] information sharing of the first and second postgraduate entrance examinations

云开发坤坤鸡乐盒微信小程序源码

Advanced Qt development: a preliminary study QT + OpenGL

The safety of link 01 was questioned, and "ultra high strength" became "high strength"_ Publicity_ Steel_ problem

uabntu的sudo

canvas 高级功能(下)
随机推荐
The safety of link 01 was questioned, and "ultra high strength" became "high strength"_ Publicity_ Steel_ problem
大端模式和小端模式的區別
JS using RSA encryption and decryption
WebRTC 的音频网络对抗概述
【湖南大学】考研初试复试资料分享
Leetcode 2190. The number that appears most frequently in the array immediately after the key (yes, once)
使用ubantu时,遇见的一些小毛病和解决方法
(六)控制语句if/else switch
图片在线收款发货系统源码
Recommend 6 open source projects of yyds
[MySQL] Cartesian product - multi table query (detailed explanation)
PAT甲级 1142 最大团
Pat class a 1139 first contact
CAS optimistic lock
The C programming language (version 2) notes / 8 UNIX system interface / 8.2 low level i/o (read and write)
(七)循环语句for
JVM内存模型与本地内存
[Hunan University] information sharing of the first and second postgraduate entrance examinations
Pat class a 1142 largest regiment
How to do a good job of testing in the company (do a good job of testing)