How Quantum Computers Break The Internet... Starting Now

Veritasium
20 Mar 202324:28

Summary

TLDRThe video discusses the threat of quantum computing to current encryption methods, explaining the concept of 'Store Now, Decrypt Later' and the potential for quantum computers to break encryption in the future. It covers the history of encryption, the RSA algorithm, and the quantum computing process. The video also introduces new post-quantum cryptographic standards being developed to counteract these threats.

Takeaways

  • 🔒 The current practice of 'Store Now, Decrypt Later' (SNLD) involves collecting encrypted data with the expectation that future quantum computers will be able to decrypt it.
  • 💡 Quantum computers have the potential to undermine public key algorithms due to their superior processing capabilities, which could break encryption within minutes.
  • 📈 The US Congress has mandated the transition to new cryptographic methods that are quantum-resistant in response to the threat posed by quantum computing.
  • 🔑 Traditional encryption methods, like RSA, rely on the difficulty of factoring large numbers, a task that quantum computers could potentially perform much faster.
  • 🤔 Quantum computers utilize qubits, which can exist in multiple states simultaneously, allowing for the computation of many possibilities at once.
  • 🌌 The power of quantum computers comes with a limitation: when measuring a superposition of states, only one outcome is obtained, and the rest of the information is lost.
  • 🔍 Peter Shor's algorithm, using quantum Fourier transform, can efficiently find the period in a sequence, which is a key step in factoring large numbers on a quantum computer.
  • 🔄 The process of factoring large numbers using a quantum computer involves creating a periodic superposition of states, finding the period, and then using classical algorithms to find the factors.
  • 🛡️ Scientists are actively developing new encryption methods that are secure against both classical and quantum computing attacks, with NIST selecting four such algorithms in 2022.
  • 📊 Post-quantum cryptography based on lattice mathematics offers a promising direction for secure encryption, as solving the closest vector problem in high dimensions is computationally hard.
  • 🚀 The race is on between the development of quantum computers and the creation of quantum-resistant encryption, with the latter aiming to stay ahead to ensure data security.

Q & A

  • What is the concept of 'Store Now, Decrypt Later' (SNDL)?

    -SNDL refers to the strategy where encrypted data such as passwords, bank details, and social security numbers are intercepted and stored with the expectation that future quantum computers will be able to decrypt them within the next 10 to 20 years.

  • Why is the National Security Administration concerned about quantum computers?

    -The National Security Administration is concerned because a sufficiently large quantum computer, if built, would be capable of undermining all widely deployed public key algorithms, thus breaking the encryption that currently secures sensitive information.

  • What is the significance of the RSA encryption method?

    -RSA is an asymmetric key encryption system that uses two different keys for encryption and decryption. It is significant because it allows secure communication without the need to share a secret key in person, and it has been effective for over 40 years.

  • How do quantum computers differ from classical computers in terms of bits and qubits?

    -Classical computers use bits that can be in a state of either zero or one at any given time. Quantum computers, on the other hand, use qubits that can exist in a superposition of states, allowing them to be in both zero and one states simultaneously, which gives quantum computers their parallel processing capabilities.

  • What is the main challenge in harnessing the power of quantum computers?

    -The main challenge is that while quantum computers can perform many calculations simultaneously, extracting useful information from the superposition of states is difficult because measurement collapses the superposition to a single outcome, losing all other information.

  • What is the quantum Fourier transform and how is it used in quantum computing?

    -The quantum Fourier transform is a quantum equivalent of the classical Fourier transform that can extract frequency information from a periodic superposition of states. It is used in quantum algorithms to find patterns or cycles in the data, which is particularly useful in factoring large numbers, a task that can break certain encryption schemes.

  • How does the process of factoring large numbers using a quantum computer differ from classical methods?

    -Quantum computers can use the quantum Fourier transform to find the period of a repeating pattern in the remainders when a number is raised to successive powers and divided by the number to be factored. This period is then used to find factors of the number, a process that is much faster than classical factoring algorithms.

  • What is the current state of quantum computers in terms of the number of qubits?

    -As of the script's knowledge cutoff in 2023, quantum computers have not yet reached the number of qubits required to break RSA encryption. However, the progress in quantum computing is exponential, and estimates for the number of qubits needed for such a task have been decreasing.

  • What is the significance of the National Institute of Standards and Technology (NIST) selecting new encryption algorithms?

    -The selection of new encryption algorithms by NIST is significant because it represents a proactive step towards securing data against potential future threats from quantum computers. These algorithms are designed to be resistant to both classical and quantum computational attacks.

  • Can you explain the concept of lattices in the context of post-quantum cryptography?

    -In post-quantum cryptography, lattices are complex mathematical structures used as the basis for encryption algorithms. The security of these algorithms is based on the difficulty of finding the shortest vector in a high-dimensional lattice, a problem that is believed to be hard for both classical and quantum computers.

  • What is the role of Brilliant in the context of this script?

    -Brilliant is mentioned in the script as an educational platform offering courses on quantum algorithms and data analysis. These courses aim to help learners understand the fundamentals and applications of quantum computing and cryptography, as well as develop statistical reasoning skills.

