Crypto++ 7.0 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
9 extern const char ELGAMAL_FNAME[] = __FILE__;
10
11 NAMESPACE_BEGIN(CryptoPP)
12
13 #if defined(CRYPTOPP_DEBUG) && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
14 void ElGamal_TestInstantiations()
15 {
16 ElGamalEncryptor test1(1, 1, 1);
17 ElGamalDecryptor test2(NullRNG(), 123);
18 ElGamalEncryptor test3(test2);
19 }
20 #endif
21
22 NAMESPACE_END
elgamal.h
Classes and functions for ElGamal key agreement and encryption schemes.
pch.h
Precompiled header file.
NullRNG
RandomNumberGenerator & NullRNG()
Random Number Generator that does not produce random numbers.
Definition: cryptlib.cpp:400
asn.h
Classes and functions for working with ANS.1 objects.
nbtheory.h
Classes and functions for number theoretic operations.
CryptoPP
Crypto++ library namespace.
PK_FinalTemplate
Template implementing constructors for public key algorithm classes.
Definition: pubkey.h:2134