KeyGenerator::ElGamal¶
#include <ElGamalKeyGenerator.hpp>
Public Classes¶
| Name | |
|---|---|
| struct | Params Prime and generator parameter struct. |
| struct | PublicKey |
| struct | PrivateKey |
Public Functions¶
| Name | |
|---|---|
| cpp_int | DecryptDataAdditive(const CypherTextType & encrypted_data) |
| ElGamal() | |
| ElGamal(const Params & params, cpp_int private_key_value) | |
| ElGamal(const Params & params) | |
| ElGamal(cpp_int private_key_value) | |
| ~ElGamal() | |
| PublicKey & | GetPublicKey() const |
| PrivateKey & | GetPrivateKey() const |
| cpp_int | DecryptData(const PrivateKey & prvkey, const CypherTextType & encrypted_data) |
| std::vector< uint8_t > | DecryptData(const PrivateKey & prvkey, const CypherTextType & encrypted_data) |
| Params | CreateGeneratorParams() Create prime number and generator. |
| CypherTextType | EncryptData(PublicKey & pubkey, std::vector< uint8_t > & data_vector) |
| CypherTextType | EncryptData(PublicKey & pubkey, const cpp_int & data) |
| CypherTextType | EncryptDataAdditive(PublicKey & pubkey, const cpp_int & data) |
| template <typename T > T |
DecryptData(const PrivateKey & prvkey, const CypherTextType & encrypted_data) |
| cpp_int | DecryptDataAdditive(const PrivateKey & prvkey, const CypherTextType & encrypted_data, PrimeNumbers::BabyStepGiantStep & bsgs) |
Public Attributes¶
| Name | |
|---|---|
| uint256_t | SAFE_PRIME |
| uint256_t | GENERATOR |
Public Functions Documentation¶
function DecryptDataAdditive¶
function ElGamal¶
function ElGamal¶
function ElGamal¶
function ElGamal¶
function ~ElGamal¶
function GetPublicKey¶
function GetPrivateKey¶
function DecryptData¶
function DecryptData¶
std::vector< uint8_t > DecryptData(
const PrivateKey & prvkey,
const CypherTextType & encrypted_data
)
function CreateGeneratorParams¶
Create prime number and generator.
Return: A new set of prime number and generator GeneratorParamsType
function EncryptData¶
function EncryptData¶
function EncryptDataAdditive¶
function DecryptData¶
template <typename T >
static T DecryptData(
const PrivateKey & prvkey,
const CypherTextType & encrypted_data
)
function DecryptDataAdditive¶
static cpp_int DecryptDataAdditive(
const PrivateKey & prvkey,
const CypherTextType & encrypted_data,
PrimeNumbers::BabyStepGiantStep & bsgs
)
Public Attributes Documentation¶
variable SAFE_PRIME¶
static uint256_t SAFE_PRIME = 0xf3760a5583d3509b3f72b16e3c892129fef350406f88c268f503e877e043514f_cppui256;
variable GENERATOR¶
static uint256_t GENERATOR = 0x1a2c6b6fb9971c4a993069c76258ee18ba80f778fd4d7bc07186c70e73b93004_cppui256;
Updated on 2026-03-04 at 13:10:43 -0800