1. Home
  2. Explore
  3. Computer Science
  4. Store Now, Decrypt Later

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Store Now, Decrypt Later

Quantum Computing and the Future of Encryption


The Growing Threat: Store Now, Decrypt Later (SNDL)

Nation states and individual actors are currently intercepting and storing vast amounts of encrypted data — passwords, bank details, social security numbers, and other sensitive information. Although they cannot open these files today, they believe that within the next 10 to 20 years, a sufficiently powerful quantum computer will be able to break the encryption in minutes. This strategy is known as Store Now, Decrypt Later (SNDL).

SNDL works because certain information remains valuable for decades:

  • Industrial research and pharmaceutical patents

  • Top-secret government intelligence

  • Long-term financial data

Even well-informed agencies acknowledge this threat. The National Security Administration (NSA) has stated that a large-scale quantum computer "would be capable of undermining all widely deployed public key algorithms." In response, the U.S. Congress passed legislation mandating that all government agencies begin transitioning now to new cryptographic methods resistant to quantum attacks.

Key takeaway: Even before a quantum computer exists, the threat is already real because encrypted data collected today can be decrypted retroactively once quantum computing matures.


Classical Encryption: From Symmetric to Asymmetric Keys

Symmetric Key Cryptography

Before the 1970s, secure communication required two parties to meet in person and exchange a secret key. This same key was used both to encrypt and decrypt messages, known as a symmetric key algorithm. As long as the key remained secret, messages were safe.

Limitation: It is impractical to arrange in-person meetings for every new communication partner, and transmitting a key over an insecure channel (phone, mail) risks interception.

Asymmetric Key Cryptography: RSA

In 1977, Rivest, Shamir, and Adleman invented a breakthrough: RSA, an asymmetric key system.

  • Each person has two very large prime numbers kept secret.

  • These primes are multiplied to produce a public number shared with everyone.

  • To send a private message, the sender uses the recipient's public number to garble the message in a way that can only be reversed by knowing the original prime factors.

  • Different keys are used for encryption and decryption.

Why is RSA secure? Factoring a product of two large primes (e.g., 313-digit primes) using the best classical algorithm (the General Number Field Sieve) would take a supercomputer roughly 16 million years. However, a quantum computer could solve this problem in minutes.

Definition: An asymmetric key system uses one key (public) to encrypt and a different key (private) to decrypt.


Quantum Computing Basics

Classical Bits vs. Qubits

Aspect

Classical Bit

Qubit

State

Either 0 or 1

Simultaneously 0 and 1 (superposition)

Two bits

Represent one of four states (00,01,10,11) at a time

Represent all four states at once

With nnn qubits, the system can represent 2n2^n2n states simultaneously. For example:

  • 20 qubits → over 1 million states → 1 million parallel calculations

  • 300 qubits → more states than particles in the observable universe

The Measurement Catch

Despite its power, a quantum computer cannot simply "read" the superposition. When measured, the superposition collapses to a single random value, and all other information is lost.

Crucial limitation: To harness quantum parallelism, one must design algorithms that convert a superposition into one containing only the desired information — an extremely difficult task. For most applications, quantum computers offer no advantage.


Quantum Fourier Transform and Periodicity

In 1994, Peter Shor and Don Coppersmith developed the quantum Fourier transform (QFT). It works like a classical Fourier transform: applied to a periodic signal, it returns the frequencies present.

Why is this useful for factoring? If a superposition of states is periodic (terms separated by a regular amount), applying the QFT leaves states containing the frequency of that period — information that can be measured.

Key insight: The QFT extracts frequency information from a periodic superposition, enabling efficient period-finding — the core of Shor's algorithm.


Shor's Algorithm: Factoring with a Quantum Computer

Shor's algorithm factors a number N=p×qN = p \times qN=p×q (product of two primes) into ppp and qqq using four steps. The first three steps are classical; only step 2 benefits from quantum speedup.

Step 1: Pick a "bad guess" ggg

Choose an integer ggg that does not share any factors with NNN (i.e., gcd⁡(g,N)=1\gcd(g, N) = 1gcd(g,N)=1). With large primes, randomly picking a number that shares factors is extremely unlikely.

Step 2: Find the period rrr

There exists some exponent rrr such that:

gr≡1(modN)g^r \equiv 1 \pmod{N}gr≡1(modN)

This means grg^rgr is exactly one more than a multiple of NNN. The smallest positive rrr is the period.

Step 3: Construct two candidates

If rrr is even, rewrite the congruence:

gr−1≡0(modN)  ⟹  (gr/2−1)(gr/2+1)≡0(modN)g^r - 1 \equiv 0 \pmod{N} \implies (g^{r/2} - 1)(g^{r/2} + 1) \equiv 0 \pmod{N}gr−1≡0(modN)⟹(gr/2−1)(gr/2+1)≡0(modN)

Both (gr/2−1)(g^{r/2} - 1)(gr/2−1) and (gr/2+1)(g^{r/2} + 1)(gr/2+1) likely share factors with NNN.

Step 4: Use Euclid's algorithm

Compute the greatest common divisor (GCD) of each candidate with NNN to reveal the prime factors.

Euclid's algorithm:

  • Divide the larger number by the smaller, record the remainder.

  • Shift one position left and repeat.

  • When remainder is zero, the divisor is the GCD.

