在 Tor 中需要 SSL?

Need for SSL in Tor?

前段时间,我读到 Facebook being accessible over Tor and I couldn't ignore that their official URL https://facebookcorewwwi.onion/ 不仅显示 HTTPS,而且还显示为 .onion 域颁发的有效证书(实际上是历史上第一个)。

那么问题来了:鉴于 Tor 协议的性质,加密点对点通信,为什么 使用 HTTPS?它为纯 HTTP 添加了哪些优势?

我会在回答中分享我的结论

SSL(今天的 TLS)旨在 保护 通过线路发送的数据并 验证 您要向其发送数据的服务器(它也可以对客户端进行身份验证,但不在今天的范围内)。因此,如果普通 HTTP 可以被攻击者 窃听 修改,HTTPS 流量可以通过通道愉快地发送,并确保 合法收件人("only"和"legitimate"分别强调)。

Tor 添加了匿名化。加上上述要求,基本上 Tor 可以防止客户端被定位。你知道 Facebook,但 Facebook 不会认识你。 Tor 网络及其 .onion 地址的特殊套接字强制执行加密和身份验证,因为只有具有有效私钥的主机才能将自己注册到特定的 .onion 域。

因此,如果您知道 facebookcorewwwi 肯定属于 Facebook Inc.,则不需要额外的密码学。或者你呢?

使用证书仍然有助于防止通过域诈骗进行网络钓鱼。洋葱域不受 ICANN 监管,因此任何人都可以生成自己的域。 This article 解释说:

  • 每个人都可以轻松生成以给定前缀(例如 exampl)开头的 .onion 地址,但匹配较长的前缀会变得非常慢
  • 如果有人能够生成 facebookcorewwwi,他也将能够破解 e-commerce 级密码

因此,虽然没有人可以窃取 Facebook 的独家 facebookcorewwwi.onion,也没有人可以窃听 facebookcorewwwi.onion 的流量,但也许幸运的人仍然可以将受害者变成类似于 Facebook 主页或更糟的网站 facebookkernelwi.onion

基本上答案是:

  • 处理加密时,SSL 证书不会在 Tor Onion 域中增加额外的安全性
  • SSL 证书不会向 .onion space 中的主机名添加额外的身份验证,因为将来任何人都可能获得任何 .onion 证书
  • 带有EV扩展名的SSL证书可以证明经过身份验证的.onion主机所有者的真实身份.

Facebook 尚未为其 Tor 网站使用 EV,如下所示,但我们知道他们的 Tor 端点目前处于试验阶段。

Facebook 在宣布 TOR 地址时 blog 给出了原因

We decided to use SSL atop this service due in part to architectural considerations - for example, we use the Tor daemon as a reverse proxy into a load balancer and Facebook traffic requires the protection of SSL over that link. As a result, we have provided an SSL certificate which cites our onion address; this mechanism removes the Tor Browser's “SSL Certificate Warning” for that onion address and increases confidence that this service really is run by Facebook. Issuing an SSL certificate for a Tor implementation is - in the Tor world - a novel solution to attribute ownership of an onion address; other solutions for attribution are ripe for consideration, but we believe that this one provides an appropriate starting point for such discussion.

Facebook 用它来向其用户表明这个加密的 .onion 地址真正链接到他们自己的网络,并证明它不是钓鱼网站而是一个 ssl 加密的网站,以证明其真实身份。

使用 Lets Encrypt 将 SSL 证书添加到 .onion 网站是最简单的方法来保留您的真实身份,就像我所做的那样!