Outlines

00:00

🔒 Quantum Threat to Encryption

The script discusses the current threat posed by quantum computing to encryption methods. Nations and individuals are storing encrypted data, anticipating future quantum computers will decrypt it easily. This strategy is known as Store Now, Decrypt Later (SNDL). The National Security Administration warns that a sufficiently large quantum computer could undermine public key algorithms. The US Congress has mandated a transition to quantum-resistant cryptography. The script also explains the historical shift from symmetric key algorithms, where a single key is used for encryption and decryption, to the RSA asymmetric key system, which uses different keys for each process. The RSA system relies on the difficulty of factoring large prime numbers, a task made feasible by quantum computing.

05:01

🧠 Quantum Computing's Potential and Limitations

This paragraph delves into the power and limitations of quantum computing. Quantum computers use qubits, which unlike classical bits, can exist in multiple states simultaneously (superposition). This allows quantum computers to perform many calculations at once. However, extracting useful information from these computations is challenging because measuring a superposition only yields a single value at random, losing all other information. Quantum computers can potentially solve certain problems, like factoring large numbers, much faster than classical computers. Peter Shor and Don Coppersmith's quantum Fourier transform is highlighted as a key technique for extracting frequency information from periodic superpositions, which is crucial for breaking cryptographic codes.

10:04

🔍 Factoring Primes with Quantum Computers

The script explains how quantum computers can factor large numbers more efficiently than classical computers. It uses the example of factoring 77 to illustrate the process. The method involves picking a number 'g' that doesn't share factors with the number 'N', and repeatedly squaring 'g' until a multiple of 'N' plus one is reached. This reveals an exponent 'r' that can be used to generate two new numbers likely to share factors with 'N'. Euclid's algorithm is then used to find these shared factors. Quantum computers speed up the process of finding 'r' by exploiting the periodic nature of remainders in a superposition of states, making it feasible to factor large numbers in a short time.

15:05

🌐 The Race for Quantum-Resistant Encryption

The script discusses the ongoing efforts to develop encryption methods that can withstand quantum attacks. It mentions that scientists have been searching for new encryption techniques since the threat of quantum decryption is imminent. The National Institute of Standards and Technology (NIST) launched a competition in 2016 to find such algorithms. By July 5th, 2022, NIST selected four algorithms for their post-quantum cryptographic standard. Three of these are based on lattice-based mathematics, which involves complex problems in high dimensions that are believed to be difficult for both classical and quantum computers to solve, making them promising candidates for secure encryption.

20:06

🌐 Lattice-Based Cryptography and the Future of Data Security

This paragraph explores lattice-based cryptography, a potential solution for quantum-resistant encryption. It explains the concept of lattices in high-dimensional space and the difficulty of solving the closest vector problem in such spaces. The method involves each person having a secret set of vectors that describe a lattice, which they only share publicly in a form that is hard to work with. To send a message, a sender picks a point on the recipient's lattice and adds random noise. The recipient, who has the good vectors, can then decode the message by finding the closest lattice point to the noisy message. This method is considered secure against both classical and quantum computers, ensuring data remains confidential.

🚀 The Role of Quantum Computing and AI in the Future

The final paragraph shifts focus to the broader implications of quantum computing and AI in the future. It emphasizes the importance of understanding these technologies now, even if their full applications are not yet clear. The script promotes a course on quantum algorithms offered by Brilliant, which is co-developed with Microsoft and Alphabet X. The course allows learners to simulate quantum gates and execute real quantum algorithms. Additionally, the script highlights the importance of strong statistical reasoning skills in mastering various topics in math and computer science, and Brilliant's course on data analysis is recommended for developing these skills. The script concludes by thanking Brilliant for sponsoring the video and offering a discount to viewers.

Mindmap

Keywords

💡Quantum Computing

Quantum computing is a type of computation that uses quantum-mechanical phenomena such as superposition and entanglement to perform operations on data. Unlike classical computers, which use bits as the smallest unit of information, quantum computers use qubits, which can exist in multiple states simultaneously, allowing them to perform complex calculations much faster. In the script, quantum computing is discussed as a potential future threat to current encryption methods due to its ability to solve problems much faster than classical computers.

💡Store Now, Decrypt Later (SNDL)

Store Now, Decrypt Later (SNDL) is a strategy used by entities who intercept and store encrypted data with the expectation that it will be possible to decrypt it in the future using advanced technology, such as quantum computers. This approach is based on the belief that quantum computing will be capable of breaking current encryption algorithms, which makes intercepted data valuable even if it cannot be accessed immediately. The script highlights the urgency of developing new encryption methods that are resistant to future quantum attacks.

💡Public Key Cryptography

