29 #ifndef SERVICE_PROVIDER_HEADER_GUARD
30 #define SERVICE_PROVIDER_HEADER_GUARD
55 using namespace PrivateRecommendationsUtils;
58 #define FIRST_USER_ONLY
60 namespace PrivateRecommendations {
62 class PrivacyServiceProvider;
82 void GenerateDummyDatabase ();
85 void ComputeSimilarityValues ();
88 void ComputeUserRecommendations ();
94 const EncryptedUserData &GetEncryptedURSum (
size_t userId)
const;
97 void SetPrivacyServiceProvider (
const std::shared_ptr<const PrivacyServiceProvider> &privacyServiceProvider);
100 const std::shared_ptr<SecureComparisonServer> &GetSecureComparisonServer ()
const;
103 const std::shared_ptr<SecureMultiplicationServer<Paillier>> &GetSecureMultiplicationServer ()
const;
169 #endif//SERVICE_PROVIDER_HEADER_GUARD
PaillierCiphertext Ciphertext
Provide public access to the T_Ciphertext type.
Implementation of the public-key DGK Cryptosystem.
size_t ratingBitSize
The size of the user ratings (in bits)
std::string ratingsFilePath
The path to the file containing precomputed ratings.
size_t denselyRatedItemCount
Number of densely rated items.
std::deque< Paillier::Ciphertext > EncryptedUserData
Encrypted user data.
size_t itemCount
Number of ratings per user.
Definition of class Config.
The public key container structure for the Dgk cryptosystem.
BigInteger similarityTreshold
- Scaled public threshold value for the similarity values
EncryptedUserData LValues
Vector of values, where L is the number of users similar to a given user.
Paillier paillierCryptoProvider
Paillier crypto provider.
EncryptedUserDataContainer sparseRatings
static const std::string configurationPath
Service Provider configuration path.
EncryptedUserDataContainer normalizedScaledRatings
unsigned int digitsToPreserve
Number of digits preserved from the normalized user ratings.
~ServiceProvider()
Destructor - void implementation.
Definition of template class SecureMultiplicationServer.
size_t userCount
Number of users who need recommendations.
Dgk dgkCryptoProvider
DGK crypto provider.
EncryptedUserDataContainer URSumContainer
Contains the vectors for each user.
Definition of class DateTime.
Definition of class SecureComparisonServer.
Implementation of the public-key Paillier Cryptosystem.
std::shared_ptr< SecureMultiplicationServer< Paillier > > secureMultiplicationServer
A reference to the SecureMultiplicationServer.
Definition of class CpuTimer.
const std::shared_ptr< SecureComparisonServer > secureComparisonServer
A reference to the SecureComparisonServer.
Definition of class Paillier.
EncryptedUserData gammaValues
The public key container structure for the Paillier cryptosystem.
std::deque< EncryptedUserData > EncryptedUserDataContainer
Container for encrypted user data.
std::weak_ptr< const PrivacyServiceProvider > privacyServiceProvider
A reference to the PrivacyServiceProvider.