0% found this document useful (0 votes)
3 views

QC ACET NOTES - V

The document discusses quantum cryptography, focusing on classical cryptography concepts, private key cryptography, Shor's factoring algorithm, and quantum key distribution (QKD). It explains the limitations of classical methods against quantum attacks and introduces QKD protocols like BB84 and Ekart 91, which ensure secure key sharing using quantum mechanics. The document highlights the significance of Shor's algorithm in breaking classical encryption methods and the security guarantees provided by quantum principles.

Uploaded by

22cs032
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

QC ACET NOTES - V

The document discusses quantum cryptography, focusing on classical cryptography concepts, private key cryptography, Shor's factoring algorithm, and quantum key distribution (QKD). It explains the limitations of classical methods against quantum attacks and introduces QKD protocols like BB84 and Ekart 91, which ensure secure key sharing using quantum mechanics. The document highlights the significance of Shor's algorithm in breaking classical encryption methods and the security guarantees provided by quantum principles.

Uploaded by

22cs032
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

UNIT V

QUANTUM CRYPTOGRAPHY

Classical cryptography basic concepts - Private key cryptography - Shor’s


Factoring Algorithm -Quantum Key Distribution - BB84 - Ekart 91

INTRODUCTION
Quantum cryptography is a ground-breaking application of quantum information. While
quantum computers can break classical public-key cryptosystems, quantum mechanics
also provides a secure solution: quantum key distribution (QKD). This technique enables
the provably secure sharing of private information.

5.1 CLASSICAL CRYPTOGRAPHY BASIC CONCEPTS


• Cryptography is the practice of securing information by transforming it into an
unreadable format.
• Classical cryptography refers to traditional encryption techniques used before
modern digital encryption methods.
• It includes substitution ciphers, transposition ciphers, and early cryptographic
principles used for secure communication.

Basic Principles of Classical Cryptography


Classical cryptography operates on the following fundamental principles:
(a) Confidentiality
• Ensures that only authorized parties can access the information.
• Achieved through encryption techniques that transform plaintext into ciphertext.

(b) Integrity
• Ensures that data is not altered during transmission.
• Classical cryptographic techniques like checksums and hash functions help verify
data integrity.

(c) Authentication
• Verifies the identity of communicating parties.
• Some classical methods used shared secret keys to confirm the sender’s legitimacy.

(d) Non-Repudiation
• Prevents a sender from denying their actions.
• While classical cryptography had limited support for this, digital signatures in
modern cryptography fulfil this function.

Types of Classical Cryptographic Techniques


(a) Substitution Ciphers
• Each letter in plaintext is replaced with another letter or symbol.

1
ACET / AI&DS / 2024 – 2025 / III Yr. / VI Sem. / QC Notes
• Example: Caesar Cipher – shifts letters by a fixed number (e.g., shifting A to D, B to
E, etc.).
• Vigenère Cipher – uses a keyword to apply multiple shifts, making it harder to crack.

(b) Transposition Ciphers


• Rearranges the letters of plaintext according to a specific pattern.
• Example: Rail Fence Cipher, where letters are written in a zigzag pattern and then
read row by row.

(c) Polyalphabetic Ciphers


• Uses multiple substitution alphabets to make decryption more difficult.
• Example: Playfair Cipher, which replaces letter pairs instead of single letters.

(d) One-Time Pad (OTP)


• A theoretically unbreakable cipher where plaintext is XORed with a random key of
the same length.
• However, OTP is impractical due to key distribution challenges.

Classical Cryptanalysis (Breaking Classical Ciphers)


• While classical ciphers provided security, many could be broken using:
o Frequency Analysis: Identifies commonly used letters in the ciphertext and
matches them to known frequency distributions in a language.
o Brute Force Attacks: Tries all possible key combinations.
o Known-Plaintext Attacks: Uses a known sample of plaintext and its
corresponding ciphertext to determine the key.

Limitations of Classical Cryptography


o Vulnerable to Modern Computing Power – Classical ciphers can be cracked
quickly using computers.
o Key Distribution Problem – Securely sharing the secret key between sender and
receiver was a major challenge.
o Lack of Scalability – Classical cryptography was not suited for large-scale secure
communications.
o No Protection Against Quantum Attacks – Classical cryptography is ineffective
against quantum algorithms like Shor’s algorithm.