Public key cryptography is a cryptographic system that uses pairs of keys: public keys, which may be disseminated widely, and private keys, which are known only to the owner. This allows secure communication over an insecure channel without needing to exchange a secret key in advance. The script discusses how quantum computers could potentially break widely used public key algorithms like RSA, which currently form the backbone of secure internet communications.

💡RSA Encryption

RSA encryption is a public key encryption technology that uses the difficulty of factoring large prime numbers to secure data. It was developed in 1977 by Ron Rivest, Adi Shamir, and Leonard Adleman. The script explains how RSA works and why it is vulnerable to quantum computing, as quantum algorithms can factorize large numbers exponentially faster than classical algorithms, potentially rendering RSA insecure in the future.

💡Qubit

A qubit, or quantum bit, is the basic unit of quantum information. Unlike a classical bit, which can be either 0 or 1, a qubit can exist in a superposition of states, meaning it can be both 0 and 1 simultaneously. This allows quantum computers to perform many calculations at once, significantly increasing their computational power. The script uses qubits to illustrate how quantum computers can process vast amounts of information in parallel, posing a threat to traditional encryption methods.

💡Quantum Fourier Transform

The quantum Fourier transform is a linear transformation on quantum bits and is the quantum analog of the discrete Fourier transform. It is a crucial component of many quantum algorithms, including Shor's algorithm for factoring large integers, which is significant for breaking encryption. The script explains how the quantum Fourier transform can be used to solve periodic problems that are difficult for classical computers, thereby enabling quantum computers to break encryption like RSA.

💡Lattice-based Cryptography

Lattice-based cryptography is a type of post-quantum cryptography that relies on the hardness of lattice problems, which remain difficult even for quantum computers. In the script, lattice-based cryptography is presented as a promising solution to creating encryption algorithms that are secure against quantum attacks. The script explains how lattices work in multiple dimensions and why they are challenging for computers to solve, offering an example of how this approach could protect data in a post-quantum world.

💡Euclid’s Algorithm

Euclid's algorithm is a method for computing the greatest common divisor (GCD) of two integers. It is based on the principle that the GCD of two numbers also divides their difference. In the context of the script, Euclid’s algorithm is used to find common factors between numbers, which is a step in the process of factoring large numbers, a problem that is at the core of RSA encryption and its vulnerability to quantum computing.

💡Superposition

Superposition is a fundamental principle of quantum mechanics, where a quantum system can exist in multiple states simultaneously until it is measured. This principle allows quantum computers to perform multiple calculations at once, dramatically increasing their processing power compared to classical computers. The script describes how superposition enables quantum computers to evaluate many possible solutions to a problem simultaneously, a key factor in their ability to break complex encryption algorithms.

💡Post-Quantum Cryptography

Post-quantum cryptography refers to cryptographic algorithms that are designed to be secure against the potential threats posed by quantum computers. These algorithms are intended to replace current systems that could be vulnerable to quantum attacks. The script highlights the importance of transitioning to post-quantum cryptographic methods to ensure the security of data as quantum computing technology advances.

Highlights

Nation states and individual actors are intercepting and storing encrypted data like passwords and bank details, anticipating future quantum computers that can break encryption.

The concept of 'Store Now, Decrypt Later' (SNDL) is based on the belief that quantum computers will be able to decrypt currently secure data in the future.

The National Security Administration warns that a sufficiently large quantum computer could undermine all widely deployed public key algorithms.

US Congress has passed legislation mandating the transition to new cryptography methods that quantum computers cannot break.

Current encryption schemes like RSA rely on the difficulty of factoring large prime numbers, a task that quantum computers could potentially perform quickly.

Quantum computers use qubits, which unlike classical bits, can exist in a superposition of states, allowing simultaneous computation of multiple possibilities.

Peter Shor and Don Coppersmith's quantum Fourier transform allows quantum computers to extract frequency information from a periodic superposition, crucial for factoring large numbers.

Quantum computers can factor the product of two primes much faster than conventional computers by exploiting the periodicity in the remainders of powers of a number modulo N.

The process of factoring large numbers on a quantum computer involves creating a superposition of states, measuring the remainder, and applying the quantum Fourier transform.

The quantum part of factoring involves finding the exponent that satisfies a specific equation related to the remainders of powers of a number modulo N.

The number of qubits required to break RSA encryption has been estimated to decrease from a billion to 20 million due to technological advancements.

Scientists are developing new encryption methods that can withstand attacks from both classical and quantum computers, with NIST selecting four post-quantum cryptographic standards in 2022.

Three of the selected post-quantum algorithms are based on lattice-based cryptography, which involves solving complex problems in high-dimensional spaces.

Lattice-based encryption schemes use a set of vectors to describe a lattice, with the secret vectors used to encode and decode messages.

The security of lattice-based cryptography relies on the difficulty of finding the closest lattice point to a given target, a problem that becomes exponentially harder as the number of dimensions increases.

Researchers, mathematicians, and cryptographers are working to ensure the security of data in the face of quantum computing advancements.

Brilliant offers courses on quantum algorithms and data analysis, helping learners understand and master the fundamentals of these fields.

