为什么我们信任 SSL 证书?

发布于 2024-07-14 02:38:46 字数 93 浏览 8 评论 0原文

我的一位朋友问我,如果理论上每个人都可以颁发 SSL 证书,为什么我们要花这么多钱购买 SSL 证书。 确实是为什么? 而我们如何判断浏览器中的小锁是否真的值得信赖呢?

A friend of mine asked me why we pay so much for SSL certificates if everyone could theoretically issue one. Why indeed? And how do we judge if the little lock in the browser is really trustworthy?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

影子的影子 2024-07-21 02:38:46

证书由证书颁发机构 (CA) 进行加密签名,每个浏览器都有一个它隐式信任的 CA 列表。 这些 CA 是拥有一组加密密钥的实体,可用于签署任何证书,通常需要付费。 受信任列表中的 CA 签署的任何证书都会锁定浏览器,因为它被证明是“受信任的”并且属于该域。

可以对证书进行自签名,但浏览器会警告您签名者不受信任,要么在允许您进入之前显示一个大错误框,要么显示一个损坏的锁定图标。

此外,即使受信任的证书如果用于错误的域或被修改为包含另一个域,也会给出错误。 这是可以确保的,因为证书包含允许使用它的域,并且它还具有确保其完整性的加密校验和/指纹。

目前这并不是 100% 安全,因为有可能伪造使用 MD5 的 CA 证书,请参阅此链接:http://www.phreedom.org/research/rogue-ca/。 但必须指出的是,这相当困难,因为他们利用了现有 CA 中的一个弱点,而该 CA 可能已经关闭,也可能尚未关闭。

本质上,我们信任这些证书,就像我们相信我们的浏览器提供商知道如何选择“正确的”CA 一样。 这些 CA 仅凭借其声誉而受到信任,因为从理论上讲,一旦被发现,一个单一的失误就会对其可信度造成非常沉重的打击。

Certificates are cryptographically signed by something called a Certificate Authority(CA), and each browser has a list of CAs it implicitly trusts. These CAs are entities that have a set of cryptographic keys that can be used to sign any certificate, often for a fee. Any certificate signed by a CA in the trusted list will give a lock on a browser, because it's proven to be "trusted" and belongs to that domain.

You can self-sign a certificate, but the browser will warn you that the signer is not trusted, either by showing a big error box before allowing you in, or showing a broken lock icon.

In addition, even a trusted certificate will give an error if it's used for the wrong domain, or is modified to include another domain. This is ensured because the certificate includes the domains it is allowed to be used for, and it also has a cryptographic checksum/fingerprint that ensures its integrity.

This is not 100% safe at the moment, as there is the possibility to fake CA certificates that use MD5, see this link: http://www.phreedom.org/research/rogue-ca/. Though it has to be noted that this is pretty hard, as they exploited a weakness in an already existing CA, which may or may not have been closed by now.

In essence, we trust the certificates as much as we trust that our browser providers know how to select "proper" CAs. Those CAs are only trusted on virtue of their reputation, as a single misstep theoretically would be a very heavy blow on their trustworthiness if detected.

在风中等你 2024-07-21 02:38:46

整个CA业务都很棒。 我从rapidssl.com 购买了几个证书,他们所需的所有“证明”是:

  1. 我可以接收到该域的邮件。
  2. 我可以接电话。

就是这样。 请记住,在信任浏览器中的小锁时。

The whole CA business is amazing. I've purchased a couple of certificates from rapidssl.com, and all the "proof" they required was:

  1. I could receive mail to the domain.
  2. I could answer my phone.

That was it. Keep in mind, when trusting the little locks in the browser.

流殇 2024-07-21 02:38:46

首先,了解 SSL 所基于的强公钥/私钥加密技术的一些背景:

密钥有两部分:私钥部分和公钥部分。 公钥可用于加密需要私钥才能解密的材料。 这允许使用开放的通信渠道进行安全通信。

公钥/私钥加密的一个重要方面是私钥可用于对消息进行数字签名,该消息可使用公钥进行验证。 这使得消息的接收者能够具体验证他们收到的消息是否是由发送者(密钥的持有者)发送的。

SSL 证书的关键是加密密钥本身可以进行数字签名。

“证书”由私钥/公钥对以及数字签名数据组成。 当有人购买 SSL 证书时,他们会生成私钥/公钥,并将公钥提交给证书颁发机构 (CA) 进行签名。 CA 对 SSL 证书的购买者进行适当级别的尽职调查,并使用其私钥签署证书。 SSL 证书将绑定到特定网站或网站集,本质上是 CA,表明他们信任证书私钥的所有者是这些网站的正确所有者。

