为什么数据库的内容像加密了

In psychology there is the term of affordances. It’s the concept that an object affords different actions for someone interacting with it. Most objects in this world have a plethora of things you can do with them, many are not even intended by the designer of that object. As a crude example: a chair does not just afford sitting on it, it could also be used as a table if you sit on the floor. What I find interesting about that concept is that most of the time the actions that you can perform on an object are heavily shaped by your state of mind and environment.

在心理学中,有能力的术语。 这是一个对象为与它进行交互的人提供不同动作的概念。 这个世界上的大多数对象都有很多可以使用的功能,甚至很多对象的设计者都没有想到。 举一个简单的例子:椅子不仅可以坐在椅子上,如果您坐在地板上,它还可以用作桌子。 我对这个概念感兴趣的地方是,大多数情况下,您可以对某个对象执行的动作很大程度上取决于您的心理状态和环境。

An extreme example of this would be the use of bank notes. For you and me, the use of bank notes is to pay for goods and services. If you would have asked a person from the Weimar Republic however a not unlikely use of banknotes was to throw them into an oven and burn them for heat. Clearly never intended by the creator of the currency, but a very reasonable decision given that it was more expensive to buy wood than to burn the currency directly.

一个极端的例子是使用钞票。 对于您和我来说,使用钞票是为了购买商品和服务。 如果您要问魏玛共和国的一个人,那么,将钞票扔进烤箱并燃烧以加热的可能性不大。 显然,货币的创造者从未打算这样做,但是这是一个非常合理的决定,因为购买木材比直接燃烧货币要昂贵。

执法 (Enforcement)

A similar thing applies to the enforcement of rules. For instance in order to ride a subway you need a ticket. There are two ways in which this can be policed: you have gates that prevent people without a ticket from passing onto the platform or you instead make spot checks. The engineer in me would obviously argue for the gates as it’s a technical solution to a problem but upon closer inspection the gates might actually have a bunch of unintended downsides. The gate is a very binary access method: you either get through or you don’t based on if you have a valid ticket. It however leaves out a perfectly reasonable affordance which is the idea of riding the train without paying for it. Now obviously one could argue that the whole point of the gate is to prevent this from happening but there are plenty of situations in which it would be entirely legitimate to ride the train without a ticket. A good example for that are emergencies. You cannot really talk to a ticket gate and make your point, it’s a soul-less thing.

类似的情况适用于规则的执行。 例如,要乘坐地铁,您需要买票。 可以通过两种方法对此进行监管:您可以使用登机口阻止没有票的人进入平台,或者进行抽查。 我内部的工程师显然会建议使用闸门,因为这是解决问题的技术方法,但仔细检查,闸门实际上可能会有很多意外的缺点。 登机口是一种非常二进制的访问方法:您通过还是不通过,是否有有效的票证。 但是,它却留下了一个完全合理的负担能力,那就是不用付钱就坐火车的想法。 现在显然有人可以辩称,登机口的全部目的是为了防止这种情况的发生,但是在很多情况下,完全不用火车票就可以乘火车。 紧急情况就是一个很好的例子。 您无法真正与检票口交谈并阐明自己的观点,这是一件没有灵魂的事情。

This is less of an issue for public transportation but it would become a bigger one for cars but cars do not (yet?) enforce laws themselves. There are plenty of people that are not legally allowed to drive a car under normal circumstances but should not be prevented from driving a car in emergency situations.

对于公共交通而言,这不是一个大问题,但是对于汽车来说,这将成为一个更大的问题,但汽车本身(尚未?)并没有执行法律。 在正常情况下,有很多人在法律上不允许开车,但是在紧急情况下,不应阻止很多人开车。

I’m not going to discuss whether digital enforcement is a good thing or not, more that when you take such a strong stance on an issue it’s important to not just consider the situations in which everything goes by design.

我不会讨论数字执法是否是一件好事,更多的是,当您在一个问题上采取如此坚定的立场时,重要的是不要仅仅考虑一切都是设计使然的情况。

Which leads me to the concept of encrypting everything. There is the idea that “there is no such thing as insensitive web traffic” and that the privacy of communication is absolute. For a long time this was not a very contested idea because the total number of encrypted traffic was quite a small percentage of the overall communications. Now however pretty much everyone wants to have their website encrypted which starts to alarm many actors including governments and system administrators.