Transcripts

play00:00

- Right now some nation states

play00:02

and individual actors are intercepting and storing lots

play00:06

of encrypted data like passwords, bank details,

play00:09

and social security numbers.

play00:11

But they can't open these files.

play00:13

So why are they doing it?

play00:15

Well, because they believe that within

play00:16

the next 10 to 20 years,

play00:18

they will have access to a quantum computer

play00:20

that can break the encryption in minutes.

play00:23

This procedure is known

play00:25

as Store Now, Decrypt Later or SNDL.

play00:29

And it works because there is information around today

play00:32

that will still be valuable in a decade.

play00:34

Things like industrial and pharmaceutical research

play00:37

and top secret government intelligence,

play00:39

and everyone is aware of this threat.

play00:42

The National Security Administration

play00:44

says that a sufficiently large quantum computer,

play00:46

if built would be capable of undermining

play00:49

all widely deployed public key algorithms.

play00:52

- You know in a five to 10 year timeframe,

play00:54

quantum computing will break encryption as we know it today.

play00:58

- Even though sufficiently powerful quantum computers

play01:00

are still years away,

play01:02

they're already a threat because of Store Now Decrypt Later,

play01:05

which is why the US Congress just passed legislation

play01:08

mandating all agencies start transitioning

play01:11

right now to new methods of cryptography

play01:13

that can't be broken by quantum computers.

play01:17

You know, our current encryption schemes

play01:19

have been remarkably successful

play01:20

working effectively for over 40 years.

play01:23

Up until the 1970s, if you wanted to exchange

play01:27

private information with someone,

play01:28

you would first have to meet up in person

play01:31

and share a secret key.

play01:33

This same key would be used to encrypt and decrypt messages.

play01:37

So it's known as a symmetric key algorithm.

play01:41

As long as no one else gets their hands on the key,

play01:43

your messages are safe.

play01:46

But now what if you wanna send information

play01:48

to someone you've never met,

play01:49

and it's too hard to arrange an in-person meeting.

play01:53

You can't share a key over an unsecured channel

play01:56

like a phone line or the mail,

play01:58

because it could be intercepted.

play02:00

And this is what in 1977, led three scientists,

play02:04

Riverst, Shamir, and Adelman

play02:06

to come up with an encryption breakthrough.

play02:09

Today it's known by their initials RSA,

play02:12

and it works something like this.

play02:14

Every person has two really big prime numbers,

play02:17

all their own which they keep secret.

play02:20

They multiply these numbers together

play02:22

to get an even bigger number,

play02:24

which they make public for everyone to see.

play02:27

Now, if I wanna send someone a private message,

play02:30

I use their big public number to garble my message.

play02:34

And I garble it in such a way that it is impossible

play02:37

to ungarble without knowing the two prime factors

play02:41

that made that number.

play02:42

This is an asymmetric key system,

play02:44

since different keys are used to encrypt

play02:47

and decrypt the message.

play02:49

So it's easy for my intended recipient to decode,

play02:53

but impossible for everyone else,

play02:55

unless they can factor that large public number.

play02:59

Now, someone could try to factor it, using a supercomputer,

play03:02

in the best known factoring algorithm

play03:04

the General Number Field Sieve, but modern cryptography

play03:07

uses prime numbers that are around 313 digits long.

play03:11

Factoring a product of two primes this big,

play03:13

even with a supercomputer,

play03:15

would take around 16 million years,

play03:17

but not on a quantum computer.

play03:21

See, in normal computers, a bit can only

play03:23

be in one state at a time, either a zero or a one.

play03:27

So if you had two bits, they could be

play03:29

in one of four possible states, 00, 01, 10 or 11.

play03:36

Let's say each of these states represents a number,

play03:38

0, 1, 2, or 3.

play03:41

If we want to do a calculation, for example, raising seven

play03:44

to the power of one of these numbers,

play03:45

we can only do it for one state at a time,

play03:48

in this case seven squared

play03:50

and so we get the answer 49.

play03:53

Quantum computers consist of qubits

play03:55

which also have two states, zero or one.

play03:58

But unlike a classical bit, a qubit,

play04:01

doesn't have to be in just one state at a time.

play04:04

It can be in an arbitrary combination of those states,

play04:07

a superposition if you will, of zero and one.

play04:10

So if you have two qubits, they can exist simultaneously

play04:14

in a superposition of 0, 1, 2, and 3.

play04:20

Now, when we repeat the same calculation,

play04:22

it will actually perform the calculation

play04:24

for all of those numbers at the same time.

play04:27

And what we're left

play04:28

with is a super position of the different answers.

play04:31

1, 7, 49 and 343.

play04:35

If we add another qubit,

play04:37

we double the number of possible states.

play04:39

So with three qubits, we can represent eight states,

play04:42

and thus perform eight calculations all at once.

play04:46

Increase that number to just 20 qubits,

play04:48

and you can already represent

play04:50

over a million different states,

play04:52

meaning you can simultaneously compute

