This repository contains a Jupyter Notebook implementing:
- ElGamal Cryptosystem: Key generation, encryption, and decryption.
- Prime Number Computations: Finding large prime numbers using the Sieve of Eratosthenes.
Each section includes detailed explanations and Python implementations to support theoretical concepts with concrete examples.
elgamal.ipynb: Implementation of the ElGamal cryptosystem.number_theory.ipynb: Analysis of cyclic groups and even-order elements.prime_numbers.ipynb: Prime number computations with the Sieve of Eratosthenes.README.md: This documentation file.
Ensure you have Python and Jupyter Notebook installed:
pip install jupyter numpy sympy- Clone the repository:
git clone https://github.com/chrishounwnu/rsa_Elgmal_ecosystem_Pohlig_Hellman_Cryptography.git- Navigate to the project directory:
cd rsa_Elgmal_ecosystem_Pohlig_Hellman_Cryptography- Start Jupyter Notebook:
jupyter notebook- Open the relevant
.ipynbfile and run the cells.
- Generates a large prime
pof at least 700 digits. - Computes private and public keys.
- Encrypts and decrypts messages.
- Uses Python for number generation and modular arithmetic.
- Finds the
(5000000 + n)-th prime using the Sieve of Eratosthenes. - Counts prime numbers between
2^25and2^26. - Uses an optimized approach for large-scale prime computations.
- ElGamal Encryption & Decryption:
- Public Key:
(g, p, pk) - Private Key:
sk - Ciphertext:
(c1, c2) - Decrypted Message:
Original text
- Public Key:
- Number Theory:
- Number of even-order elements for different
p, nvalues.
- Number of even-order elements for different
- Prime Computations:
5000000 + n-th prime found.- Prime count in the given range.
This project is open-source under the MIT License.
Christophe HOUNWANOU - GitHub Profile