这使我想到了加密所有内容的概念。 有一种想法是“没有不敏感的网络流量”,并且通信的隐私是绝对的。 长期以来,这并不是一个非常有争议的想法,因为加密流量的总数仅占总体通信的很小一部分。 现在,几乎每个人都希望对其网站进行加密,这开始使包括政府和系统管理员在内的许多参与者感到震惊。

Traditionally many institutions and professions and their customers had legitimate reasons for why they want encryption. That includes banks and lawyers for instance. But not everybody is entitled to privacy in all situations. For instance convicted criminals are not. Likewise many lawful professions need to be heavily surveyed for security. That privacy and safety stand in a big conflict was recently quite dramatically demonstrated when a pilot hid his psychological problems from his employer and intentionally caused a plane to crash.

传统上,许多机构和专业以及他们的客户都有他们为什么要加密的正当理由。 例如,这包括银行和律师。 但是,并非所有人都在所有情况下都享有隐私权。 例如,定罪的罪犯不是。 同样,许多合法职业也需要接受大量安全检查。 当飞行员向雇主隐瞒自己的心理问题并故意导致飞机坠毁时,隐私和安全处于巨大冲突中,这一点最近得到了极大的证明。

However encryption is like a ticket gate in the sense, that there is no way around it. For nobody (if it works). This has a lot consequences I think we did not yet discuss as a society.

但是,从某种意义上讲,加密就像是检票口,无法绕开它。 对于任何人(如果可行)。 我认为这对于我们作为一个社会还没有讨论很多后果。

加密成本 (The Cost of Encryption)

When implemented properly, encryption is a very binary enforcement: there is no way around it. It’s something that we as developers like very much because it just “makes sense” to us. But it does not come for free.

如果正确实施,则加密是一种非常二进制的强制措施:它无法解决。 作为开发人员,我们非常喜欢这件事,因为它对我们“有意义”。 但是它不是免费的。

First of all encryption cannot stand on its own, it needs the concept of trust. The most common form of encryption these days is SSL where the user does not really have much of a choice in defining trust. The trust there is acquired by giving someone at a specific (private!) institution money and a copy of a passport. This system does not scale, and the number of SSL hosts is exploding. Now that everybody and their dog uses SSL on their blogs the total stress put on this system is even larger than in the past and as such slip-ups are only going to increase. It was bad enough to secure the CA system for a few hundred hosts that needed SSL, but now I have no idea how any CA in the world is supposed to verify people’s identities. It’s also making the encryption icon more and more meaningless and puts more and more emphasis on who and for whom things are signed.

首先,加密不能独立存在,它需要信任的概念。 如今,最常见的加密形式是SSL,在这种情况下,用户在定义信任方面确实没有太多选择。 通过给特定(私人!)机构的人钱和护照副本,可以获得那里的信任。 该系统无法扩展,并且SSL主机数量激增。 现在,每个人和他们的狗都在其博客上使用SSL,该系统所承受的总压力甚至比过去更大,并且这种失误只会增加。 为数百个需要SSL的主机保护CA系统已经很糟糕了,但是现在我不知道世界上的任何CA应该如何验证人们的身份。 这也使加密图标变得越来越没有意义,并且越来越强调谁和谁签名了东西。

There is another cost and that’s the actual cost in CPU cycles. SSL is bloody expensive compared to not doing it. First of all there are still services which do not support SNI, so SSL is a big factor in exhausting the IPv4 address space faster than we would otherwise need. As an alternative you can fall back to many subject alternative names on your certificate. This is being executed to ludicrous degrees due to our instance on the use of SSL. The frontend that does SSL offloading for firebase.com for instance currently lists more than 580 subject alternative names. Not only does that mean that you are downloading a really big certificate, but also that the SSL encryption is a bit of a lie for you as a user. The certificate in front of “firebase” is also good for “tappinass”. Sure enough, neither firebase nor that other website are holding the private keys to the cert, so they cannot impersonate each other, but their CDN provider can. Don’t get me wrong, there is nothing wrong with that because they chose to outsource this to their CDN, but from a user’s perspective this sort of SSL deployment does not actually guarantee that the communication is secure from their side until they hit the intended server.