默认情况下,主要浏览器和操作系统中包含受信任 CA 的根证书(公钥和其他元数据)(在 Windows 中,在运行提示符中键入“certmgr.msc”以查看证书管理器)。 当您使用 SSL 连接到 Web 服务器时,服务器将向您发送其 SSL 证书,包括公钥和其他元数据,所有这些都由 CA 签名。 您的浏览器能够通过签名和预加载的根证书来验证证书的有效性。 这会在 CA 和您要连接的 Web 服务器之间创建一条信任链​​。

First, some background on strong public/private key cryptography, which SSL is based on:

A key has two parts, the private part and the public part. The public key can be used to encrypt material that requires the private key to decrypt. This allows the use of open communication channels to communicate securely.

One important aspect of public/private key cryptography is that the private key can be used to digitally sign a message which can be verified using the public key. This gives the receiver of a message the ability to verify concretely that the message they received was sent by the sender (the holder of the key).

The key to SSL certificates is that encryption keys themselves can be digitally signed.

A "certificate" is composed of a private/public key pair as well as digitally signed data. When someone buys an SSL certificate they generate a private/public key and submit the public key to a Certification Authority (CA) to be signed. The CA performs an appropriate level of due diligence on the buyer of the SSL certificate and signs the certificate with their private key. The SSL certificate will be bound to a particular website or set of websites and is essentially the CA indicating that they trust the owner of the private key of the certificate to be the proper owner of those websites.

The root certificates (public keys and other meta-data) for trusted CAs are included by default in major shipping browsers and operating systems (in windows, type "certmgr.msc" into a run prompt to see the certificate manager). When you connect to a web server using SSL the server will send you its SSL certificate including the public key and other meta data, all of which is signed by the CA. Your browser is able to verify the validity of the certificate, through the signature and the preloaded root certificates. This creates a chain of trust between the CA and the web server you are connecting to.

我为君王 2024-07-21 02:38:46

因为我们必须信任某人。

受信任的 SSL 证书具有受信任机构的签名。 例如,VeriSign 与 Microsoft 达成协议,他们的证书内置在您的浏览器中。 因此,您可以使用 VeriSign 可信证书信任每个页面。

这张图确实抓住了要点:

PKI

  • RA = 注册机构
  • CA = 证书颁发机构
  • VA = 验证机构

粗略概要:用户申请
带有他的公钥的证书
注册机构(RA)。 这
后者确认用户的身份
认证机构 (CA)
依次颁发证书。 这
然后用户可以对
使用他的新证书签订合同。
随后,他的身份将被警方核实
具有验证的缔约方
当局(VA)再次收到
有关已颁发证书的信息
由认证机构颁发。

Because we have to trust someone.

Trusted SSL certificates have signatures of trusted authorities. For example, VeriSign has a deal with Microsoft, that their certificate is built in your browser. So you can trust every page with a VeriSign trusted certificate.

This graphic really picks the point:

PKI

  • RA = Registration Authority
  • CA = Certification Authority
  • VA = Validation Authority

Rough outline: A user applies for a
certificate with his public key at a
registration authority (RA). The
latter confirms the user's identity to
the certification authority (CA) which
in turn issues the certificate. The
user can then digitally sign a
contract using his new certificate.
His identity is then checked by the
contracting party with a validation
authority (VA) which again receives
information about issued certificates
by the certification authority.

月亮坠入山谷 2024-07-21 02:38:46

如果您没有使用接受的 CA 之一,人们在访问网站时会收到一个有关不受信任证书的消息框。 这无助于增加网站的流量。

锁定仅意味着网站所有者向 CA 提供了某种证据,证明他确实是他所声称的人。 如果您信任该人/网站,您必须自行判断。

这就像一个陌生人向您出示带照片的身份证件。 你是否因为确定他的名字是约翰·多伊而更加信任他? 可能不会。

但当你信任的人告诉你:“无名氏”是个好人时。 证明你面前的人实际上是“John Doe”,那么你也可能会选择信任他。

If you are not using one of the accepted CAs people will get a message box when accessing the site talking about an untrusted certificate. That won't help to generate traffic to the site.

The lock only means that the site owner showed a CA some kind of proof that he really is who he claims to be. You must judge on your own if you trust that person/site.

It's like a stranger showing you a photo ID. Do you trust him more because you know for sure his name is John Doe? Probably not.

But when people you trust told you: "John Doe" is a good guy. The proof that the guy in front of you actually IS "John Doe", than you might choose to trust him as well.

巷子口的你 2024-07-21 02:38:46

为什么? 因为你付钱是为了利用别人的声誉......为你做担保。