Transition to Modern Cryptography


Due to these limitations, cryptographic techniques evolved to include:
o Public Key Cryptography (RSA, ECC)
o Symmetric Key Cryptography (AES, DES)
o Hash Functions (SHA, MD5)
These modern methods provide stronger security than classical techniques.

5.2 PRIVATE KEY CRYPTOGRAPHY


o Before public key cryptography was invented in the 1970s, all cryptographic
systems used private key cryptography.

2
ACET / AI&DS / 2024 – 2025 / III Yr. / VI Sem. / QC Notes
o In this method, both the sender (Alice) and the receiver (Bob) share a secret key that
is used for both encryption and decryption.
o One of the most secure private key systems is the Vernam cipher (One-Time Pad).

Vernam Cipher: Working


o Alice and Bob start with identical secret key strings of length n.
o Alice encrypts her message by combining it with the key.
o Bob decrypts it by reversing the encryption process.

Security: If the key remains completely secret, this system is provably secure—meaning
no eavesdropper (Eve) can decrypt the message without the key. However, Eve could
disrupt communication (jamming), but Alice and Bob would detect this.

Example:

Comparison with Public Key Cryptography: Private key systems are secure by nature,
whereas public key cryptography (e.g., RSA) relies on the assumed difficulty of
mathematical problems like factoring.

Challenges:
o Key Distribution – The secret key must be securely shared before communication.
o Key Length – The key must be at least as long as the message, making it impractical
for large-scale use.
o One-Time Use – Keys cannot be reused, or security is compromised.
o Storage & Disposal – Keys must be protected before use and destroyed afterward
to prevent unauthorized copying.

Despite these challenges, private key cryptography remains in use today for highly
sensitive communications, where secure key distribution is possible through trusted
couriers, secret meetings, or secure communication links.

3
ACET / AI&DS / 2024 – 2025 / III Yr. / VI Sem. / QC Notes
5.3 SHOR’S FACTORING ALGORITHM
• Shor’s Factorization Algorithm is proposed by Peter Shor.
• It suggests that quantum mechanics allows the factorization to be performed in
polynomial time, rather than exponential time achieved after using classical
algorithms.
• This could have a drastic impact on the field of data security, a concept based on
the prime factorization of large numbers.
• Many polynomial-time algorithms for integer multiplication (e.g., Euclid’s
Algorithm) do exist, but no polynomial-time algorithm for factorization exists.
• So, Shor came up with an algorithm i.e. Shor’s Factorization Algorithm, an
algorithm for factorizing non-prime integers N of L bits.
• Quantum algorithms are far much better than classical algorithms because they
are based on Quantum Fourier Transform.
• Run time on the classical computer is O[exp (L1/3(log L)2/3)] but that on the
quantum computer is O(L3).
• So, Shor’s Algorithm in principle, shows that a quantum computer is capable of
factoring very large numbers in polynomial time.
• Shor’s Algorithm depends on:
o Modular Arithmetic
o Quantum Parallelism
o Quantum Fourier Transformation

Shor’s Algorithm definition:


• Given an odd composite number N, find an integer d, strictly between 1 and N,
that divides N.
• Shor’s Algorithm consists of the following two parts:
o Conversion of the problem of factorizing to the problem of finding the period.
This part can be implemented with classical means.
o Finding the period or Quantum period finding using the Quantum Fourier
Transform, and is responsible for quantum speedup, and utilizes quantum
parallelism.

In Shor’s Algorithm, the Input is Non-prime number N and the Output is Non-trivial
factor of N
INPUT (N) → SHOR’S ALGORITHM → OUTPUT (Non-trivial factor of N)

Steps of Shor’s Algorithm


1. Choose a random number a.
a. Pick a random integer a such that 1<a<N.
b. Compute gcd(a,N) (greatest common divisor).
c. If gcd(a,N)≠1, then gcd(a,N) is a factor of N, and we are done.
d. Otherwise, proceed to the next step.
2. Find the order r of a modulo N.
a. The order r is the smallest positive integer such that: ar≡1mod N.
b. This step is performed efficiently using Quantum Phase Estimation (QPE) on
a quantum computer.
3. Check if r is even.

