#include <client.h>
Public Member Functions | |
Client (const std::shared_ptr< ServiceProvider > &serviceProvider, const std::shared_ptr< PrivacyServiceProvider > &privacyServiceProvider, const PaillierPublicKey &publicKey) | |
Constructor. More... | |
~Client () | |
Destructor - void implementation. | |
void | ComputeRecommendations () |
Interact with the server(s) to extract the recommendations for every user. More... | |
Private Types | |
typedef DecryptionBlindingFactorContainer < Paillier, BlindingFactorCacheParameters > | BlindingFactorContainer |
Alias for the blinding factor container. | |
Private Member Functions | |
Client (Client const &) | |
Copy constructor - not implemented. | |
Client | operator= (Client const &) |
Copy assignment operator - not implemented. | |
Private Attributes | |
const std::shared_ptr < ServiceProvider > | serviceProvider |
A reference to the ServiceProvider. | |
const std::shared_ptr < PrivacyServiceProvider > | privacyServiceProvider |
A reference to the PrivacyServiceProvider. | |
Paillier | paillierCryptoProvider |
Paillier crypto provider. | |
RandomizerCache < BlindingFactorContainer > | blindingFactorCache |
Blinding factor cache instance. | |
size_t | userCount |
Number of users who need recommendations. | |
Static Private Attributes | |
static const std::string | configurationPath |
Service Provider configuration path. More... | |
Definition at line 60 of file private_recommendations/client.h.
SeComLib::PrivateRecommendations::Client::Client | ( | const std::shared_ptr< ServiceProvider > & | serviceProvider, |
const std::shared_ptr< PrivacyServiceProvider > & | privacyServiceProvider, | ||
const PaillierPublicKey & | publicKey | ||
) |
Constructor.
Assumes that the client has a secure channel to the PrivacyServiceProvider.
serviceProvider | a ServiceProvider instance |
privacyServiceProvider | a PrivacyServiceProvider instance |
publicKey | the Paillier public key of the PrivacyServiceProvider |
Definition at line 46 of file private_recommendations/client.cpp.
void SeComLib::PrivateRecommendations::Client::ComputeRecommendations | ( | ) |
Interact with the server(s) to extract the recommendations for every user.
Fetches encrypted values from the Service Provider, blinds them and sends them to the Privacy Service Provider for decryption.
Fetch \( [L] \) and \( [UR_{sum}] \) from the Service Provider
\( L = Dec([L][r]) - r \)
\( UR_{sum}^i = Dec([UR_{sum}^i][r]) - r \)
Definition at line 57 of file private_recommendations/client.cpp.
|
staticprivate |
Service Provider configuration path.
Set the configuration path.
Definition at line 89 of file private_recommendations/client.h.