34 namespace PrivateRecommendationsUtils {
42 paillierCryptoProvider(paillierCryptoProvider),
43 dgkCryptoProvider(dgkCryptoProvider),
44 dgkComparisonClient(std::make_shared<
DgkComparisonClient>(paillierCryptoProvider, dgkCryptoProvider)),
45 l(Utils::Config::GetInstance().GetParameter<size_t>(configurationPath +
".l")),
46 twoPowL(BigInteger(2).GetPow(static_cast<unsigned long>(l))) {
PaillierCiphertext Ciphertext
Provide public access to the T_Ciphertext type.
Implementation of the public-key DGK Cryptosystem.
const Paillier & paillierCryptoProvider
Reference to the Paillier crypto provider.
virtual BigInteger DecryptInteger(const Ciphertext &ciphertext) const
Decrypt number.
virtual T_Ciphertext EncryptInteger(const BigInteger &plaintext) const
Encrypt an integer and apply randomization.
Paillier::Ciphertext ComputeZDivTwoPowL(const Paillier::Ciphertext &z) const
Computes .
void SetServer(const std::shared_ptr< SecureComparisonServer > &secureComparisonServer)
Setter for this->secureComparisonServer.
std::shared_ptr< const SecureComparisonServer > secureComparisonServer
A reference to the SecureComparisonServer.
Definition of class SecureComparisonServer.
const std::shared_ptr< DgkComparisonClient > dgkComparisonClient
A reference to the DgkComparisonClient.
Implementation of the public-key Paillier Cryptosystem.
Definition of class SecureComparisonClient.
SecureComparisonClient(const Paillier &paillierCryptoProvider, const Dgk &dgkCryptoProvider, const std::string &configurationPath)
Constructor.
void DebugPaillierEncryption(const Paillier::Ciphertext &input) const
Decrypts and prints a Paillier encrypted integer.
const std::shared_ptr< DgkComparisonClient > & GetDgkComparisonClient() const
Getter for this->dgkComparisonClient.