还有另一个成本,那就是CPU周期中的实际成本。 与不使用SSL相比,SSL昂贵。 首先,仍然存在不支持SNI的服务,因此SSL是比我们原本需要的速度快耗尽IPv4地址空间的重要因素。 作为替代方案,您可以使用证书上的许多主题替代名称。 由于我们使用SSL的实例,执行此操作的程度非常可笑。 例如,为firebase.com进行SSL卸载的前端当前列出了580多个主题备用名称。 这不仅意味着您正在下载一个很大的证书,而且SSL加密对于您作为用户来说也是一个谎言。 “ firebase”前面的证书也适合“ tappinass”。 可以肯定的是,firebase和其他网站都没有持有证书的私钥,因此它们不能互相模仿,但其CDN提供程序可以。 不要误会我的意思,这没有什么错,因为他们选择将其外包给他们的CDN,但是从用户的角度来看,这种SSL部署实际上并不能保证从他们那一侧进行的通信是安全的,直到他们击中了预期的目标。服务器。

SSL scales really badly intentionally. Until fairly recently there was no real way to scale SSL without handing over your private keys to a your frontend SSL machines. (Cloudflare outline their Keyless SSL method here). The cost of deploying SSL should not be underestimated, and forcing SSL on people out of principle should consider that. Not everything needs encryption. Especially in cases of big emergencies, being able to access information is crucial. The first thing Germanwings did after their horrific crash when their website was down was to replace it with a static HTML page (unencrypted) with a phone number you could call if you were affected.

SSL确实有意扩展。 直到最近,还没有一种真正的方法来扩展SSL,而无需将私钥移交给前端SSL机器。 (Cloudflare在此概述了其无密钥SSL方法 )。 部署SSL的成本不应该被低估,强迫SSL脱离人们的思维应该考虑到这一点。 并非所有内容都需要加密。 特别是在紧急情况下,访问信息至关重要。 在网站崩溃后,Germanwings遭受可怕的崩溃后的第一件事就是用一个静态HTML页面(未加密)替换为您可以拨打的电话号码(如果您受到了影响)。

政府拦截 (Government Interception)

A big cost of encryption however is lawful interception. This is not the place to discuss if governments should have the ability to intercept your internet traffic or not but in many cases they have that right. So given a government that is allowed to rule a website illegal there are two ways to get the website offline. One involves going to the hosting provider of that website and tell them to shut it down. This can be very tricky because the website is typically hosted in another country. The second method is to go to the local ISP and tell them to disable access to it. The rather is the better option in the sense that it only affects the citizens of that country and it isolates the problem.

但是,加密的一大成本是合法的拦截。 这里不是讨论政府是否应有能力拦截您的互联网流量的地方,但在许多情况下,它们拥有这项权利。 因此,鉴于允许政府将网站定为非法的政府,有两种方法可以使网站离线。 其中一个涉及到该网站的托管提供商,并告诉他们将其关闭。 这可能非常棘手,因为该网站通常位于另一个国家/地区。 第二种方法是转到本地ISP,并告诉他们禁用对其的访问。 从某种意义上说,宁愿是更好的选择,因为它只会影响那个国家的公民,并且可以隔离问题。

Unfortunately, SSL prevents this. Unfortunately because it means that if a website hosts partially illegal shared content, then the whole website is down and not just the subsets of it which are legally problematic. For Russians for instance github was down for more than a day because ISPs had no other change than taking the whole website down until github changed their servers to blacklist the content in question for Russian IPs.

不幸的是,SSL阻止了这种情况。 不幸的是,因为这意味着如果一个网站托管了部分非法共享内容,则整个网站都将关闭,而不仅仅是法律上有问题的子集。 例如,对于俄罗斯人来说,github宕机了一天多,因为ISP除了关闭整个网站之前没有其他改变,直到github更改其服务器以将有关俄罗斯IP的内容列入黑名单。

These problems will not become less but more and it will require a proper discussion within the legal bodies of our countries. We as the tech community should not make this decision on our countries’ behalf. It should be a technical reason and not a political one.

这些问题不会越来越少,而只会越来越多,需要我们各国的法律机构进行适当的讨论。 作为科技界,我们不应代表我们的国家做出此决定。 这应该是技术原因,而不是政治原因。

强迫中间人 (Forcing The Man in the Middle)

