This Python program simulates a mediated semi-quantum key distribution protocol. In this protocol, Alice and Bob use quantum operations to establish a secure communication channel with the help of a third party (TP).
The protocol consists of the following steps:
- Initialization
- Random Operations
- Checking the Ratio of Operations
- SIFT Operations
- Discarding and Replacing Qubits
- Sending Updated Sequences
- Bell Measurements
- Checking for Eavesdropping and TP's Honesty
- Error Rate Threshold
- Revealing SIFT Operations
- Creating Raw Key
- Obtaining Bob's Key
To use the program, follow these steps:
- Install Python on your system if not already installed.
- Download or clone the repository containing the code.
- Run the
QuantumProtocol
class with the desired number of qubits.
Example usage:
# Instantiate the QuantumProtocol class
num_qubits = 10 # Adjust the number of qubits as needed
protocol = QuantumProtocol(num_qubits)
num_qubits: The number of qubits to be used in the protocol.
Python 3.x
This code is a simulation and should not be used for actual secure communication purposes without proper validation and security considerations.