r/computing • • Jan 16 '14

ELI5: Why aren't all internet communications encrypted?

Apologies if this is a stupid question. This evening I decided to learn about VPNs and the benefits of using them and I stumbled upon this in-depth explanation on YouTube by Eli The Computer Guy (http://www.youtube.com/watch?v=q4P4BjjXghQ).

He explains that the reason VPNs are useful is because they create a tunnel between the client and the server and the data sent through it is encrypted. This made me think.. why aren't ALL internet communications encrypted? I mean, if it's easy for a hacker to intercept a standard connection and read the packages being sent.. why not just encrypt EVERYTHING so that it's extra difficult to do? Surely it makes sense.

I guess this is the same as web browsing through SSL. Why not just force it to prevent hackers from collecting data?

22 Upvotes

22 comments sorted by

10

u/[deleted] Jan 16 '14

The early internet (or whatever you want to call it at that stage) was a connection between trusted computers. Therefore, the protocols built at that stage (many of which are still in use) were designed with efficiency and clarity in mind and little thought was given to security.

Today, a large portion of internet traffic is encrypted, but it does impact on speed. Security hasn't really been a selling point in many consumer grade products, so little money has been spent on it. Further, enabling encryption by default can cause problems for everyday users and make a product less "user-friendly". Luckily, the tide is shifting, but slowly.

tldr; wasn't an issue early on, not a selling point now

10

u/[deleted] Jan 16 '14 edited Jan 16 '14

There's actually a plan to replace TCP with an always-encrypted protocol (PDF) that requires fewer round-trips to establish a connection -- a feat only possible because of its cryptographic underpinnings. In common usage, this would make it faster than unencrypted TCP. It has a few other nice things, too, like DoS protection using a hash-based proof-of-work scheme, and nicer congestion control. From what I hear, it's not computationally expensive; there's been a lot of effort put into optimizing the cryptographic operations. I wish them the best of luck.

9

u/Mecdemort Jan 16 '14

For a second there I thought the new encryption protocol was going to be abbreviated as PDF.

1

u/cogman10 Jan 16 '14

Interesting. I wonder how that will play with http2.0 which also requires encryption

2

u/RudolphDiesel Jan 17 '14

The http2.0 protocol at this time relies on SSL, which is a different animal.

1

u/[deleted] Jan 17 '14

HTTP 2.0 doesn't require TLS, but it does require that implementations support TLS. This is easy enough, since MinimaLT works at a lower layer, but there wouldn't be much point to using TLS over an encrypted, authenticated connection.

4

u/lengau Jan 16 '14

It's cheaper and easier not to encrypt it, and most users don't notice. Why bother?

EDIT: That's not my personal opinion on it (I'm all for very strong crypto in literally any digital communications), but it is the justification I have heard in the past.

3

u/Cheeze_It Jan 16 '14

The things that are important are usually encrypted.

There's a lot of packets that are on the internet in which encryption would be a waste of resources. As in, even if you captured the traffic and played it back and got the payload....it wouldn't yield anything useful. Capturing packets and flows indiscriminately is not always (think, damn near never) useful.

Plus, a lot of it is proprietary so even if it was unencrypted one would have to know how to interpret the data in a useful way.

Lastly, the stuff that is encrypted is usually encrypted to a point in which it would make it prohibitively difficult to decrypt in any useful way. Unless one can rainbow-table everything (which would take rainbow tables that are prohibitively large, and impossible to compile) then it isn't worth decrypting a lot of times. That's also assuming one can capture an entire data stream. A lot of times, it's very difficult to capture said data stream.

It's not a stupid question BTW :)

TL;DR = Not everything needs to be encrypted because not everything is useful. The stuff that is useful is usually encrypted.

3

u/Anderkent Jan 16 '14

As in, even if you captured the traffic and played it back and got the payload....it wouldn't yield anything useful. Capturing packets and flows indiscriminately is not always (think, damn near never) useful.

Well, except it being unencrypted lets your ISP provider decide to for example censor a webpage, or inject their adds, etc. etc.

And mistakes in choosing what to encrypt and what not to encrypt are incredibly common. Sites that make you login via https but serve the login form via http are incredibly common, and it makes the encryption useless.

1

u/RudolphDiesel Jan 17 '14

And on top of that as we have seen in the very recent past, unencrypted communications allow EVERYBODY and the NSA to snoop your traffic, read your email, see when and whom you are talking with and yes the ISP use that to their business advantage as well since a data connection does not have the same privilege as a phone connection.

TL;DR: Do yourself a favor and encrypt every connection when you can, i.e. use https instead of http

2

u/atomic-penguin Jan 16 '14