The more we put our money behind encryption the more will we put the problem of active man in the middling on our radar. When a couple of years ago you could get away with pinning SSL certificates in your Windows desktop apps, we are now far away from that. A shocking amount of Windows users run software that MITMs SSL connections to scan for viruses, malware etc. Even Ad providers (Superfish cough) started to destroy SSL traffic because it became so widespread that it was necessary.

我们在加密上投入的资金越多,我们就越会把活跃的人问题放在我们的雷达中。 几年前,当您可以在Windows桌面应用程序中固定SSL证书时,我们就可以摆脱了。 令人震惊的Windows用户运行的软件都使用MITM的SSL连接来扫描病毒,恶意软件等。甚至广告提供商(Superfish咳嗽)也开始破坏SSL流量,因为它变得非常普遍,以至于必须这样做。

I’m firmly of the opinion that none of that would have happened if SSL traffic was less common. From an economical perspective a few years ago nobody would have thought about building a SSL MITM proxy for these purposes. Now however you will find them everywhere. Even reputable companies like Nokia have been found intercepting SSL traffic on their mobile phones.

我坚信,如果SSL流量不那么普遍,那一切都不会发生。 从经济角度考虑,几年前没有人考虑过为此目的构建SSL MITM代理。 但是现在您到处都可以找到它们。 甚至发现像诺基亚这样的知名公司,也都在其手机上拦截SSL流量。

Worst of all is that “SSL everywhere” goes against what it should actually protect as a side effect. There are probably more misconfigured SSL systems that give users the illusion of safety than correctly set up ones. There will be the point in a year or two when the first websites that got forgotten and had SSL configured, will have their certificates expire. And then users will start to get used to clicking certificate warnings away because it’s the only way to get to the website they needed.

最糟糕的是,“无处不在的SSL”与它实际上应保护的副作用背道而驰。 错误配置的SSL系统可能比正确设置的SSL系统给用户带来安全感。 一两年后,第一个被遗忘并配置了SSL的网站的证书将过期。 然后,用户将开始习惯于单击证书警告,因为这是访问所需网站的唯一方法。

复杂性 (The Complexity)

The greatest impact on user’s safety would have been the development of per user encryption for public Wifi access points. Instead what happened is that now every larger website has to implement SSL to protect against the only realistic attack vector which is someone surfing at Starbucks.

对用户安全的最大影响将是为公共Wifi接入点开发每用户加密。 取而代之的是,现在每个大型网站都必须实施SSL,以防御唯一现实的攻击媒介,即有人在星巴克网上冲浪。

But instead we fixed the problem on every single website out there instead of one Wifi standard [1]. But administrators largely don’t understand SSL. And I can’t blame them. Right now the total number of people in the world that probably understand the entirety of SSL are most likely in the low hundreds. I have been dealing with SSL for years now and the more I use it, the more I have to surrender to the complexities in it. When a few years ago I would have said “I understand SSL” I now no longer claim I have any understanding of SSL at all.

但是,相反,我们在每个网站上都解决了这个问题,而不是一个Wifi标准[1] 。 但是管理员在很大程度上不了解SSL。 我不能怪他们。 目前,世界上可能了解SSL整体的人数很可能只有几百个。 我已经使用SSL多年了,使用SSL越多,我就越需要屈服于SSL的复杂性。 几年前,我会说“我了解SSL”,而现在我不再声称对SSL有任何了解。

This is a problem. Because SSL at this point is becoming more and more of a requirement it means there is a crucial part of my stack which I have to fully trust. And it’s written in a way where it’s impossible for a normal human being to understand the internals of it. Cryptography is black magic. One can argue that for as long as SSL engines are Open Source there should be plenty of eyes that ensure that our crypto code is secure, but the truth is that the most popular cryptography library (OpenSSL) is an old and complex mess. Even if the library itself would be okay, there are so many ways to misuse it and it’s really badly documented.

这是个问题。 由于此时SSL的需求越来越高,这意味着我的堆栈中有一个至关重要的部分,我必须完全信任它。 而且它是以一种普通人无法理解其内部结构的方式编写的。 密码学是黑魔法。 可以争论的是,只要SSL引擎是开源的,就应该有很多眼睛可以确保我们的加密代码是安全的,但事实是,最受欢迎的加密库(OpenSSL)既古老又复杂。 即使该库本身可以,但仍有许多方法可以滥用它,并且确实存在不良记录。