4
ACET / AI&DS / 2024 – 2025 / III Yr. / VI Sem. / QC Notes
a. If r is odd, go back to Step 1 and choose another a.
b. If r is even, proceed.
4. Compute possible factors.
a. Compute: gcd(ar/2−1,N) and gcd(ar/2+1,N)
b. If either of these values is a nontrivial factor of N, we have successfully
factorized N.
5. Factorizing RSA Modulus & Breaking Encryption
• RSA encryption relies on the difficulty of factoring N=p×q. Once Shor’s
algorithm finds p and q:
o The private key d is computed from the totient function:
ϕ(N)=(p−1)(q−1)
• The decryption key is:d=e−1 modϕ(N). This allows an attacker to decrypt RSA-
encrypted messages.

Example: Factoring 𝑁=15


We will use Shor’s algorithm to factorize 15.

Step 1: Choose a random a.


• Let’s pick a=7.
• Compute gcd(7,15)
• gcd(7,15) = 1, so we continue.

Step 2: Find the order r


• We need to find the smallest r such that:
• 7𝑟 ≡ 1 mod 15
• Compute powers of 7 modulo 15:

• So, r=4.

Step 4: Compute factors


• Compute: gcd(ar/2−1,N) and gcd(ar/2+1,N)

The factors found are 3 and 5, which correctly factorize 15. Thus, 15=3×5 is factored,
breaking RSA.

Applications of Shor’s Algorithm:


• Breaking RSA Encryption – Efficiently factorizes large numbers, breaking RSA
security.

5
ACET / AI&DS / 2024 – 2025 / III Yr. / VI Sem. / QC Notes
• Breaking Elliptic Curve Cryptography (ECC) – Compromises ECC-based security
in blockchain and messaging apps.
• Cracking Diffie-Hellman Key Exchange – Weakens secure key exchanges used in
VPNs and encrypted communications.
• Post-Quantum Cryptography Research – Drives the development of quantum-
resistant encryption methods.
• Benchmarking Quantum Computers – Used to test and evaluate quantum
processor performance.
• Quantum Key Distribution (QKD) – Encourages secure quantum communication
techniques.

5.4 QUANTUM KEY DISTRIBUTION


• Quantum Key Distribution (QKD) is a cryptographic method that enables two parties
to securely share a secret key using the principles of quantum mechanics.
• Unlike classical encryption, QKD ensures unconditional security based on quantum
principles like superposition and entanglement.

Definition:

• Quantum Key Distribution (QKD) is a secure method for creating private key bits
between two parties (Alice and Bob) over a public channel.
• These key bits can then be used for encrypted communication.
• Unlike traditional encryption methods, QKD’s security is based on the fundamental
laws of quantum mechanics rather than computational complexity.

QKD is secure:
• A key principle of quantum mechanics ensures that any attempt by an eavesdropper
(Eve) to intercept quantum information will disturb the transmitted qubits, making
eavesdropping detectable.
• This security is based on:

6
ACET / AI&DS / 2024 – 2025 / III Yr. / VI Sem. / QC Notes
o The No-Cloning Theorem – Eve cannot make a perfect copy of an unknown
quantum state.
o Information Gain Causes Disturbance – Any measurement on non-
orthogonal quantum states introduces errors, alerting Alice and Bob to Eve’s
presence.

QKD – Working:
• Alice sends qubits encoded in non-orthogonal quantum states to Bob.
• Bob measures these qubits using randomly chosen bases.
• Alice and Bob compare a subset of their results over a public channel to detect
eavesdropping.
• If too many errors are found, they discard the key and restart.
• If errors are within an acceptable limit, they apply information reconciliation
and privacy amplification to generate a secure final key.

5.4.1 BB84
• BB84 is a Quantum Key Distribution (QKD) protocol that allows two parties, Alice
and Bob, to share a secure cryptographic key over an insecure quantum channel.
• Its security is guaranteed by the fundamental principles of quantum mechanics,
making it immune to eavesdropping.