Its a complicated issue. For years, the US government has considered encryption a weapon. So this particular aspect of technology was treated in the same way as the exportation of armaments. See this and this for reference. Its my understanding that the restrictions are a bit more lenient now, but you still can't just export encryption to any country in the world.

There is more to the use of encryption than privacy. It is much easier to troubleshoot and build a protocol in "plaintext" than its encrypted counterpart. It is much easier for a network engineer, or a information security professional, to monitor "plaintext" networks for potential threats like botnet traffic or worm infections. Is it critically important that videos of cats on youtube be streamed encrypted? Probably not. Is it important that people can do their banking or taxes online, make credit card purchases securely, or check their grades at school with privacy in-tact? Of course, those things are critically important to keep private.

The use of a VPN itself isn't limited to privacy either. The primary purpose of having one is to connect point A to point B by a private circuit. For instance, a telecommuter trying to reach a corporate LAN, perhaps from home. Or even connecting two geographically disparate corporate LANs into one virtual corporate LAN. Its essentially a way to let authorized computers, or users, through a firewall.

A hacker has to compromise one point in a route to listen in on a network conversation. Large telecomms, cable companies, and service providers already have the ability to monitor the traffic you send across their networks. US government makes up its own rules, and gets its information via proxy from the big Internet and service providers. So it isn't necessarily easy for a third party hacker to do the same, but they could potentially compromise a link in this chain either by compromising your machine or perhaps a machine owned by your ISP. Hackers aren't necessarily the only people you want to protect your data from, either.

2

u/autowikibot Jan 16 '14

Here's a bit from linked Wikipedia article about Export of cryptography in the United States :


The export of cryptography in the United States is the transfer from the United States to another country of devices and technology related to cryptography.

Since World War II, many governments, including the U.S. and its NATO allies, have regulated the export of cryptography for national security considerations, and, as late as 1992, cryptography was on the U.S. Munitions List as an Auxiliary Military Technology.

In light of the enormous impact of cryptanalysis in World War II, it was abundantly clear to these governments that denying current and potential enemies access to cryptographic systems looked to be militarily valuable. They also wished to monitor the diplomatic communications of other nations, including the many new nations that were emerging in the post-colonial period and whose position on Cold War issues was regarded as vital.

Since the U.S. and U.K. had, they believed, developed more advanced cryptographic capabilities than others, the intelligence agencies ... (Truncated at 1000 characters)


about | /u/atomic-penguin can reply with 'delete'. Will also delete if comment's score is -1 or less. | To summon: wikibot, what is something? | flag for glitch

2

u/oconnor663 Jan 16 '14

Others have pointed about the computational cost of doing decryption on the server, or just the administrator effort to set it up, and both of those are real. But probably the biggest barrier to doing more encryption-by-default is round trips. Setting up an encrypted connection takes a couple of back-and-forths between the client and the server, which have to happen before the server can start sending any real data. That's not such a big deal if you and the website you're browsing are both in the US. But if you're in, say, India, a few round trips to the US are going to add something like a second to every pageload, which is really noticeable. If you're on mobile, it's even worse.

When big sites like Google and Facebook put servers ("points of presence") all over the world, this is the biggest reason. You might still be talking to a web server or a database in the US, but as long as you can make those initial round trips entirely within your country, your pageload is going to be a lot faster.

1

u/northrupthebandgeek Jan 16 '14

Because users and server administrators don't feel that encryption is necessary for the vast majority of network communication.

Anything that involves confidential information - passwords, credit card numbers, cryptocurrency, etc. - should be (and usually is) conveyed over an encrypted connection. Most not-so-private activities - like reading a Wikipedia article - haven't been perceived to necessitate the use of an encrypted connection.

Encryption isn't trivial. It's somewhat costly in terms of computational requirements (since encryption and decryption require the use of mathematical algorithms), and additionally costly in terms of implementation details (a basic self-signed certificate can be daunting to a novice server "administrator" and has various pitfalls pertaining to certificate trustworthiness, and getting a certificate that's trusted by a big certificate authority like VeriSign ain't easy, either).

That all said, it would be nice to achieve encryption in a simple, easy-to-use way. I think programs like GnuPG are a step in the right direction there.

2

u/RudolphDiesel Jan 17 '14

Encryption itself is very simple and low in computational requirements. each and every modern CPU does that with 3/4 of its pins tied to its back. The problem is the INITIAL session exchange. THAT is computational expensive and requires multiple packets back and forth.

1

u/RudolphDiesel Jan 17 '14

Not a stupid question at all, in fact it is a very good question. Here is my take on it.