play04:54

over a million different answers.

play04:57

With 300 qubits, you can represent more states

play05:00

than there are particles in the observable universe.

play05:04

This sounds incredibly powerful and it is,

play05:07

but there is one very big catch.

play05:11

All of the answers to the computation are embedded

play05:13

in a superposition of states,

play05:15

but you can't simply read out this superposition.

play05:19

When you make a measurement, you only get a single value

play05:21

from the superposition basically at random,

play05:24

and all the other information is lost.

play05:27

So in order to harness the power of a quantum computer,

play05:30

you need a smart way to convert a superposition of states

play05:33

into one that contains only the information you want.

play05:37

This is an incredibly difficult task,

play05:40

which is why for most applications,

play05:41

quantum computers are useless.

play05:43

So far, we've only identified a few problems,

play05:46

where we can actually do this, but as luck would have it,

play05:49

these are precisely the problems that form the foundation

play05:52

of nearly all the public key cryptography we use today.

play05:56

In 1994, Peter Shor and Don Coppersmith figured out

play06:00

how to take a quantum Fourier transform.

play06:03

It works just like a normal Fourier transform,

play06:05

apply it to some periodic signal,

play06:07

and it returns the frequencies that are in that signal.

play06:10

Now this may not seem particularly interesting

play06:12

but consider this.

play06:14

If we have a superposition of states that is periodic,

play06:17

that is the terms in the superposition are separated,

play06:20

by some regular amount,

play06:22

well we can apply the quantum Fourier transform

play06:24

and will be left with states

play06:25

that contain the frequency of the signal.

play06:28

So this we can measure.

play06:30

The quantum Fourier transform,

play06:32

allows us to extract frequency information

play06:34

from a periodic superposition,

play06:37

and that is gonna come in handy.

play06:41

So how does a quantum computer factor the product

play06:43

of two primes much faster than a conventional computer?

play06:47

I want to explain this by first walking

play06:48

through a simple example with no quantum computer required,

play06:52

and then I'll show how a quantum computer

play06:54

could execute this method

play06:56

even for a very large number in a short period of time.

play07:00

So let's say we have a number N,

play07:02

which is the product of two primes, p and q.

play07:06

For the sake of this example, let's set N equal to 77.

play07:10

Now I bet you can guess the prime factors,

play07:12

but let's pretend for the moment that we don't know them,

play07:15

because with a product of really big primes, we wouldn't.

play07:19

Now I want to use a fact about numbers

play07:21

that feels like magic.

play07:23

Pick a number g that doesn't share any factors with N.

play07:27

If you multiply g by itself over and over and over,

play07:32

you will always eventually, reach a multiple of N plus one.

play07:38

In other words, you can always find some exponent r,

play07:41

such that g to the power of r, is a multiple of N plus one.

play07:46

Let's see how this works.

play07:48

Pick any number that is smaller than 77.

play07:50

I'll pick the number eight.

play07:51

This number doesn't share factors with 77.

play07:54

And if you were doing this with big primes,

play07:56

it would also be extremely unlikely

play07:58

that you just happen to pick a number

play07:59

that shares factors with N.

play08:02

Now multiply eight by itself once, twice, three times

play08:06

four times, and so on, raising eight to ever higher powers

play08:10

and then divide each of these numbers by 77.

play08:14

We're not really interested in how many times

play08:16

77 goes into the number, just the remainder,

play08:19

what's left over, because at some point,

play08:22

77 should divide one of these numbers

play08:24

with a remainder of exactly one.

play08:27

So eight divided by 77 is zero with a remainder of 8,

play08:30

64 divided by 77 is zero remainder 64.

play08:34

512 divided by 77 is six remainder 50.

play08:38

And as we keep going, we get remainders

play08:40

of 15, 43, 36, 57, 71, 29, and finally one.

play08:49

So there we have it, eight to the power of 10

play08:53

is one more than a multiple of 77.

play08:56

So we've found the exponent R that satisfies this equation.

play09:00

But how does this help find the factors of N?

play09:03

Well, we rearrange the equation

play09:05

to bring one over to the left hand side,

play09:08

and then we can split it into two terms like so.

play09:11

And now as long as r is even, we have one integer

play09:15

times another integer is equal to a multiple of N.

play09:20

This looks remarkably similar to p times q equals N.

play09:25

I mean since we know that p and q

play09:27

are on the right hand side of this equation,

play09:28

they must also be on the left hand side

play09:31

just multiplied by some additional factors.

play09:35

So one way to think

play09:36

about what we've done is

play09:37

we've taken a bad guess for one of the factors G,

play09:40

and by finding the exponent r,

play09:43

we've turned it into two much better guesses

play09:46

that probably do share factors with N.

play09:50

Since r was 10, the two terms

play09:52

on the left hand side are eight

play09:54

to the power of five plus one, 32,769

play09:58

and eight to the power of five minus one, 32,767.

play10:04

These two numbers probably share factors with N.

play10:07

