34 namespace SecureFaceRecognitionUtils {
41 paillierCryptoProvider(paillierCryptoProvider),
42 dgkCryptoProvider(dgkCryptoProvider),
43 dgkComparisonServer(std::make_shared<
DgkComparisonServer>(paillierCryptoProvider, dgkCryptoProvider, configurationPath)),
44 l(Utils::Config::GetInstance().GetParameter<size_t>(configurationPath +
".l")),
45 twoPowL(BigInteger(2).GetPow(static_cast<unsigned long>(l))),
46 twoPowMinusLModN(BigInteger(2).GetPowModN(-(static_cast<long>(l)), paillierCryptoProvider.GetEncryptionModulus())),
47 encryptedTwoPowL(paillierCryptoProvider.EncryptInteger(twoPowL)),
87 BigInteger s = RandomProvider::GetInstance().GetRandomInteger(1);
PaillierCiphertext Ciphertext
Provide public access to the T_Ciphertext type.
Definition of class SecureComparisonServer.
Implementation of the public-key DGK Cryptosystem.
const Paillier & paillierCryptoProvider
Reference to the Paillier crypto provider.
RandomizerCache< BlindingFactorContainer > blindingFactorCache
Blinding factor cache instance.
Stores precomputed random data.
Paillier::Ciphertext encryptedTwoPowL
virtual Ciphertext RandomizeCiphertext(const Ciphertext &ciphertext) const
Randomize encrypted number with a self-generated random value.
SecureComparisonServer(const Paillier &paillierCryptoProvider, const Dgk &dgkCryptoProvider, const std::string &configurationPath)
Constructor.
Definition of class SecureComparisonClient.
Implementation of the public-key Paillier Cryptosystem.
const std::shared_ptr< DgkComparisonServer > dgkComparisonServer
A reference to the DgkComparisonServer.
Comparison blinding factor cache parameter container struct.
const std::shared_ptr< DgkComparisonServer > & GetDgkComparisonServer() const
Getter for this->dgkComparisonServer.
T_CryptoProvider::Ciphertext encryptedR
std::deque< long > hatRBits
The bits of .
Paillier::Ciphertext Compare(const Paillier::Ciphertext &a, const Paillier::Ciphertext &b)
Interactive secure comparison.
T_CryptoProvider::Ciphertext encryptedRModTwoPowL
BigInteger twoPowMinusLModN
std::weak_ptr< const SecureComparisonClient > secureComparisonClient
A reference to the SecureComparisonClient.
void SetClient(const std::shared_ptr< SecureComparisonClient > &secureComparisonClient)
Setter for this->secureComparisonClient.