Historically the internet was NOT designed and implemented as the network it is today. Nothing on the internet when the basis was laid in the late 70's and 80's really "needed" encryption because there was no commercial traffic. It was a network of computers where everyone or almost everyone knew their "neighbor" personally and as such the protocols that where put in place and developed relied on that and it was mostly a tool for knowledge interchange between universities.

Then in the late 80's and early 90's the whole landscape started to change. protocols like gopher and http were developed and at the same time personal computers all of a sudden were powerful enough to run graphical user interfaces that Joe Blow was able to manage and more importantly PCs all of a sudden were able out of the box to connect to TCP based networks. This was not always the case.

This gave the internet a boost that it was just not designed for and we found ourselves using the protocols that were in place and developed for an academical environment and nobody ever thought these protocols would be used in the ways they were used. SMTP, FTP, DNS and others are all protocols with security problems as big as a barn door. Yet they continue to be utilized today because thats just what everybody is able to speak. A set of languages we learned to deal with.

Case and point: Every email all over the world unless it utilizes SMTP over SSL (very few server support that and even fewer admins install and set it up) send ALL your emails in clear text. Even pictures are first converted to text so that they can be sent through a system that was developed to send text, not binary blobs. (In in doing so, converting to text usually the binary data is being expanded to 5/4 of its original size) Since every email is plain text when it enters the "Internet" somebody who wants to read your email (think NSA) doesn't have to have your password for your email account, they can just sit on the network nodes where all or most the data flows through and watch it, incoming and outgoing.

Now, a few contributors before me said encryption is heavy on the CPU. While this is not completely incorrect, every only half way modern CPU can do encryption in its sleep. There are still some quirks e.g. in SSL where you create an encrypted connection between two end points the initial and only the initial key exchange and the initial computations are somewhat heavy, and require multiple packets back and forth and so the initial setup of an SSL connection takes a few ms more than compared to an unencrypted connection. Once the connection is established the computational requirements are not zero but minimal compared to every else that is going on.

Feel free to ask specific question. I'd love to help.

TL;DR: Initially the internet was not planned as a tool for wide spread use and therefore encryption was not even on the radar, much less needed. Now we have to deal with that.

1

u/Jimbob0i0 Jan 17 '14

Now, a few contributors before me said encryption is heavy on the CPU. While this is not completely incorrect, every only half way modern CPU can do encryption in its sleep. There are still some quirks e.g. in SSL where you create an encrypted connection between two end points the initial and only the initial key exchange and the initial computations are somewhat heavy, and require multiple packets back and forth and so the initial setup of an SSL connection takes a few ms more than compared to an unencrypted connection. Once the connection is established the computational requirements are not zero but minimal compared to every else that is going on.

Depends on what you are doing... I had to do some benchmarking of this at work recently and on a Dell R720 (so a fairly beefy machine) with a direct 10Gig attach to another one and pure SSL over TCP (no http overhead). With no SSL it was the expected cap of throughout less a little for TCP overhead (something like 9.7 or 9.8 Gbps as I recall). With SSL (specifically openSSL as the encryption library and this using the python socket interface) it was more like 700Mps per thread maxing out a core. This was CentOS6.4 for the OS and Intel AES-NI was being used.

If you are doing more than http SSL can have a significant computation cost.

0

u/Jimbob0i0 Jan 16 '14

In addition to the computing cost described by the others there just aren't enough IPs in the ipv4 world for this...

Although modern browsers generally support something called SNI to let you run more than one SSL web site from a single IP there are still plenty of devices that don't or are not HTTPS servers. Windows XP for instance doesn't support SNI preventing anything that uses Windows's SSL libraries (such as internet explorer) from using it.

3

u/RudolphDiesel Jan 17 '14

Wrong. The IP address has NOTHING to do with encryption. SSL works on an IP:port basis, but by using different ports one can very much so create multiple SSL connections on the same IP address. Even XP can handle that. Please get your facts together.

Again SSL is only one specific form of encryption, and the OP dis not ask about SSL but why are not all or more connections encrypted and that IS a valid question.

1

u/Jimbob0i0 Jan 17 '14 edited Jan 17 '14

Context is everything... Note the last paragraph of the OP where he specifically mentions web browsing and why it's not all SSL ...

That's the bit I was referring to with the SNI and XP discussion.

Can you imagine a world of having to tell a user a hostname and a port to connect to? Bad enough with just getting people to the right hostname... If they had the wrong port or put none so they defaulted to 443 there would be lots of cases of people going to incorrect sites.

On a pure IP side there's ipsec but that still has the initial chain of trust to establish and would probably be over the OP's head and level of understanding.

0

u/[deleted] Jan 16 '14

[deleted]

1

u/RudolphDiesel Jan 17 '14

Downvote for too many technical errors. While the explanation may be easier to understand it is also technically wrong in many points.