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

Presentation-1

The presentation discusses quantum cryptography, which utilizes quantum mechanics to secure communication with theoretically unbreakable encryption. It outlines the process of photon transmission, measurement, key comparison, and finalization, while also addressing potential drawbacks and proposing the use of Decoy State Protocols to mitigate attacks. Implementation details include a code example demonstrating secure communication and error correction between two parties using quantum key distribution.

Uploaded by

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

Presentation-1

The presentation discusses quantum cryptography, which utilizes quantum mechanics to secure communication with theoretically unbreakable encryption. It outlines the process of photon transmission, measurement, key comparison, and finalization, while also addressing potential drawbacks and proposing the use of Decoy State Protocols to mitigate attacks. Implementation details include a code example demonstrating secure communication and error correction between two parties using quantum key distribution.

Uploaded by

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

Presentation on

QUANTUM CRYPTOGRAPHY

SACS M.A.V.M.M Engineering College


Department of Computer Science & Engineering

GROUP MEMBERS :
• Asha Choudhary H
• SivaSankari B
CRYPTOGRAPHY :
• Definition : The practice of securing information
through Encoding techniques .

• Purpose :Protects data Confidentiality, Integrity and


Authenticity.

• Types :Several types of cryptography like


symmetric, asymmetric, quantum Cryptography and
so on.
QUANTUM
CRYPTOGRAPHY
• Definition: Quantum cryptography uses quantum
mechanics principles to secure communication.

• Key Feature: Provides theoretically unbreakable


encryption due to quantum properties.

• Main Principle: Based on quantum superposition and


Heisenberg’s uncertainty principle.
PHOTON
STATE :
PHOTON
FILTERS :
QUANTUM
CRYPTOGRAPHY
QUANTUM
CRYPTOGRAPHY
QUANTUM
CRYPTOGRAPHY
How it
Works :
1. Photon Transmission

2. Measurement by Receiver

3. Key Comparison

4. Key Finalization
QUANTUM
CRYPTOGRAPHY
QUANTUM
CRYPTOGRAPHY
Drawbacks
:
• Photon Loss Problem

• Detector Side – Channel Attack

• Man-in-the-middle Attack

• Denial of Service Attack


Proposed
Work :
• To overcome Detector side-Channel Attack , will use
Decoy State Protocols.

• Effectiveness : Prevents Photon-number-splitting


Attacks used to steal information.
Decoy State
Protocol
• It’s an extension of original bb84 protocol

• Used to detect and defence against the evesdropping


attacks.

• Overcome by using fake photons.


Decoy State
Protocol :
Key components:

• Decoy state

• Decoy state plus

• Error correction
Implementation :
• Example : secure communication between two cities
using decoy state protocol.

• How it’s used :


1. The network relies on bb84 protocol along with
decoy state
to prevent PNS splitting.
2. Decoy state method ensures that a eve cannot
gain
information.
Implementation
CODE :
:
import numpy as np
import hashlib
import matplotlib.pyplot as plt
import time

key_length = 100
decoy_probability = 0.2
error_threshold = 0.1
repeater_count = 3
satellite_mode = True

alice_basis = np.random.randint(2, size=key_length)


bob_basis = np.random.randint(2, size=key_length)
alice_bits = np.random.randint(2, size=key_length)
decoy_states = np.random.choice([0, 1], size=key_length, p=[1-decoy_probability,
Implementation :
alice_photons = np.where(alice_basis == 0, alice_bits, np.logical_xor(alice_bits, 1))

def quantum_repeater_correction(bits, repeaters):


for _ in range(repeaters):
error_mask = np.random.choice([0, 1], size=len(bits), p=[0.95, 0.05])
bits = np.logical_xor(bits, error_mask)
return bits

if satellite_mode:
print(" Satellite QKD Enabled: Entangled photons are distributed globally.")
bob_basis = alice_basis
Implementation :
bob_measurements = quantum_repeater_correction( np.where(alice_basis ==
bob_basis, alice_photons, np.random.randint(2, size=key_length)),
repeater_count)

valid_indices = np.where(alice_basis == bob_basis)[0]


alice_key = alice_bits[valid_indices]
bob_key = bob_measurements[valid_indices]

decoy_indices = np.where(decoy_states[valid_indices] == 1)[0]


decoy_error_rate = np.mean(alice_key[decoy_indices] != bob_key[decoy_indices])
if len(decoy_indices) > 0 else 0
Implementation :
correction_indices = np.random.choice(len(alice_key), len(alice_key) // 2,
replace=False)
parity_bits = alice_key[correction_indices] ^ bob_key[correction_indices]
bob_key[correction_indices] = bob_key[correction_indices] ^ parity_bits

def hash_function(key):
key_str = ''.join(map(str, key))
hashed = hashlib.sha256(key_str.encode()).hexdigest()
return hashed[:16]
secure_final_key = hash_function(bob_key)
Implementation :
plt.figure(figsize=(10, 4))
plt.plot(alice_key[:50], 'bo-', label="Alice's Key")
plt.plot(bob_measurements[:50], 'rx-', label="Bob's Key (Before Correction)")
plt.plot(bob_key[:50], 'g*-', label="Bob's Key (After Correction)")
plt.xlabel("Bit Index")
plt.ylabel("Bit Value (0 or 1)")
plt.title("Quantum Key Transmission with Error Correction")
plt.legend()
plt.grid()
plt.show()
Implementation :
print("🔬 Simulating Photon Transmission...")

for i in range(10):
time.sleep(0.5)
print(f"📡 Transmitting photon {i+1}...", end="\r")

print("\n✅ Final Secure Key Generated!")


print(f"🔑 Secure Key (after privacy amplification): {secure_final_key}")
print(f"📉 Decoy State Error Rate: {decoy_error_rate:.2%}")

if decoy_error_rate > error_threshold:


print("⚠️Possible eavesdropping detected! Key discarded.")
else:
print("🔒 Secure QKD link established.")
OUTPUT :
OUTPUT :

🔬 Simulating Photon Transmission...


📡 Transmitting photon 10...
✅ Final Secure Key Generated!
🔑 Secure Key (after privacy amplification):
f3d91c8e7b2a45f6
📉 Decoy State Error Rate: 2.00%
🔒 Secure QKD link established.

You might also like