Welcome to the repository for the ElGamal cryptosystem implementations. This project contains implementations of the standard ElGamal cryptosystem, the exponential ElGamal cryptosystem, and their elliptic curve-based variants in C++. These implementations are designed for cryptographic research and educational purposes, providing a solid foundation for understanding and working with the ElGamal cryptosystem in both prime fields and elliptic curve settings.
- Standard ElGamal Cryptosystem: A basic implementation of the ElGamal encryption scheme over a prime field, providing secure encryption and decryption functions.
- Exponential ElGamal Cryptosystem: An advanced variant of ElGamal that supports homomorphic properties, useful for performing operations on encrypted data without needing to decrypt it first.
- Elliptic Curve-based ElGamal Cryptosystem: Implementations of both the standard and exponential ElGamal schemes utilizing elliptic curve cryptography (ECC), offering stronger security with smaller key sizes.
- C++ Implementation: All cryptographic schemes are implemented in C++ with a focus on efficiency and clarity, making the codebase suitable for both study and practical use.
Working on it.
- A C++ compiler supporting C++17 or later.
- OpenSSL library (for handling cryptographic operations).
To build the project, use the following commands:
git clone https://github.com/yourusername/ElGamalCryptosystem.git
cd ElGamalCryptosystem
make
You can run the provided test cases to verify the implementations:
./tests/run_tests
Each implementation comes with a set of examples demonstrating how to use the cryptosystems. For detailed instructions, please refer to the comments within each source file.
Contributions are welcome! Feel free to open issues or submit pull requests to improve the implementations or add new features.
This project is licensed under the MIT License - see the LICENSE file for details.