码迷,mamicode.com
首页 > 其他好文 > 详细

自签名证书的是与非

时间:2016-02-14 00:31:13      阅读:2619      评论:0      收藏:0      [点我收藏+]

标签:

参考资料

https://en.wikipedia.org/wiki/Self-signed_certificate

http://mt.sohu.com/20150602/n414267586.shtml

http://www.1111wo----sign.++++com/FAQ/CRL_OSCP.htm

什么是自签名证书?

In cryptography and computer security, a self-signed certificate is an identity certificate that is signed by the same entity whose identity it certifies.

自签名证书, 首先是一个身份认证证书, 此证书由一个机构签发, 此机构的身份由其自身认证。

In technical terms a self-signed certificate is one signed with its own private key.

技术实现上, 自签名证书是这样一种证书, 机构生成了一个证书,(证书上含有包括公钥,同时还生成一个私钥) 其签名使用的是证书的私钥。

 

In typical public key infrastructure (PKI) arrangements, a digital signature from a certificate authority (CA) attests that a particular public key certificate is valid (i.e., contains correct information).[1]

在典型的公钥基础结构上, 来自CA的数字签名, 才能证明公钥证书是合法的。 证书含有的内容是正规途径认证的。

 

自签名证书的适用前提

CAs are third parties and require both parties to trust the CA.(CAs are typically large, impersonal enterprises and a high-value target for compromise.)

CA系统是三方结构,需要其余两方都信任CA。 CA普遍是大的非个人的企业, 很有可能成为侵害的目标。

 

If the parties know each other, trust each other to protect their private keys, and can confirm the accurate transfer of public keys (e.g. compare the hash out of band), then self-signed certificates may decrease overall risk. Self-signed certificate transactions may also present a far smaller attack surface.

如果通信中的双方, 知道对方,信任对方可以保护好私钥, 并且能够保证公钥的传输的精确性, 则自签名证书 可以 减少整体性风险, 或者可以构成一个更小的攻击面。

 

自签名证书不能吊销,造成危害

Self-signed certificates cannot (by nature) be revoked,[2] which may allow an attacker who has already gained access to monitor and inject data into a connection to spoof an identity if a private key has been compromised. CAs on the other hand have the ability to revoke any compromised certificates they signed if alerted, which prevents its further use.

 

自签名证书不能被吊销, 这样允许了攻击者仿冒身份,如果攻击者拿到了私钥, 并且 能够检测和注入数据在连接过程中。

但是,CA系统就有这个能力吊销被窃取的私钥的证书, 防止证书和私钥被进一步的滥用。

 

Some CAs can verify the identity of the person to whom they issue a certificate; for example the US military issues their Common Access Cards in person, with multiple forms of other ID, and only when a higher authority requires the issue.

某些CA能验证个人的身份, 这些人被CA颁布过证书。 例如 US军方颁布过面向个人的 通用访问卡。

 

吊销证书的非法性 如何验证?

如果一个网站, 私钥丢失, 配套的证书也不能再被信任, 就需要向CA申请吊销目前证书。 申请生效后, 如果攻击者仍然使用 老的证书 干非法的勾当, 则客户端(浏览器)如何验证此证书已经被吊销了呢?

http://www.111wo---sign.+++com/FAQ/CRL_OSCP.htm

证书吊销列表 (Certificate Revocation List ,简称: CRL) 是 PKI 系统中的一个结构化数据文件,该文件包含了证书颁发机构 (CA) 已经吊销的证书的序列号及其吊销日期。

证书吊销列表分发点 (CRL Distribution Point ,简称 CDP) 是含在数字证书中的一个可以共各种应用软件自动下载的最新的 CRL 的位置信息。一个 CDP 通常出现在数字证书的 详细信息 选项卡的 CRL 分发点 域,一般会列出多个使用不同的访问方法,以确保如 Web 浏览器和 Web 服务器程序始终可以获取最新的 CRL 。

 

技术分享

