Brace for Quantum: NIST Releases Post-Quantum Encryption Standards​

National Institute of Standards and Technology paves the way to a post-quantum (computing) world.

The three standards are:

ML-KEM (originally CRYSTALS-Kyber)

ML-DSA (originally CRYSTALS-Dilithium)

SLH-DSA (originally SPHINCS+)

This marks as a first real step towards protecting encrypted data from the upcoming possible threats of quantum computers. I know overall this sounds alarmist, like most news lately, but honestly, I do understand the rush and panic of the fact that a lot of existing encryption algorithms are currently vulnerable against a quantum computer.

Inherent Vulnerability To Quantum Attacks

Even without a deep understanding of the underlying mathematics, I can point out however that some widely-used encryption algorithms like AES and SHA are expected to remain relatively secure against quantum attacks, while others like RSA and the popular Curve25519 are not.

RSA is primarily used for secure web browsing (HTTPS), SSH connections, email encryption, VPNs, digital certificates, and software licensing.

Curve25519, on the other hand, is commonly found in messaging apps (Signal, WhatsApp), VPN protocols, secure boot, and cryptocurrencies.

RSA And Shor’s Algorithm

In my opinion, one of the most important cryptographic algorithms that has been widely used in encryption schemes, is the RSA (Rivest–Shamir–Adleman) algorithm. The algorithm is still remarkable to this day: you pick two large prime numbers and multiply them to get a public key that anyone can use to encrypt messages. However, only someone with the knowledge of the original primes (the private key) can decrypt these messages.

RSA’s security relies on the difficulty of factoring large numbers into their prime components. And this makes is fundamentally vulnerable to quantum computing attacks because of Shor’s algorithm, a quantum computing technique that directly undermines the RSA foundation by offering an efficient method for factorization.

Let’s Attempt To Break RSA

So we can imagine a secure messaging app that uses RSA for the encryption key exchange that happens between users. Further on, we intercepted the message containing an RSA-encrypted key. Now, to decrypt the message, the attacker needs to factor the large modulus ‘N’ used in the RSA encryption.

Classical: Simulating RSA Key Generation and Shor’s Attack (Conceptual)

Explanation:
Even without a deep understanding of the math, a basic grasp of the code reveals why classical computers still struggle to break RSA:

  • Exponential complexity.
  • Key Size. Computers can do maths fast, but astronomically large numbers that are still hard to compute. Just imagine doing 600 decimal digit long calculations.
  • No known efficient algorithm that can somehow solve the memory issues.

Overall key point is the size of qubits stored in memory. Factoring a 2048-bit RSA is required estimated 4 milion qubits. Each additional qubits, as we know doubles the memory required to represent the quantum state. There are many more issues such as Gate Operations, but in short, simulating a large ammount of qubits is impossible for now in classical computers, and even the most powerful supercomputer will deplete it’s memory in a matter of seconds when working with these calculations.

To estimate how long it would take to break a 2048-bit RSA key, we must first assume we can harness a supercomputer’s processing power, while ensuring its memory isn’t exhausted in the process. Even then, we’re looking at decryption times ranging from years to decades. However, stacking assumptions upon assumptions rarely leads to accurate predictions.

Quantum: RSA, Shor’s Attack (with Qiskit Simulation)

Note: Actual implementations of Shor’s algorithm and quantum period finding on real quantum hardware would be much more complex.

RSA’s Quantum Achilles’ Heel

Shor’s algorithm uses the Quantum Fourier Transform. Think of QFT as a high-performance function in your code library. You can feed it quantum data (like a list of qubits), and it returns the most prominent frequencies or patterns hidden within that data. Quantum computers can leverage superposition by allowing qubits to exist in multiple states simultaneously. Shor’s algorithm uses this to evaluate multiple potential factors of the large number at the same time.

Kind of like looking for a book in a astronomical library, in classical computing you search for one book at a time, while quantum approach allow you to scan all the books simultaneously.

In Conclusion

The National Institute of Standards and Technology’s release is a necesary wake up call, in the face of a possible quantum computing revolution. The potential breakthroughs of this new tech are unimaginable, but the prospect of breaking current encryption algorithms, is something that can rightfully keep people up at night.

News Source: https://www.schneier.com/blog/archives/2024/08/nist-releases-first-post-quantum-encryption-algorithms.html
Photo Source: https://www.flickr.com/photos/feuilllu/46753932291