Table of contents
- Store Now, Decrypt Later (SNDL)
- Quantum Computing Threat
- History of Encryption
- Quantum Computing Basics
- Shor's Algorithm
- Shor's Algorithm Example
- Quantum Key Distribution
- Limitations of Quantum Computing
- Recap of the previous video
- Finding the factors of large numbers
- Using a fact about numbers to find factors
- Example of using the fact to find factors
- Recap of the process to find factors
- How a quantum computer speeds up the process
- Understanding the cycle of remainders
- Using a quantum computer to factorize a large number
- Quantum Factorization
- Finding the Number
- Breaking RSA Encryption
- Alternatives to RSA Encryption
- Lattice-Based Encryption
- Lattice Cryptography
- Importance of Researchers and Cryptographers
Store Now, Decrypt Later (SNDL)
Nation states and individual actors intercept and store encrypted data like passwords and bank details.
They cannot open the files but believe that within 10-20 years, they will have access to a quantum computer capable of breaking the encryption in minutes.
This procedure is known as Store Now, Decrypt Later or SNDL.
Information around today will still be valuable in a decade.
Quantum Computing Threat
Nation states and individual actors are aware of the quantum computing threat.
The National Security Administration says that a sufficiently large quantum computer if built, would be capable of undermining all widely deployed public key algorithms.
Quantum computing will break encryption as we know it today.
The US Congress passed legislation mandating all agencies to start transitioning to new methods of cryptography that can't be broken by quantum computers.
History of Encryption
Before the 1970s, private information was exchanged by meeting up in person and sharing a secret key.
Modern cryptography uses public key algorithms like RSA.
RSA works by every person having two large prime numbers that they keep secret and multiply together to get a bigger number.
The bigger number is made public for everyone to see.
To send a private message, the sender uses the recipient's big public number to garble the message.
The message is garbled in such a way that it is impossible to ungarble without knowing the two prime factors that made the number.
This is an asymmetric key system, where different keys are used to encrypt and decrypt the message.
Modern cryptography uses prime numbers that are around 313 digits long.
Factoring a product of two primes this big, even with a supercomputer, would take around 16 million years.
Quantum Computing Basics
Quantum computers consist of qubits which can be in an arbitrary combination of states, a superposition of zero and one.
If we have two qubits, they can exist simultaneously in a superposition of 0, 1, 2, and 3.
With three qubits, we can represent eight states.
With 20 qubits, we can represent over a million different states, meaning we can simultaneously compute over a million different answers.
With 300 qubits, we can represent more states than there are particles in the observable universe.
All of the answers to computation are embedded in a superposition of states but you can't simply read out this superposition.
To harness the power of a quantum computer, you need a smart way to convert the superposition of states into one that contains only the information you want.
Shor's Algorithm
Peter Shor and Don Coppersmith figured out how to take a quantum Fourier transform.
It works just like a normal Fourier transforms, apply it to some periodic signal, and it returns the frequencies that are in the signal.
The quantum Fourier transform allows us to extract frequency information from a periodic superposition.
Shor's algorithm uses the quantum Fourier transform to extract the prime factors of a number in superposition.
It is exponentially faster than the best-known classical algorithm, the General Number Field Sieve.
Shor's Algorithm Example
Let's say we have a number N, which is the product of two primes, p and q.
For the sake of this example, let's set N equal to 77.
To find the prime factors of 77 with Shor's algorithm, we need to create a superposition of all the possible factors.
We use a quantum Fourier transform to extract the period of the superposition, which gives us the prime factors of N.
A quantum computer can execute this method even for a very large number in a short period.
Quantum Key Distribution
Quantum key distribution (QKD) is a way of sharing a secret key over an insecure channel.
QKD works by using the principles of quantum mechanics to detect eavesdropping.
Alice sends Bob a stream of photons encoded with random polarizations.
Bob measures the polarizations and tells Alice which ones he received.
They use this information to create a shared secret key.
Any attempt to intercept the photons will alter their polarizations, alerting Alice and Bob to eavesdropping.
Limitations of Quantum Computing
Most applications of quantum computing are useless because of the difficulty of converting the superposition of states into one that contains only the information you want.
Quantum computers are good at solving specific problems like factoring large numbers and simulating quantum systems.
Quantum computers will not replace classical computers because they are not good at solving general problems like word processing and web browsing.
Recap of the previous video
The previous video explained how RSA encryption works using prime numbers.
It showed how difficult it is to factorize a number that is a product of two large prime numbers.
Factoring such a number is the basis of cracking RSA encryption.
Finding the factors of large numbers
To factorize a large number, it is necessary to find its prime factors.
With a product of really big primes, it is difficult to guess the prime factors.
A fact about numbers can be used to find the factors.
Using a fact about numbers to find factors
Pick a number g that doesn't share any factors with N.
If you multiply g by itself over and over, you will always eventually reach a multiple of N plus one.
In other words, you can always find some exponent r, such that g to the power of r, is a multiple N plus one.
Example of using the fact to find factors
Pick any number that is smaller than 77.
Multiply it by itself once, twice, or three times, and then divide each of these numbers by 77.
The remainder will eventually be one.
The exponent used to get the remaining one can be used to find two new numbers that probably share factors with N.
Use Euclid's algorithm to find the shared factors between those numbers and N, which should give p and q.
Recap of the process to find factors
To find the prime factors p and q of a number N, make a bad guess, g.
Find out how many times r you have to multiply g by itself to reach one more than a multiple of N.
Use that exponent to calculate two new numbers that probably do share factors with N.
Use Euclid's algorithm to find the shared factors between those numbers and N, which should give you p and q.
How a quantum computer speeds up the process
- The key process that a quantum computer speeds up is step two, finding the exponent you raise G2 to equal one more than a multiple of N.
Understanding the cycle of remainders
The remainders cycle and they will just keep cycling.
The exponent that yields a remainder of one is 20, which is 10 more than the first exponent that yielded a remainder of one.
So, we know that 8 to the 30 and 8 to the 40, and 8 raised to any power divisible by 10 will also be one more than a multiple of 77.
If you pick any remainder, the next time you find that same remainder, the exponent will have increased by 10.
The exponent R that gets us to one more than a multiple of n can be found by looking at the spacing of any remainder, not just one.
Using a quantum computer to factorize a large number
Quantum computers can factorize any large product of two primes.
First, split up the qubits into two sets.
The first set is prepared in a superposition of zero and one, and all the numbers up to 10 power of 1,234.
The other set contains a similar number of qubits all left in the zero state for now.
Make a guess G, which most likely doesn't share factors with N.
Raise G to the power of the first set of qubits and then divide by N.
Quantum Factorization
A superposition of all numbers and the remainder of raising G to power is created using qubits.
Two sets of qubits are entangled through this operation, but the superposition cannot be measured.
Measuring only the remaining part of the superposition produces a random remainder that occurs multiple times.
The exponents in the superposition that give the same remainder are separated by the same amount r.
Finding the Number
Since the remainder is now the same for all states, it can be put aside to get a periodic superposition.
Applying the quantum Fourier transform to this superposition produces states containing one over R.
By performing a measurement and inverting it, R can be found.
Breaking RSA Encryption
If R turns out to be even, then it can be used to turn a bad guess G into two numbers that likely share factors with N.
The factors of N can be found using Euclid's algorithm and the encryption can be broken.
Several thousand perfect qubits would be needed, but current qubits are imperfect, so additional redundant qubits are required.
Breaking the encryption would require around 20 million physical qubits, which is still beyond our current capabilities.
Alternatives to RSA Encryption
Scientists have been looking for new ways to encrypt data that can withstand attacks from both normal and quantum computers.
The National Institute of Standards and Technology (NIST) launched a competition to find new encryption algorithms that aren't vulnerable to quantum computers.
Cryptographers from all over the world submitted 82 different proposals, which were rigorously tested.
NIST selected four of the algorithms to be part of their post-quantum cryptographic standard.
Three of the algorithms are based on the mathematics of lattices.
Lattice-Based Encryption
Lattice-based encryption is one of the post-quantum cryptographic standards proposed by NIST.
Lattice-based encryption involves finding the closest lattice point to a target point using vectors.
The vectors that make up the lattice are provided, and the number of lattice points grows exponentially with the number of dimensions.
Solving the closest vector problem becomes extremely hard for computers in a high number of dimensions, making it difficult for hackers to break the encryption.
Lattice Cryptography
Lattice cryptography is a method of encryption that uses a set of vectors to create a lattice.
The vectors are kept secret, but the lattice is shared publicly.
To send a message, a point is picked on the lattice and some random noise is added to it.
The recipient decodes the message by figuring out which lattice point is closest to the message point.
This method is extremely difficult to solve for both normal and quantum computers.
Importance of Researchers and Cryptographers
There is an army of researchers, mathematicians, and cryptographers working behind the scenes to keep our secret data safe.
They are the unsung heroes that will keep us safe moving forward and avoid mass surveillance by governments.
They are also responsible for keeping critical infrastructure protected and allowing us to live as if quantum computers were never invented in the first place.