A C++ implementation of prime number generation, RSA, and Rabin cryptosystems, цшер encryption/decryption and signing/verifying functions. This project is built using CMake and includes automated tests that communicate with a remote server for verification.
-
Prime Number Generation
- Generate large prime numbers using probabilistic tests
- Primality checking (Miller-Rabin implementation)
-
RSA and Rabin cryptosystem
- Key pair generation
- Message encryption/decryption
- Message signing and verification
Also note, that the RSA cryptosystem does not use padding, but Rabin does.
- C++17 compiler or higher
- CMake 3.14 or higher
- Boost 1.86.0 or higher
- Clone the repository:
git clone https://github.com/gerau/asymmetric_cryptosystems.git
cd asymmetric_cryptosystems- Build using CMake:
mkdir build
cd build
cmake .. && makeAfter building library, you can run tests:
.\tests\rsa_tests
.\tests\rabin_testsThis tests using httplib to communicate with remote server via API.
Also you can run:
.\tests\prime_test [bits]to generate primes of any length or by default - 256 bit prime.