Cryptography is the study of methods and techniques for developing and using coded algorithms to protect information and ensure secure communication, so that it can only be accessed by authorized parties possessing the appropriate decryption key or mechanism. In other words, cryptography protects communication by preventing unauthorized access to information.
| Feature | Symmetric Cryptography | Asymmetric Cryptography |
|---|---|---|
| Principle | The same secret key is used for encryption and decryption |
A public key is used for encryption and a private key for decryption |
| Examples |
AES (Advanced Encryption Standard) DES (Data Encryption Standard) OTP (One-Time Pad) |
RSA (Rivest–Shamir–Adleman) ECC (Elliptic Curve Cryptography) DH (Diffie–Hellman Key Exchange) |
| Illustration |
Image generated with AI assistance
|
Image generated with AI assistance
|
| Advantages | Fast and efficient for large amounts of data | Enables secure key exchange and digital signatures |
| Limitations | Requires the secure distribution of a shared secret key over an insecure channel - the key distribution problem |
Computationally more expensive than symmetric methods; Quantum computers may break widely used cryptosystems; for example, Shor's algorithm can efficiently factor large integers, threatening RSA and related cryptosystems. |
The OTP is an encryption method that can provide perfect secrecy when used correctly. Its security relies on three fundamental rules:
The One-Time Pad principle can be implemented using different representations of characters. For example, characters may be represented by their ASCII codes or by binary values, in which case encryption is performed using the XOR operation.
The table below illustrates the OTP principle using ASCII codes. Each character of the message and the key is first converted into its numerical ASCII representation. Encryption is then performed using modular arithmetic on these numerical values.
| Position | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Message | H | E | L | O | O |
| ASCII Code of Message | 72 | 69 | 76 | 79 | 79 |
| Key | k | E | y | 1 | 9 |
| ASCII Code of Key | 107 | 69 | 121 | 49 | 57 |
| Ciphertext ASCII Code: \((m[i] + k[i]) \bmod 256 \) | 179 | 138 | 197 | 128 | 136 |
| Decryption | |||||
| Ciphertext Character | ³ | Š | Å | € | ˆ |
| Recovered Plaintext: \((c[i] - k[i]) \bmod 256 \) | H | E | L | O | O |
In this exercise, the OTP is implemented using a custom alphabet of length \(N\), leading to the following general formulas:
Choose Your Role:
RSA was introduced in 1978 by Ronald Rivest, Adi Shamir, and Leonard Adleman. It uses a public key for encryption and a private key for decryption. Its security relies on the difficulty of factoring the large number \(n = pq\).
Encryption: \( C \equiv M^{e} \pmod n \)
Decryption: \( M \equiv C^{d} \pmod n \)
where \(M\) is the plaintext, \(C\) the ciphertext, \((e,n)\) the public key, and \((d,n)\) the private key. The exponents \(e\) and \(d\) are chosen such that \[ e\,d \equiv 1 \pmod{\varphi(n)}. \] This relationship ensures that a message encrypted with the public key exponent \(e\) can be recovered using the private key exponent \(d\).
Generate RSA Key Pair:
Encryption: enter the message to be encrypted and the RSA public key in the format \(e,n\)
Decryption: enter the ciphertext as comma-separated integers and the RSA private key in the format \(d,n\)
| Category | Protocols |
|---|---|
| Prepare-and-Measure | BB84, B92, DPS-QKD, SARG04, COW |
| Entanglement-Based | E91, BBM92 |
| Enhanced Practical Security | MDI-QKD, Twin-Field QKD |
Among the quantum key distribution protocols introduced above, we will use BB84 as an example to illustrate the fundamental principles of quantum cryptography. First proposed by Charles Bennett and Gilles Brassard in 1984, the BB84 protocol enables two parties to establish a shared secret key whose security relies on the fundamental laws of quantum mechanics.
|
Goal Establish a shared secret key while detecting eavesdropping Quantum Resource Polarization states of single photons encoded in two measurement bases Principle Measuring an unknown quantum state disturbs it, introducing detectable errors Advantages • Detects eavesdropping • Security based on quantum mechanics • Solves the key distribution problem Limitations • Requires specialized quantum hardware • Limited communication distance • Generates secret keys rather than encrypting messages directly |
Image generated with AI assistance
|
After the BB84 protocol has established a shared secret key, the key can be used with a symmetric encryption algorithm such as AES or the One-Time Pad to protect confidential information.
We start by preparing the quantum register according to the classical message, encoding classical bits into qubits:
composed of two randomly selected gates:
THE PROJECT IS SUPPORTED BY