So how do we find them?

play10:09

We use Euclid's algorithm.

play10:13

If you wanna find the greatest common divisor

play10:15

of two numbers, say 32,769 and 77,

play10:20

divide the bigger number by the smaller one

play10:22

and record the remainder.

play10:24

In this case, 32,769 divided by 77 gives a remainder of 44.

play10:30

Then shift the numbers one position left and repeat.

play10:34

So now we divide 77 by 44 and we get a remainder of 33.

play10:40

Repeat the process again.

play10:41

44 divided by 33 gives a remainder of 11

play10:45

and again 33 divided by 11 equals three remainder zero.

play10:49

When the remainder is zero,

play10:51

the divisor is the greatest common factor

play10:54

between the two numbers you started with.

play10:56

In this case, it's 11,

play10:58

which is indeed a factor of 77 and 32,769.

play11:03

You could do the same procedure

play11:05

with the other number or just divide 77 by 11 to get seven,

play11:09

its other prime factor.

play11:11

So to recap, if you wanna find the prime factors p and q

play11:15

of a number N, first, make a bad guess, g,

play11:19

second, find out how many times r you have to multiply g

play11:23

by itself to reach one more than a multiple of N.

play11:26

Third, use that exponent to calculate

play11:28

two new numbers that probably do share factors with N.

play11:32

And finally use Euclid's algorithm

play11:34

to find the shared factors between those numbers and N,

play11:38

which should give you p and q.

play11:41

Now, you don't need a quantum computer

play11:42

to run any of these steps, but on a classical computer,

play11:46

this method wouldn't be any faster than other methods.

play11:49

The key process that a quantum computer speeds up

play11:51

is step two, finding the exponent you raise G2

play11:55

to equal one more than a multiple of N.

play11:58

To see why, let's go back to our example,

play12:01

where eight to the power of 10 is

play12:03

one more than a multiple of 77.

play12:05

Watch what happens to the remainders

play12:08

if we keep going past eight to the power of 10,

play12:10

to 8 to the 11, eight to the 12, and so on.

play12:14

Well, we get remainders of 8, 64, 50, 15, 43, 36,

play12:21

57, 71, 29, and again one.

play12:27

The remainders cycle and they will just keep cycling.

play12:32

Notice how the exponent that yields a remainder

play12:35

of one is 20, which is 10 more than the first exponent

play12:38

that yielded a remainder of one.

play12:40

So we know that eight to the 30

play12:42

and eight to the 40, 8 raised to any power divisible

play12:45

by 10 will also be one more than a multiple of 77.

play12:49

It's also worth noting that if you pick any remainder

play12:53

say 15, the next time you find that same remainder,

play12:56

the exponent will have increased by 10.

play13:00

So you can find the exponent R that gets us

play13:02

to one more than a multiple of n,

play13:04

by looking at the spacing of any remainder, not just one.

play13:09

Remember that.

play13:11

Here I'm plotting out the remainders on a log scale

play13:14

so you can see they are periodic with a period of 10.

play13:17

If I had made a different guess,

play13:19

say I had picked G equals 15 instead of eight,

play13:22

well then the period would be different

play13:23

and the remainders would be different

play13:26

but there would always be a remainder of one.

play13:30

Why is this?

play13:31

Well, now that you can see this is a repeating pattern,

play13:35

we can go back to the beginning

play13:36

and any number raised to the power of zero is one.

play13:42

So that is actually the first remainder.

play13:44

So it must also appear when the cycle starts again.

play13:49

Now we are ready to use a quantum computer

play13:51

to factor any large product of two primes.

play13:54

First we split up the qubits into two sets.

play13:57

The first set we prepare in a superposition of zero

play14:00

and one and two and three

play14:03

and four and five and six and seven and eight and nine,

play14:05

all the way up to 10 to the power of 1,234.

play14:10

Yeah, this is a huge superposition,

play14:14

but if we had perfect qubits,

play14:16

it would require only around 4,100.

play14:19

The other set contains a similar number of qubits

play14:22

all left in the zero state for now.

play14:25

Now we make our guess G,

play14:28

which most likely doesn't share factors with N.

play14:31

We raise G to the power of the first set of qubits

play14:35

and then we divide by N

play14:36

and store the remainder in the second set of qubits

play14:40

leaving the first set of qubits as it was.

play14:43

Now we have a superposition of all the numbers

play14:46

we started with and the remainder of raising G

play14:49

to the power of those numbers divided by N.

play14:52

And through this operation,

play14:54

we have entangled our two sets of qubits,

play14:58

but we can't just measure this superposition.

play15:01

If we did, we would get a random value and learn nothing.

play15:04

But there is a trick we can use.

play15:06

If we don't measure the entire superposition,

play15:09

but only the remainder part,

play15:11

we will obtain some random remainder.

play15:14

But this remainder won't occur just once.

play15:17

It will occur multiple times

play15:19

every time it comes up in the cycle.

play15:22

Imagine we were doing this with the example

play15:24