Example: Factoring N=77N = 77N=77 with g=8g = 8g=8

  1. Compute remainders of 8amod  778^a \mod 778amod77:

    • 81mod  77=88^1 \mod 77 = 881mod77=8

    • 82mod  77=648^2 \mod 77 = 6482mod77=64

    • 83mod  77=508^3 \mod 77 = 5083mod77=50

    • ... continue until 810mod  77=18^{10} \mod 77 = 1810mod77=1.

    • So r=10r = 10r=10.

  2. Since rrr is even, compute 85−1=32,7678^{5} - 1 = 32,76785−1=32,767 and 85+1=32,7698^{5} + 1 = 32,76985+1=32,769.

  3. Apply Euclid's algorithm:

    • gcd⁡(32,769,77)\gcd(32,769, 77)gcd(32,769,77): 32,769÷7732,769 \div 7732,769÷77 remainder 44; 77÷4477 \div 4477÷44 remainder 33; 44÷3344 \div 3344÷33 remainder 11; 33÷1133 \div 1133÷11 remainder 0 → GCD = 11.

    • The other factor: 77÷11=777 \div 11 = 777÷11=7.

Thus, factors are 11 and 7.

The Quantum Speedup: Finding rrr

On a classical computer, finding rrr is no faster than other factoring methods. The quantum computer accelerates this by leveraging periodicity in remainders.

Observing the cycle:

  • For g=8g = 8g=8, N=77N = 77N=77, the remainders repeat every 10 steps: 8,64,50,15,43,36,57,71,29,1,8,64,…8, 64, 50, 15, 43, 36, 57, 71, 29, 1, 8, 64, \dots8,64,50,15,43,36,57,71,29,1,8,64,….

  • The remainder 1 appears at exponents 10, 20, 30, ... — multiples of r=10r = 10r=10.

  • Any remainder (e.g., 15) also repeats with spacing rrr.

Quantum Implementation (Simplified)

  1. Prepare two sets of qubits:

    • First set: a superposition of all numbers from 0 to 10123410^{1234}101234 (requires ~4100 perfect qubits).

    • Second set: initialized to zero.

  2. Perform the operation: compute g(first set)mod  Ng^{\text{(first set)}} \mod Ng(first set)modN and store the remainder in the second set. This entangles the two registers.

  3. Measure only the second register (remainder). The measurement yields a random remainder value, but the first register now holds a periodic superposition of exponents that produce that same remainder, spaced by rrr.

  4. Apply the quantum Fourier transform to the first register. This converts the periodic spacing into information about the frequency 1/r1/r1/r (or equivalently rrr). Measurement of the frequency yields rrr (with some probability).

  5. If rrr is even and the candidates are not multiples of NNN, use Euclid's algorithm to find the factors.

Qubit Requirements: Progress Over Time

Year

Estimated Physical Qubits Needed

2012

1 billion

2017

230 million

2019

20 million

Current state (IBM's quantum computers): Still far below 20 million, but progress appears exponential. The question is when, not if, the curves will cross.


Post-Quantum Cryptography

Scientists have long anticipated this threat. NIST (National Institute of Standards and Technology) launched a competition in 2016 to find new encryption algorithms resistant to both classical and quantum attacks.

  • 82 proposals submitted from cryptographers worldwide.

  • Rigorous testing; some were broken.

  • July 5, 2022: NIST selected four algorithms for standardization.

  • Three of these are based on lattice-based cryptography.

Lattice-Based Cryptography: The Closest Vector Problem

What is a Lattice?

In nnn-dimensional space, a lattice is the set of all integer combinations of a set of basis vectors. For example, in 2D:

L={av1+bv2∣a,b∈Z}L = \{ a\mathbf{v}_1 + b\mathbf{v}_2 \mid a, b \in \mathbb{Z} \}L={av1​+bv2​∣a,b∈Z}

The Closest Vector Problem (CVP)

Given a lattice (defined by its basis vectors) and a target point CCC, find the lattice point closest to CCC.

Easiness depends on the basis:

  • A good basis (short, nearly orthogonal vectors): easy to solve.

  • A bad basis (long, skewed vectors): extremely hard to solve.

2D Example

  • Good basis r1,r2\mathbf{r}_1, \mathbf{r}_2r1​,r2​: point CCC can be reached with a small combination (e.g., 2r2−2r12\mathbf{r}_2 - 2\mathbf{r}_12r2​−2r1​).

  • Bad basis b1,b2\mathbf{b}_1, \mathbf{b}_2b1​,b2​: same lattice but steps in one direction cause large offsets in the other. To reach the same closest point requires 8b1−6b28\mathbf{b}_1 - 6\mathbf{b}_28b1​−6b2​ — much harder to find.

Scaling to High Dimensions

  • In 2D: number of lattice points within radius rrr is proportional to r2r^2r2.

  • In 3D: proportional to r3r^3r3.

  • As dimension increases, the number of candidate points grows exponentially.

Practical post-quantum schemes use around 1000 dimensions. Every step toward the target in one dimension can misalign you in the other 999. This makes CVP intractable for both classical and quantum computers — unless you know a good basis.

How Lattice Encryption Works

  1. Key generation:

    • Generate a lattice and a good basis (private key).

    • Compute a bad basis of the same lattice (public key).

  2. Encryption:

    • Map the message to a lattice point (e.g., point representing "7").

    • Add random noise to produce a ciphertext point close to that lattice point.

  3. Decryption:

    • Recipient uses the good basis to efficiently find the closest lattice point.

    • Remove noise to recover the original message.

Security: Without the good basis, finding the closest lattice point in 1000 dimensions is computationally infeasible for any known attack, quantum or classical.


Conclusion

The transition to post-quantum cryptography is already underway. A dedicated community of researchers, mathematicians, and cryptographers is working to ensure that secret data remains secure even after quantum computers become powerful enough to break RSA and other current systems. By moving to lattice-based and other quantum-resistant methods, society can protect against mass surveillance, safeguard critical infrastructure, and preserve the privacy that modern encryption has provided for over 40 years.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent