信任链,或称数字证书链,是一连串的数字证书,由根证书为起点,透过层层信任[1],使终端实体证书的持有者可以获得转授的信任[2]以证明身份。基于信息安全的考虑,在进行电子商务或使用政府服务时,交易的另一方用户,以根证书为基础,凭借对签发机构的信任,相信当时持有信任链终端的证书持有者确为其人,并透过公开密钥加密确保通信保密、透过数字签名确保内容无误、以及保证对方不可否认

在信任链中,根证书(自签证书)、中介证书和终端实体(TLS服务器/客户端)证书的关系

公开密钥基础建设已经在X.509RFC 5280指定了使用信任链的认证路径验证算法英语Certification path validation algorithm[3]。其中,会透过证书吊销列表OCSP检查手上得到的证书是否已被证书机构在到期前撤消。另一方面,证书机构签发新的证书时,也可能透过证书透明度公布签发证书的记录,让公众查核,避免有其他机构在未得到当事人同意下滥发欺诈证书伪冒身份。CA/浏览器论坛通过了DNS证书颁发机构授权协议,参与的证书机构会在签发证书前透过域名系统检查是否已获授权。

背景 编辑

互联网中,任何机构都可以登记域名以设立服务器,供大众连接沟通并进行电子商务或使用政府服务。虽然公开密钥加密可以确保通信保密、数字签名可以确保内容无误、以及保证对方无法抵赖;但如果数字证书未获得可供信任的数字证书认证机构数字签名(即自签证书英语Self-signed certificate),对方的真实身份仍然可疑[4](除非通信双方早已互相认识并预先透过安全渠道交换数字证书)。数字证书认证机构在公开密钥加密基建担任了非常重要的角色,电脑软件安装并信任了其根证书,根据其私钥签发的下层证书都可(基于数字签名)被自动信任,如果是中介证书,则再下层的终端实体证书也一样被自动信任,此即构成了一条信任链[5]

举例 编辑

 
维基百科使用的数字证书和信任链

维基百科为例,其信任链包含了三张数字证书:

  1. 维基百科网站因为使用HTTPS,故服务器已安装了数字证书。此证书的主体一栏列明系发给 *.wikipedia.org 所使用,故如果用户是连接任何 *.wikipedia.org 旗下的网站,此证书都适用。此即终端实体证书,亦是TLS服务器证书(由于使用了通配符,所以也是通配符证书)。
  2. 浏览器验证 *.wikipedia.org 的数字证书时,除检查其有效期外,还会再检查其上级签发证书,亦即“GlobalSign Organization Validation CA - SHA256 - G2”--这是中介证书,持有机构已根据组织验证确认 *.wikipedia.org 的拥有者--维基媒体基金会--在现实世界中的身份。
  3. GlobalSign Organization Validation CA - SHA256 - G2”是由“GlobalSign Root CA”所发出,由于“GlobalSign Root CA”没有再上级签发机构,它是自签证书。应用软件会检查此证书有否已预载于根证书清单上:如有,则 *.wikipedia.org 的终端实体证书确认为有效,维基百科网站被认为可信任;否则向用户警告网站未获信任。

总括来说,由于用户信任 GlobalSign,所以由 GlobalSign 所担保的维基百科可以被信任。而由于用户信任操作系统或浏览器的软件商,所以由软件商预载了根证书的 GlobalSign 都可被信任。

参考资料 编辑

  1. ^ How certificate chains work. Symantec (英语). A certificate chain is an ordered list of certificates, containing an SSL Certificate and Certificate Authority (CA) Certificates, that enable the receiver to verify that the sender and all CA's are trustworthy. The chain or path begins with the SSL certificate, and each certificate in the chain is signed by the entity identified by the next certificate in the chain. [永久失效链接]
  2. ^ 數位憑證:你能相信誰?. 趋势科技全球技术支持与研发中心. 2015-05-14 [2017-07-17]. (原始内容存档于2020-09-20) (中文(台湾)). 我们在网络上可以信任谁或什么?每台连到网络的电脑都包含可信任的根CA列表。这些根CA签发的证书可以用来为其他CA或服务器签名证书。任何证书都需有一个“信任链”,让系统看到它所信任的任何一个根证书。 
  3. ^ RFC 5280. IETF (英语). In general, a chain of multiple certificates may be needed, comprising a certificate of the public key owner (the end entity) signed by one CA, and zero or more additional certificates of CAs signed by other CAs. Such chains, called certification paths, are required because a public key user is only initialized with a limited number of assured CA public keys. 
  4. ^ Secure Website Certificate. Mozilla. [2017-07-17]. (原始内容存档于2019-05-11). An https web site is only secure to the extent that the web site is operated by someone in contact with the person who registered the domain name, and the communication between you and the website is encrypted to prevent eavesdropping. No other surety is implied. When you visit a secure website, Firefox will validate the website’s certificate by checking that the certificate that signed it is valid, and checking that the certificate that signed the parent certificate is valid and so forth up to a root certificate that is known to be valid. This chain of certificates is called the Certificate Hierarchy. 
  5. ^ 鏈結信任與憑證授權單位. 微软开发者网络. 证书是在层次结构中建立的,其中每个个别证书都会链接到核发证书的 CA。此链接连至 CA 的证书。接着,CA 的证书会链接至核发 CA 原始证书的 CA。在找到根 CA 的证书之前,会一直重复这个程序。根 CA 的证书在本质上会受到信任。数字签名会借由信任此层次结构 (也称为“信任链接”(Chain of Trust)) 来验证实体。您可以使用 MMC 嵌入式管理单元来查看任何证书的链接,只要按两下任何证书,然后按一下 [证书路径] 选项卡即可。