from before with N equals 77 and G equals eight.

play15:27

If the remainder we measured was say 15,

play15:31

then there would be multiple terms in our superposition.

play15:34

Because there are multiple exponents

play15:36

you can raise G2 that give this same remainder,

play15:39

exponents 4, 14, 24, 34, and so on.

play15:44

They are each separated by 10,

play15:46

and that value is the exponent that satisfies our equation.

play15:52

So more generally after measuring the remainder,

play15:55

we will be left with a superposition of states

play15:57

that all share the same remainder

play15:59

and the exponents will all be separated

play16:01

by the same amount r.

play16:03

This is the number we are looking for.

play16:06

Since the remainder is now the same for all states,

play16:09

we can put it to the side

play16:11

and we now have a superposition that is periodic.

play16:14

Each term is separated from its neighbors by an amount R.

play16:18

If we now apply the quantum Fourier transform

play16:20

to this superposition of states

play16:22

and I'm simplifying a little here,

play16:24

we will be left with states containing one over R.

play16:28

So all that's left to do now

play16:29

is perform a measurement and find R by inverting it,

play16:33

and that's it for the quantum part.

play16:36

Now, as long as r turns out to be even

play16:38

we can use r to turn our bad guess g

play16:40

into two numbers that likely share factors with N.

play16:44

And as long as these terms themselves

play16:45

are not a multiple of N,

play16:47

we can use Euclid's algorithm to find the factors of N

play16:49

and break the encryption.

play16:51

This would only take several thousand perfect qubits,

play16:55

but the qubits we have today are imperfect,

play16:58

so we need additional qubits

play16:59

to act as redundant information.

play17:02

In 2012, it was estimated

play17:04

that it would take a billion physical qubits

play17:06

to break RSA encryption,

play17:08

but by five years later that number

play17:10

had dropped to 230 million.

play17:12

And in 2019, after more technological breakthroughs,

play17:15

that estimate plummeted to just 20 million physical qubits.

play17:20

So how many qubits do we have today?

play17:23

Well, if we look at the state of IBM's quantum computers,

play17:26

we are nowhere near that number of qubits,

play17:29

but progress looks to be exponential.

play17:32

So now it's just a question

play17:34

of when these two curves will collide

play17:36

before all our existing public key encryption can be broken.

play17:42

Because we've long known this threat is coming,

play17:45

scientists have been looking for new ways to encrypt data,

play17:47

which can withstand attacks

play17:49

from both normal and quantum computers.

play17:51

In 2016, the National Institute of Standards and Technology

play17:54

or NIST, launched a competition

play17:56

to find new encryption algorithms

play17:58

that aren't vulnerable to quantum computers.

play18:00

Cryptographers from all over the world

play18:02

submitted 82 different proposals,

play18:04

which were rigorously tested, some were broken.

play18:07

And then on July 5th, 2022,

play18:09

NIST selected four of the algorithms to be part

play18:12

of their post-quantum cryptographic standard.

play18:15

So how do they work?

play18:17

Well, three of the algorithms are based

play18:19

on the mathematics of latices.

play18:21

So let's do a simple example in the 2D plane.

play18:24

Take two vectors, r1 and r2, by adding together

play18:29

different integer combinations

play18:30

of these vectors, say three times r1 and one times r2,

play18:34

you can get two different points

play18:36

and all the points you can get

play18:38

to by combining these two vectors

play18:39

in different ways is what is called a lattice.

play18:42

Now I will also give you the point C,

play18:45

and your task is to tell me which combination of r1 and r2

play18:49

will bring me to the lattice point closest to c.

play18:53

It's pretty easy to see that we can get there

play18:55

by going in the direction of r2 twice

play18:57

and in the negative direction of r1 twice.

play19:00

Simple enough.

play19:01

But those vectors, r1 and r2 are not

play19:04

the only vectors that can give you this lattice.

play19:07

Take b1 and b2 for example.

play19:10

These vectors also build up the same lattice.

play19:13

And now if I ask you the same question again,

play19:15

can you tell me the combination of b1 and b2

play19:18

that gets you to the lattice point closest to c?

play19:21

This has become a lot harder, but why is that?

play19:25

Each time we're taking a step, we're trying to get closer

play19:28

in either the X or Y direction, but with the b vectors,

play19:32

each time we take a step in the right direction

play19:34

with one vector, it puts us off in the other direction.

play19:38

And that's why these vectors are a lot harder to work with.

play19:41

In the end, it takes us a combination

play19:43

of eight times b1 and negative six times b2

play19:47

to get to the closest lattice point.

play19:49

That is a lot harder than before,

play19:52

but it's still a relatively easy problem to solve.

play19:55

But if we extend it to three dimensions,

play19:57

this already becomes a lot harder,

play19:59

especially because you're not given the collection

play20:02

of all lattice points.

play20:03

You're only given the vectors that make it up.

play20:05

So when you find a lattice point close to the target,

play20:08

you must still find all the other lattice points near it

play20:10

