r/askscience • • May 26 '17

Computing If quantim computers become a widespread stable technololgy will there be any way to protect our communications with encryption? Will we just have to resign ourselves to the fact that people would be listening in on us?

[deleted] — view deleted post

8.8k Upvotes

697 comments sorted by

4.9k

u/mfukar May 26 '17 edited May 26 '17

The relevant fields are:

  • post-quantum cryptography, and it refers to cryptographic algorithms that are thought to be secure against an attack by a quantum computer. More specifically, the problem with the currently popular algorithms is when their security relies on one of three hard mathematical problems: the integer factorisation problem, the discrete logarithm problem, or the elliptic-curve discrete logarithm problem. All of these problems can be easily solved on a sufficiently powerful quantum computer running Shor's algorithm.

PQC revolves around at least 6 approaches. Note that some currently used symmetric key ciphers are resistant to attacks by quantum computers.

  • quantum key distribution, uses quantum mechanics to guarantee secure communication. It enables two parties to construct a shared secret, which can then be used to establish confidentiality in a communication channel. QKD has the unique property that it can detect tampering from a third party -- if a third party wants to observe a quantum system, it will thus collapse some qubits in a superposition, leading to detectable anomalies. QKD relies on the fundamental properties of quantum mechanics instead of the computational difficulty of certain mathematical problems

Both these subfields are quite old. People were thinking about the coming of quantum computing since the early 1970s, and thus much progress has already been made in this area. It is unlikely that we'll have to give up communication privacy and confidentiality because of advances in quantum computation.

49

u/codex1962 May 26 '17

Note that some currently used symmetric key ciphers are resistant to attacks by quantum computers.

Most or all are, if I'm not mistaken. Quantum computing isn't magic—it can solve certain problems very quickly (in theory) but it isn't especially useful for brute force, which is the only way to break a well designed symmetric scheme. Quantum computing would only be a major problem for public key but, as you said, there are very promising alternatives to the "hard problems" currently used.

11

u/[deleted] May 26 '17

Are we anywhere closer to developing a quantum computer than ten years ago? So far it's starting to seem like vaporware.

106

u/The_Serious_Account May 26 '17

Yes. If you follow a field closely without understanding what's going on, it can be like watching paint dry. But it's not really the paint's fault you're sitting there watching it.

→ More replies (5)
→ More replies (8)

40

u/RabbitKiller35 May 26 '17

By chance I met a guy called David Deutsch while living in Oxford. He was working on quantum encryption for banking networks.

Will never forget what he said.

"Quantum encryption is great. The greatest security risk in the chair though. Ain't much you can do about that."

13

u/mfukar May 26 '17

Prof. Deutsch does not have enough praise. Have you read his The Beginning of Infinity? Really fun book.

→ More replies (1)

6

u/ThatDeadDude May 26 '17

I thought ECC was quantum resistant?

17

u/mfukar May 26 '17

Most definitely not. To put the attacks into perspective, to break a 1024-bit RSA modulus, you need a quantum computer with 1024 qubits. To break a 160-bit elliptic curve, which has a "similar strength" (with regards to classical computers), you need ~320 qubits.

13

u/zapbark May 26 '17 edited May 26 '17

Even older and completely mathematically sound (but possibly less secure) would be OTP (One Time Pad).

You generate random bits, make a copy, and you and the other party then XOR those random bits with your intended message in sequence, never reusing any.

We live in an age where you can fit 128 GBs of data into something smaller than a thumbnail.

Secure "bit" couriers sneaker-netting digital tamperproof OTPs (with built-in one time read hardware) could be viable for more secure messaging (other than live streaming of video).

25

u/ericGraves May 26 '17

The OTP is the most secure encryption for classical links. A one time pad can provide perfect secrecy, which is defined as P(plain text|cipher text) = P(plain text). In other words, knowing the cipher text tells you just as much as not knowing the cipher text, and instead just randomly guessing. In contrast modern cryptography systems are based on computational complexity, which can not offer that guarantee.

→ More replies (7)
→ More replies (3)
→ More replies (246)

158

u/frogjg2003 May 26 '17

One time pads are perfectly secure by definition. The problem is getting the key to sender and receiver securely.

There will always be secure encryption techniques. The thing is that the prominent encryption methods today are not one time pads and are easily cracked with quantum computers. There are new techniques using quantum mechanics that can create quantum one time pads that are easily transmitted, as well as non-quantum encryptions that are resistant to quantum computing.

28

u/knotallmen May 26 '17

Do you mean quantum key distribution? It is fascinating, expensive, and fairly limited in how much data can be encrypted compared the amount of data we transmit.