Step-by-Step Process:
Step 1. Alice Prepares Qubits:
• Alice generates two random classical bit strings, a and b, each of length (4 + δ)n.
• She encodes these bits into qubits using one of four quantum states:

• |ψ00⟩ = |0⟩
• |ψ10⟩ = |1⟩
• |ψ01⟩ = |+⟩ = (|0⟩ + |1⟩)/√2
• |ψ11⟩ = |−⟩ = (|0⟩ − |1⟩)/√2

• The bit a determines whether the qubit is 0 or 1, while b decides the measurement
basis (Z-basis (|0⟩, |1⟩) or X-basis (|+⟩, |−⟩)).
• Since these four states are not all mutually orthogonal, an eavesdropper (Eve)
cannot measure them perfectly without introducing errors.

Step 2: Alice Sends Qubits to Bob


• Alice transmits the qubits to Bob through a public quantum communication
channel.
• The transmission may be affected by noise or eavesdropping (Eve).
7
ACET / AI&DS / 2024 – 2025 / III Yr. / VI Sem. / QC Notes
Step 3: Bob Measures the Qubits
• Bob randomly chooses a basis (X or Z) for each qubit, just like Alice did.
• He then measures each qubit accordingly.
• Since Bob does not yet know Alice’s basis choices, some of his measurements may
be incorrect.

Step 4: Public Discussion & Key Sifting


• Bob publicly announces that he received the qubits (but not their measurement
results).
• Alice then reveals the bases (b) she used for encoding.
• Bob compares his measurement basis with Alice’s encoding basis:
• If they match, the measured bit is kept.
• If they mismatch, the bit is discarded.
• After this step, Alice and Bob are left with a shorter, but identical string of bits—
this forms the raw key.

Security Check (Eavesdropping Detection)


• Alice randomly selects a subset of bits from the raw key and publicly compares them
with Bob’s measurements.
• If too many bits are incorrect, it indicates the presence of Eve (an eavesdropper).
• If the error rate is too high, they abort and restart the process.

Key Refinement
• If the error rate is within acceptable limits, Alice and Bob apply:
• Information Reconciliation – Corrects errors in the key.
• Privacy Amplification – Reduces Eve’s knowledge of the key by shortening it.

Outcome
• Alice and Bob now share a secret key that can be used for secure communication.
The key is provably secure because:

o Any eavesdropping introduces detectable errors.


o The laws of quantum mechanics prevent Eve from perfectly copying or
measuring the qubits without disturbance.

5.4.2 EKART 91
• The E91 protocol, proposed by Artur Ekert in 1991, is a quantum key distribution
(QKD) method that uses entangled pairs of photons to generate a secret key for
secure communication, leveraging Bell's theorem to detect eavesdropping attempts.

8
ACET / AI&DS / 2024 – 2025 / III Yr. / VI Sem. / QC Notes
Quantum Entanglement:
• The E91 protocol relies on the principle of quantum entanglement, where two
particles become linked in such a way that they share the same fate, regardless of
the distance separating them.

Entangled Photon Pairs:


• A source emits pairs of entangled photons, sending one photon to Alice and the
other to Bob.

Random Basis Measurement:


• Alice and Bob each randomly choose a measurement basis (e.g., horizontal/vertical
polarization or diagonal/anti-diagonal) to measure the polarization of their
respective photons.

Classical Communication:
• After measuring their photons, Alice and Bob publicly communicate their
measurement bases using a classical channel (e.g., internet).

Key Sifting:
• They compare their measurement results and discard the pairs where they used
different measurement bases, keeping only the pairs where they used the same
basis.

Eavesdropping Detection:
• If an eavesdropper (Eve) attempts to intercept and measure the entangled photons,
it will disrupt the entanglement and cause a violation of Bell's inequalities, alerting
Alice and Bob to the presence of an eavesdropper.

Key Refinement:
• If no eavesdropping is detected, Alice and Bob can use the remaining pairs to
generate a shared secret key through error correction and privacy amplification.

9
ACET / AI&DS / 2024 – 2025 / III Yr. / VI Sem. / QC Notes

You might also like