浏览器在使用 https:// 访问已经部署了 SSL 证书的网站时,定会先检查此 SSL证书是否已经被吊销,也就是说会查询吊销列表或 OCSP 服务, 如果此证书已经被证书颁发机构吊销,则会显示警告信息: “此组织的证书已被吊销。安全证书问题可能显示试图欺骗您或截获您向服务器发送的数据。建议关闭此网页,并且不要继续浏览该网站。 ”

 

技术分享

 

自签名证书 与 CA证书的比较

费用

Cost Self-signed certificates can be created for free using a wide variety of tools including OpenSSL, Java‘s keytool, Adobe Reader, and Apple‘s Keychain. Certificates bought from major CAs often cost around a hundred dollars per year. In December 2015[3] Mozilla Foundation has launched Let‘s encrypt, which allows one to obtain a DV certificate gratis.

自签名证书, 可以使用 openssl等工具免费生成, 并免费使用。

但是CA证书, 需要从CA机构购买, 大概一年 100 美刀。

 

自己制作 openssl 工具

http://www.blogjava.net/alwayscy/archive/2006/12/01/84852.html

 

部署速度

Speed to Deploy Self-signed certificates require the two parties to interact (e.g. to securely trade public keys). Using a CA requires only the CA and the certificate holder to interact; the holder of the public key can validate its authenticity with the CA‘s root certificate.

自签名证书, 需要通信的双方都要安装证书, 此双方互动.    相对CA麻烦。

CA证书, 只需要  CA和证书持有者互动, 证书持有者(也是公钥持有者)能够验证其自身的认证, 使用CA根证书。

ps: CA根证书在各大系统和浏览器上已经预装, 无需客户端关心。  自签名的root需要手动安装到客户端。

 

定制化

Customization Self-signed certificates are easier to customize, for example a larger key size, contained data, metadata, etc.

自签名证书 更容易定制, 例如, 更大的密钥长度, 包含数据 和 其它元数据。

 

 

自签名证书典型危害

http://mt.sohu.com/20150602/n414267586.shtml

自签SSL证书最容易被假冒和伪造,被欺诈网站利用

  自签SSL证书是可以随意签发的,不受任何监管,您可以自己签发,别人也可以自己签发。如果您的网站使用自签SSL证书,那黑客也可以伪造一张一模一样的自签证书,用在钓鱼网站上,伪造出有一样证书的假冒网银网站!

  而权威CA机构受国际标准组织审计监督,不可随意签发证书,必须严格认证申请者身份才能签发全球唯一的证书,不会出现被伪造的问题。正规SSL 证书支持所有浏览器,由浏览器内置的可靠验证机制,自动识别SSL证书的真实信息和证书状态,如果出现证书绑定域名与实际域名不符、证书已吊销或已过期等异常情况,浏览器会自动发出警告提醒用户“此网站安全证书存在问题”,假冒网站无处遁形!

 

部署自签SSL证书的网站,浏览器会持续弹出警告

  自签SSL证书是不受浏览器信任的,用户访问部署了自签SSL证书的网站时,浏览器会持续弹出安全警告,极大影响用户体验。

技术分享

 

 

自签SSL证书最容易受到SSL中间人攻击

  用户访问部署了自签SSL证书的网站,遇到浏览器警告提示时,网站通常会告知用户点击“继续浏览”,用户逐渐养成了忽略浏览器警告提示的习惯,这就给了中间人攻击可乘之机,使网站更容易受到中间人攻击。

  典型的SSL中间人攻击就是中间人与用户或服务器在同一个局域网,中间人可以截获用户的数据包,包括SSL数据包,并做一个假的服务器SSL证书与用户通信,从而截获用户输入的机密信息。当网站被假的SSL证书替换时,浏览器会警告用户此证书不受信任,需要用户确认是否信任此证书,用户习惯性点击“继续浏览”,中间人攻击轻而易举的实现了。

技术分享

自签名证书的是与非

标签:

原文地址:http://www.cnblogs.com/lightsong/p/5188459.html

(0)
(1)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!