As HTTP 2 now basically is TLS only as that’s the only transport that modern browsers implement. Gone are the days where you could fully understand how a web application works. We’re now deep in the territory where a relatively simple text based protocol has been replaced with a multiplexed stream of octets wrapped in a TLS connection. The future is now.

由于HTTP 2现在基本上仅是TLS,因为这是现代浏览器实现的唯一传输方式。 完全了解Web应用程序如何工作的日子已经一去不复返了。 现在,我们已经深陷其中,一个相对简单的基于文本的协议已被封装在TLS连接中的八位字节的多路复用流取代。 未来是现在。

[1][1]

It was brought up that even if you can trust other Wifi users you cannot trust the provider of the Wifi connection. That is definitely true and defeats my point somewhat given how many Wifi access points are provided directly by unknown entities (bars themselves etc.).

事实证明,即使您可以信任其他Wifi用户,也不能信任Wifi连接的提供者。 绝对是正确的,鉴于未知实体(酒吧本身等)直接提供了多少个Wifi接入点,这在一定程度上破坏了我的观点。

At this point there is definitely no way back anymore, but the rollout of Wifi could have worked similar to the rollout of home internet. At the end of the day you need to trust your ISP as well. The same rules could have been applied to Wifi providers originally.

在这一点上,肯定再也没有办法了,但是推出Wifi可能与推出家庭互联网类似。 最终,您还需要信任您的ISP。 相同的规则本来可以应用于Wifi提供商。

我们可以减少加密吗? (Can We have Less Encryption?)

I don’t think everyone should be forced to understand SSL and I don’t think everybody should be forced to implement encryption.

我不认为每个人都应被迫理解SSL,也不认为每个人都应被迫实施加密。

To give you an example of how ridiculous our love for SSL has become: PyPI. It’s the Python package service. As of recently the Python package installer downloads every package via SSL. Why? There is no technical reason for this unless you want to hide from someone that you are downloading a specific Python package which seems pointless. It’s plenty to download the package over an untrusted connection and to then verify the checksum with one you downloaded from a secure place. As there is no need to operate on a partial file there is no technical reason why the entire transfer would have to be SSL encrypted.

举例说明我们对SSL的热爱变得多么荒谬:PyPI。 这是Python包服务。 从最近开始,Python软件包安装程序会通过SSL下载每个软件包。 为什么? 除非您要向某人隐瞒您正在下载似乎毫无意义的特定Python软件包,否则没有任何技术原因。 可以通过不受信任的连接下载软件包,然后使用从安全位置下载的软件包验证校验和。 由于不需要对部分文件进行操作,因此没有技术上的理由说明必须对整个传输进行SSL加密。

Encryption is a good thing, but I believe it needs to be applied carefully. At the same time I think we as people need to start having a serious discussion what effects the widespread deployment of cryptography can have and how we deal with it. Working encryption is pretty much an absolute: there is no way around it. This is something that our countries previously did not have to deal with.

加密是一件好事,但我认为需要谨慎应用。 同时,我认为我们作为人们需要开始认真讨论加密技术的广泛部署会产生什么影响以及我们如何处理它。 有效的加密几乎是绝对的:没有办法解决。 这是我们各国以前不必处理的事情。

翻译自: https://www.pybloggers.com/2015/04/unintended-affordances-or-why-i-believe-encrypting-everything-is-a-bad-idea/

为什么数据库的内容像加密了