关键在于谁来验证你的身份。 尽管我最近看了一些纪录片,而且经济衰退,但当他们向我确认你的身份时,我仍然更有可能相信美国企业,而不是我是俄罗斯黑手党。 尽管两者都可以轻松地颁发证书。

您支付的金额基本上只是(他们为确保声誉和/或抑制任何安全漏洞而花费的费用)+(无论他们有能力以利润百分比形式欺骗市场)。

现在进入的门槛相当高,因为赢得这种信任的成本非常高,所以竞争并不激烈。 因此,价格很可能不会很快下跌……除非索尼或通用电气等决定参与其中。

Why? Because you're paying to ride along on someone elses reputation.... to vouch for you.

Its all about whose validating your claim to be you. Despite some of the documentaries Ive watched lately, and the recession, I'm still more likely to believe corporate America when they confirm your identity to me, than I am the Russian mafia. Even though both can just as easily issue certificates.

The amount you pay is basically just (how much it costs them to secure that reputation and/or suppress any security breaches) + (however much they can afford to gouge the market as a margin %).

Now the barriers to entry are quite high, cos its really expensive to earn that trust, so theres not a lot of competition. Therefore chances are the price isn't going to fall anytime soon.... unless Sony or GE etc decide to play.

痴骨ら 2024-07-21 02:38:46

您需要支付证书费用,这样当您使用 HTTPS(对于任何有点敏感的内容都应该使用 HTTPS)时,您的客户就不会收到严重警告并打电话给您的支持人员,说您已经感染了他们并阻止了他们。 等等……

安全性很低,很多 FUD。

如果您可以直接向客户提供自己的证书,请这样做。 但这是一种罕见的情况。

You pay for a certificate so that when you go HTTPS (which you should for anything a little sensitive) your clients don’t get big warnings and go call your support saying that you have infected them & al…

Very little security, lot of FUD.

If you have the possibility of giving your clients your own certificate directly, do it. But it is a rare case.

゛清羽墨安 2024-07-21 02:38:46

让我们创建一个攻击场景。

假设 DNS 已损坏并且 https://facebook.com/ 指向攻击者的 IP 。

你坐在电脑前,打开 Facebook,浪费几分钟时间进行毫无意义的滚动。 然后屏幕上会显示“砰”的一声,证书无效错误。 攻击者使用自己的证书签署了 https://facebook.com/,以确保没有人会离开他复制的 Facebook 页面因为它没有加密,所以看起来很可疑。 如果浏览器不检查证书的权限,那么攻击者可能会使用他的证书签署损坏的页面,并且您不会意识到自己连接到了错误的 IP。

因此,攻击者有 2 个选项可供选择:

  1. 使用他的证书签署损坏的 Facebook 页面,这样用户就会看到错误。
  2. 不要在他损坏的页面上使用 https。

Let's create an attack scenario.

Suppose the DNS was corrupted and https://facebook.com/ points to attacker's IP.

You sit down to your PC and open Facebook to loose few minutes on pointless scrolling. And then BANG, Certificate invalid error shows on your screen. Attacker signed https://facebook.com/ with his own cert to make sure no one will leave his copied facebook page because it's not encrypted so it looks suspicious. If browser wouldn't check certificate's authority, then attacker could sign corrupted page with his cert and you won't be aware you're connecting to the wrong IP.

So the attacker has 2 options to choose from:

  1. Sign corrupted facebook page with his cert, so users will see an error.
  2. Don't use https on his corrupted page.
蓝眼睛不忧郁 2024-07-21 02:38:46

证书建立在信任链上,如果让任何人成为签名机构,我们就会暗中信任每个人。 不过今天有点可怕,因为有超过 200 个所谓的“受信任的机构”的证书内置在您的浏览器中!

据我所知,有一个免费的 CA:StartCom。 他们颁发免费的 SSL 证书,但仅 Firefox 接受,IE 不接受。 (不确定 Safari 或 Opera)。

Certificates are built on a chain of trust, and if let anyone be a signing authority, we would be implicitly trusting everyone. It's a bit scary today though, since there are over 200 so called "trusted authorities" whose certs are built into your browser!

There is one free CA that I know of though: StartCom. They issue free SSL certs, but they are only accepted in Firefox, not IE. (Not sure about Safari or Opera).

半窗疏影 2024-07-21 02:38:46

其他答案已经解释了CA系统。 Perspectives 项目旨在部署一种新的 SSL 方法,您可以选择信任谁:http://perspectives-project。组织/

The other answers have explained the CA-system. The perspectives project aims to deploy a new approach to SSL, where you can choose whom to trust: http://perspectives-project.org/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文