to make sure yours is indeed the closest.

play20:14

Let's take a circle of radius r in two dimensions.

play20:16

The number of lattice points inside the circle

play20:19

is proportional to r squared.

play20:21

Add a third dimension and the number of points

play20:23

in the sphere is proportional to r cubed.

play20:26

So just watch how the number of lattice points grows

play20:29

as we increase the number of dimensions.

play20:34

Solving the closest vector problem

play20:35

is a piece of cake for your computer in three dimensions.

play20:38

Even a hundred dimensions should be manageable.

play20:41

But in proposed future encryption schemes,

play20:44

we'll use around a thousand dimensions.

play20:47

Take one step in the right direction

play20:48

on one of those dimensions, and you could potentially

play20:51

be taking a wrong step in the other 999 dimensions.

play20:56

You win some, you lose everything else.

play21:00

With that many dimensions,

play21:01

it becomes extremely hard to find the closest point

play21:04

even for the most powerful computers,

play21:06

that is unless you know a good set of vectors.

play21:10

So how do we use that to encrypt data?

play21:13

Well, let's go back to our two-dimensional example.

play21:16

Each person has a good set of vectors

play21:18

that describes a lattice,

play21:19

but they keep these vectors secret,

play21:22

and they only share their lattice publicly

play21:24

using a set of vectors that is hard to work with.

play21:27

Now, if I want to send someone a message,

play21:29

I pick a point on their lattice, for example,

play21:32

say this point corresponds to the number seven.

play21:35

So if I wanna send the number seven, I can take that point

play21:39

but then add some random noise to it.

play21:42

So the message I send is not precisely

play21:44

at that point but close to it.

play21:47

Now, to decode the message, my recipient must figure out

play21:50

which lattice point is closest to the message point.

play21:53

In a thousand dimensions,

play21:55

this will be extremely hard to do

play21:57

unless you have the nice set of vectors,

play22:00

which my recipient does.

play22:02

So it's easy for the recipient,

play22:04

who has the good vectors, but hard for everyone else.

play22:07

And as far as we know, this problem is extremely

play22:11

difficult to solve for both normal and quantum computers.

play22:15

Behind the scenes, there's an army of researchers,

play22:18

mathematicians, and cryptographers,

play22:20

we're gonna make sure your secret data stays secret.

play22:23

These are some of the unsung heroes

play22:25

that will keep us safe moving forward,

play22:27

avoiding mass surveillance by governments

play22:29

keeping critical infrastructure protected

play22:31

and allowing you to live as if quantum computers

play22:34

were never invented in the first place.

play22:37

(digital buzzing)

play22:43

Something that fascinates me is being able

play22:45

to see where the world is headed.

play22:47

And right now it's clear that quantum computers

play22:49

and AI chatbots are going to play bigger and bigger roles

play22:53

in our lives in the coming decades.

play22:54

Even if we don't know exactly how they'll be implemented,

play22:58

I think it's important to learn how they work right now

play23:01

and you can do that with this video's sponsor, Brilliant.

play23:04

Brilliant has an incredible course

play23:06

on quantum algorithms.

play23:08

This one was co-developed with Microsoft and Alphabet X.

play23:11

I love that you can simulate quantum gates and write

play23:14

and execute real quantum algorithms right in the lesson.

play23:17

No need to set up your own development environment.

play23:20

And if you want to dive deeper into cryptography,

play23:22

making and breaking codes is really a matter of statistics.

play23:26

Strong statistical reasoning skills

play23:28

help us find patterns in data

play23:29

and make sense of them,

play23:30

which is crucial to mastering

play23:32

just about any topic in math

play23:34

and computer Science.

play23:35

Brilliant's course on data analysis

play23:37

will help you ramp up fast.

play23:39

It uses everyday situations,

play23:40

like business models to illustrate key concepts

play23:43

in statistics and it's interactive,

play23:45

so you can get hands on with data visualizations

play23:48

and develop a real intuition for interpreting them.

play23:52

You know the thing that sets Brilliant apart

play23:54

is they know how to break fundamentals down

play23:56

into their core building blocks,

play23:57

whether you're learning math, computer science

play23:59

or data analysis, Brilliant's

play24:01

thousands of bite-sized interactive lessons

play24:03

help you master key concepts

play24:05

and build to more advanced topics.

play24:07

You can try everything Brilliant has to offer

play24:09

for free for a full 30 days.

play24:11

Just go to brilliant.org/veritasium.

play24:14

I will put that link down in the description.

play24:16

And for viewers of this video, Brilliant is offering

play24:19

20% off their annual premium subscription

play24:21

to the first 200 people to sign up.

play24:23

So I wanna thank Brilliant for sponsoring this video,

play24:26

and I want to thank you for watching.

Rate This

5.0 / 5 (0 votes)

関連タグ
Quantum ComputingEncryptionRSACryptographyQuantum AlgorithmsData SecurityPublic KeyPost-QuantumNISTLattice-Based
英語で要約が必要ですか?