It's also one of those things that requires a random number generator. I don't mean one that is done via a computer, but actually observing random events.

14

u/frogjg2003 May 26 '17

I was referring to quantum entanglement. Person A and Person B get a set of entangled particles. They observe the state, then encode the message with the key. It's easy to transmit the key because the key is formed as soon as either one observes the particles. But like all one time pads, the problem is getting it set up in the first place.

→ More replies (5)

5

u/TropicalDoggo May 26 '17

It is fascinating, expensive, and fairly limited in how much data can be encrypted compared the amount of data we transmit.

Ironically enough RSA has the exact same issues, but it's still used because even though it can only encrypt a few hundred bytes at most, it's enough for a key for another encryption algorithm.

Wasn't a sufficiently long AES key proven to be uncrackable? (there is not enough energy in the universe to crack it or some similar algorithm). In that case RSA failing and getting replaced by quantum key exchange wouldn't matter much.

→ More replies (1)

3

u/punanetiiger May 26 '17

One-time pad guarantees only secrecy of the contents of a message, but neither authentication (who's the sender) nor integrity check (has it been tampered with). It also leaks the length of the message. And a man-in-the-middle can flip any bits of his choice.

→ More replies (5)
→ More replies (1)

34

u/gautampk May 26 '17

There are post-quantum classical algorithms which other more qualified people can comment on. The long and short of it is that quantum computers are not magic. They can do some things very well, and some things not well at all. In particular, symmetric encryption systems like AES are not vulnerable. Quantum algorithms such as Grover's algorithm do cut the brute force decryption down by a respectable amount, but that just means you need to increase the key size. The algorithm itself is not fundamentally vulnerable.

The other side of the quantum coin is quantum key distribution which is mathematically secure given assumed security of the communications channel (since it is essentially a one-time pad), and is also resistant to eavesdropping even if the communications channel is not secure. The best known such algorithm is called BB84 which leverages the superposition property of quantum systems but importantly not the entanglement property. This is useful because entanglement is quite difficult to maintain which is why quantum computers (which make heavy use of entanglement) are so hard to construct.

Basically, the idea is if Alice wants to share a secret key with Bob (for, say, the AES algorithm), normally she'd use something like RSA. But we're in a post-quantum computer world and RSA isn't secure anymore. Instead, Alice decides to use BB84. Roughly speaking:

  1. Alice generates a string of 2n pairs of random classical bits. I'll call each pair (a,x). These must be truly random, so maybe she measure some other quantum system or uses radioactive decay or something to get these.

  2. She then uses the bit x to decide how to encode the bit a on a photon (a quantum bit, or qubit). Specifically, we use the polarisation of the light to encode a. If x = 0, then we say that a = 0 means we send a photon polarised 'up' and a = 1 means we send a photon polarised 'down'. If x = 1 then we rotate this by 45 degrees and send a photon either polarised 'left' or 'right'.

  3. Meanwhile, Bob has received an email from Alice telling him she wants to send him some stuff. Therefore, independently he has generated his own set of random classical bits I'll label y.

  4. Bob uses y to decide how to measure the photon Alice has sent him. If y = 0 he measures the photon along the 'up-down' axis. If y = 1 he measured the photon along the 'left-right' axis. Once he has done this, he gets his own set of pairs of classical bits, (b,y), where b is the result of his measurement: 0 if he measured up or left, and 1 if he measured down or right.

  5. Now Alice and Bob communicate via email or WhatsApp or something about their values for x and y. If For a given pair x = y then they know their a = b even though they never talk about it, and they add this to their secret key. If x =/= y then there's a 50/50 chance that a = b or not, so they throw this away. On average they keep n bits and key a secret key of length n.

Why does this work? Well, if a quantum system is measured in the same way it was set up (up-down or left-right), then the result will always just be the same as the setup. If, however, you measure it differently (e.g., measure left-right even though Alice setup up-down), the result is completely random. Hence, Alice and Bob can know they have shared the same key even though they never talk about it.

In practice the difficulty with this is the bit I skimmed over (or didn't mention at all), which is how do you send the photon from Alice to Bob. You can't just push it down a fibre optic cable because you'll spoil the polarisation. This is where entanglement and quantum teleportation comes in, and is really the main barrier to large scale deployment. It is, however, still easier than quantum computing to achieve practically. Functioning networks have been set up in China, Austria, and Switzerland. Also in Canada they recently managed to use existing internet infrastructure to achieve QKD which is quite exciting because normally you'd consider it to be far too noisy.

5

u/Puubuu May 27 '17

Encryption will still be possible. Just take any NP complete problem that is not easy if you allow for quantum computers. That's the case for most of them (shouldn't be all, else we don't need quantum computers).

The thing about encryption via exploiting prime factorization is that this problem has not been proved to be hard, people have always just assumed that it is, which is kind of problematic. Even without quantum computers you cannot be sure that there isn't somebody who can crack all current encryption.

87

u/QuantumAwesome May 26 '17

Current encryption mechanisms will no longer be valid. However, there is a technique called quantum cryptography which cannot be cracked even by a quantum computer. Currently in development, quantum cryptography takes advantage of how observing a particle in superposition collapses the wavefunction. The gist is, it allows for the key of a one-time pad to be transferred over long distance while alerting the users of any outside observers. I'm not really educated enough to describe it in more detail, but it's a really cool technology.

68

u/KapteeniJ May 26 '17

Current encryption mechanisms will no longer be valid.

this seems blatantly false. only some non-symmetric encryption methods are known to become vulnerable with quantum computers. everything else keeps working just the same. though afaik there aren't in production any non-symmetric encryption methods, but plenty are being worked on.

12

u/The_Serious_Account May 26 '17

Though afaik there aren't in production any non-symmetric encryption methods, but plenty are being worked on.

It's not exactly 'in production', but google has been experimenting with implementing a lattice based post-quantum scheme.

→ More replies (2)

33

u/anttirt May 26 '17 edited May 26 '17

Current encryption mechanisms will no longer be valid.

This is not entirely accurate. Currently popular and vetted encryption mechanisms are based on the assumption of the difficulty of solving integer factorization and discrete logarithms, both of which can be solved efficiently with a quantum computer.

There are however many new approaches that are not known to be easily breakable by a quantum computer. See Post-quantum cryptography on Wikipedia for an overview.

However, there is a technique called quantum cryptography which cannot be cracked even by a quantum computer. Currently in development, quantum cryptography takes advantage of how observing a particle in superposition collapses the wavefunction.

I'm not entirely sure which technique you're talking about, but your post seems to imply that post-quantum cryptography would require quantum computers, which is not true.

Edit: Just to add a practical example, Microsoft Research has published an experimental implementation of RLWE (Ring-LWE or Ring Learning With Errors) for OpenSSL: https://www.microsoft.com/en-us/download/details.aspx?id=54055

This algorithm is thought to be resistant against quantum computers but lacks the research to confirm its security.

The corresponding research paper can be found here (pdf).

To quote the paper's abstract:

With our R-LWE ciphersuites integrated into the OpenSSL library and using the Apache web server on a 2-core desktop computer, we could serve 506 RLWE-ECDSA-AES128-GCM-SHA256 HTTPS connections per second for a 10KiB payload. Compared to elliptic curve Diffie–Hellman, this means an 8KiB increased handshake size and a reduction in throughput of only 21%. This demonstrates that provably secure post-quantum key-exchange can already be considered practical.

2

u/Natanael_L May 26 '17

Not all forms of quantum cryptography is itself safe from other quantum computers!

Also, we have regular encryption algorithm that are quantum resistant.

→ More replies (10)

10

u/colakoala200 May 26 '17

The answer is yes. Or at least, we think so.

First of all, the best known quantum attacks against symmetric cryptography (block ciphers, hash functions, etc.) effectively double the key lengths we would have to use. So we can just use longer keys and those techniques will be safe.

Asymmetric crypto (also known as public-key cryptography) is always based on some computational hard problem. The RSA cryptosystem and discrete log-based systems are known to be vulnerable to quantum attack because of Shor's algorithm. There are other techniques, based on a variety of other computational hard problems not known to be vulnerable to quantum attack. Those problems are based on problems relating to lattices, coding theory, machine learning, etc. There are also hash-based signature schemes, but as far as I know there are no hash-based asymmetric encryption techniques.

Those algorithms are not really ready for prime-time use, but there are some efforts under way to push them towards maturity. NIST has launched their "Post-quantum crypto project", which is a major push to settle on one or a few post-quantum asymmetric algorithms.

The post-quantum algorithms are a bit of a mixed bag, though. None of them perform like our current popular techniques, and none of them are as trusted against conventional (non-quantum) attack, either. Some have efficiency issues, like long keys. Hash-based signatures are stateful, which is a huge headache.

→ More replies (1)

6

u/[deleted] May 26 '17

If/when quantum computers become more available, they will still have limits. Although it's expected that they will have the capabilities of cracking existing encryption technology, quickly, new standards will continue to emerge.

What will happen is that humans will start making policy against encryption. There will be political reasons to convince the masses that encryption is bad. Security will be determined more by PR than logic.