Crypto++ 8.7
Free C++ class library of cryptographic schemes
elgamal.cpp
1// elgamal.cpp - originally written and placed in the public domain by Wei Dai
2
3#include "pch.h"
4#include "elgamal.h"
5#include "asn.h"
6#include "nbtheory.h"
7
8// Squash MS LNK4221 and libtool warnings
9extern const char ELGAMAL_FNAME[] = __FILE__;
10
11NAMESPACE_BEGIN(CryptoPP)
12
13#if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
14void ElGamal_TestInstantiations()
15{
16 ElGamalEncryptor test1(1, 1, 1);
17 ElGamalDecryptor test2(NullRNG(), 123);
18 ElGamalEncryptor test3(test2);
19}
20#endif
21
22NAMESPACE_END
Classes and functions for working with ANS.1 objects.
Template implementing constructors for public key algorithm classes.
Definition: pubkey.h:2198
CRYPTOPP_DLL RandomNumberGenerator & NullRNG()
Random Number Generator that does not produce random numbers.
Classes and functions for ElGamal key agreement and encryption schemes.
Crypto++ library namespace.
Classes and functions for number theoretic operations.
Precompiled header file.