为什么数据库的内容像加密了_意外的负担(或者为什么我认为加密所有内容都不是个好主意)相关推荐

  1. python不能加密吗_为什么我不能解密我用pycrypto加密的内容?

    我的代码是: 加密:from Crypto.Cipher import AES import base64 def encryption (privateInfo): BLOCK_SIZE = 16 ...

  2. java rsa加密解密_前端实现对请求参数进行RSA加密amp;解密,针对字符串过长进行分段加密amp;分段解密的处理...

    前言 在需求开发中,为了安全起见,我们都会难免遇到需要对一些敏感参数进行加密或者解密.所以,今天给大家分享的就是使用jsencrypt对请求参数进行RSA加密与解密,发这篇文章其实主要因为近期我的一位 ...

  3. mysql 传输加密方式_请问各位大侠,要实现MYSQL加密传输,应该怎么做?

    MYSQL加密传输应该怎么实现,有如下的操作步骤: To get secure connections to work with MySQL, you must do the following: I ...

  4. 在数据库技术中脏数据是指_数据库安全关键技术之数据库加密技术

    数据库加密作为近年来兴起的数据库安防技术,已经被越来越多的人所重视.这种基于存储层加密的防护方式,不仅可以有效解决数据库明文存储引起的泄密风险,也可以防止来自内部或者外部的入侵及越权访问行为. 从技术 ...

  5. 数据库mysql加密存储_数据库数据加密存储框架四种途径

    原标题:"关于数据加密存储的四种途径[图解]"最新电脑设置知识经验分享. - 来源:191路由网 - 编辑:小王. 现如今,我们经常会提到一个词,那便是人权,而在咱们的众多人权之中 ...

  6. rsa前后端加密流程_不懂前后端分离?这篇就够了

    一 传统的开发模式 前后端分离前我们的开发协作模式一般是这样的: 前端写好静态的HTML页面交付给后端开发.静态页面可以本地开发,也无需考虑业务逻辑只需要实现View即可. 后端使用模板引擎去套模板, ...

  7. 金仓数据库 KingbaseES PL/SQL 过程语言参考手册(16. A PL/SQL源文本加密)

    16. A PL/SQL源文本加密 您可以为以下PL/SQL 单元加密 PL/SQL 源文本,从而防止任何人使用数据字典显示该文本: 包体 函数 存储过程 包含加密的 PL/SQL 源文本的文件称为加 ...

  8. 查询计算机系学生的详细记录,实验三_数据库的简单查询和连接_.doc

    实验三_数据库的简单查询和连接_ 实验三 数据库的简单查询和连接查询 实验目的及要求 掌握SELECT语句的基本语法: 熟练掌握表的数据简单查询.数据排序: 熟练掌握表的连接查询的表示: 掌握等值连接 ...

  9. java 密码加密 盐_有效提高java编程安全性的12条黄金法则

    安全性是软件开发中最复杂,最广泛和最重要的考量之一.Java是具有许多内置安全性功能的开发平台,java在长期的发展过程中,已经经过了很多高强度的安全测试,并经常更新安全漏洞.并且Java生态系统还包 ...

最新文章

  1. 如何调试分析Android中发生的tombstone
  2. Nginx开启GZIP来压缩网页
  3. 论文笔记:DeepID2
  4. linux中使用svn客户端
  5. 今天突然想到一个问题:地球在转动吗,由东西向西跳与由西向东跳哪个更远...
  6. 动态规划和贪心算法的区别
  7. 使用ReportStudio打开cube模型创建报表出现两个最细粒度名称
  8. android中字符串转换成整型
  9. 前端学习(3226):回调形式的ref
  10. Unity3D Shader 入门之控制语句
  11. nologging与append测试
  12. 广东省零售连锁协会执行会长:技术更新太快,消费者才是零售企业最大的对手...
  13. 运动会管理系统(JAVA,JSP,SERVLET,SQLSERVER)
  14. 《Spring开发指南》(夏昕著)学习总结
  15. 如何批量修改文件夹名称排序?
  16. echart地图飞线图
  17. LeetCode 1240. Tiling a Rectangle with the Fewest Squares
  18. siri快捷指令_入门的最佳Siri快捷方式
  19. 解决FileReader读取文本文件中字乱码问题
  20. POI设置和读取excel分组信息,多级分组设置

热门文章

  1. 服务器网口显示感叹号,业务服务器或更新服务器连接失败(认证失败,黄色感叹号)怎么回事?...
  2. 腹有诗书气自华,记2016年读过的好书
  3. python font 斜体_用PIL绘制粗体/斜体文字?
  4. ns-3中的数据跟踪与采集——Tracing系统的配置
  5. 微搭低代码基础开发教程
  6. 吉林教育杂志吉林教育杂志社吉林教育编辑部2022年第18期目录
  7. 微信账户体系科普:什么是UnionId、OpenId与wxopenid?
  8. C# LeetCode刷题 - Leetcode 306. 累加数 - 题解
  9. Java计算10000天出生纪念日
  10. 大法将致:将Windows Server 2016打造成个人办公系统,WIN2016打造成超级WIN10,WIN2016优化设置