Quantum computing with cybersecurity
In classical computing, it uses bits such as 0 and 1 to store information; however, in quantum computing, it brings in the concept of quantum physics, using qubits instead of bits, which allows computers to calculate and deal with larger numbers of information.
In classical computing, we use bits such 0 and 1, but in quantum computing we use qubits instead. N qubits in quantum computing can exist as a superposition of the 2^N possible states. So the number of operations required to arrive at the same result is exponentially small.
A simple explanation and example: 2 qubits in qc can exist in 4 different states in classcial computing:
2 qubits in QC result in 4 different states in classical computing:
- | - |
---|---|
0 | 1 |
1 | 0 |
0 | 1 |
1 | 1 |
Because of this specialty, it poses a great harm to current cubersecurity, for it has the potential to find factors way faster than classical computing since encryption nowadays are mostly relied on factoriztion of big prime numbers.
It's not a replacement of classical computers. It doesn't give us any particular improvement if we're just watching videos, browsing websites, etc.
Imagine two individuals, Alice and Bob, who want to communicate securely using RSA encryption. They each have their own pair of keys: a public key (for encryption) and a private key (for decryption).
Key Generation:
Alice:
Bob:
Encryption:
Decryption:
Now, Bob has successfully decrypted the message, and the original message M = 42 is revealed.
In this simplified example, we used very small numbers for the sake of clarity. In real-world applications, the numbers involved in RSA encryption are much larger to provide strong security. The security of RSA relies on the difficulty of factoring large numbers into their prime factors.
Idea: Encrypt different plaintexts using different prime numbers through RSA algorithm, but the prime numbers will keep being added up. Then, I'll decrypt the encrypted messages with both classical and quantum computing, and then compare the time duration of decryption between them. For the quantum computing, I'll use the Qiskit in order to program on quantum computer, using pycharm for the classical. I'm assuming that the classical computing can no longer decrypt after a certain prime number, which proves the threat of quantum computing and the vulnerability of classical ones.
Variables: plaintexts, prime numbers
ββββ1. Change in prime numbers
ββββ
ββββ2. Change in plaintexts
Source code: