29 #ifndef SERVICE_PROVIDER_HEADER_GUARD
30 #define SERVICE_PROVIDER_HEADER_GUARD
50 using namespace PrivateRecommendationsUtils;
53 #define FIRST_USER_ONLY
55 namespace PrivateRecommendationsDataPacking {
57 class PrivacyServiceProvider;
86 void GenerateDummyDatabase (
const EncryptedUserDataContainer &normalizedScaledRatings);
89 void ComputeSimilarityValues (
const EncryptedUserDataContainer &normalizedScaledRatings);
92 void ComputeUserRecommendations (
const PackedItems &sparseRatings);
98 const PackedData &GetEncryptedURSum (
const size_t userId)
const;
101 const PackedData ComputeURSum (
const size_t userId,
const PackedData &userPackedSparseRatings)
const;
106 void SetPrivacyServiceProvider (
const std::shared_ptr<const PrivacyServiceProvider> &privacyServiceProvider);
109 size_t GetBucketSize ()
const;
112 size_t GetMaxPackedBuckets ()
const;
115 const std::shared_ptr<SecureComparisonServer> &GetSecureComparisonServer ()
const;
118 const std::shared_ptr<SecureMultiplicationServer<Paillier>> &GetSecureMultiplicationServer ()
const;
190 #endif//SERVICE_PROVIDER_HEADER_GUARD
PaillierCiphertext Ciphertext
Provide public access to the T_Ciphertext type.
Implementation of the public-key DGK Cryptosystem.
Definition of class SecureComparisonServer.
std::deque< BigInteger > emptyBuckets
Empty buckets .
std::deque< EncryptedUserData > EncryptedUserDataContainer
Container for encrypted user data.
std::deque< Paillier::Ciphertext > EncryptedUserData
Encrypted user data.
size_t bucketSize
The size of the data buckets (in bits)
EncryptedUserData LValues
Vector of values, where L is the number of users similar to a given user.
Definition of class Config.
The public key container structure for the Dgk cryptosystem.
std::weak_ptr< const PrivacyServiceProvider > privacyServiceProvider
A reference to the PrivacyServiceProvider.
size_t userCount
Number of users who need recommendations.
Dgk dgkCryptoProvider
DGK crypto provider.
PackedItems URSumContainer
Contains the vectors for each user.
PackedItemContainer packedNormalizedScaledRatings
, where ,
Definition of template class SecureMultiplicationServer.
std::deque< PackedData > PackedItems
Packed items.
Implementation of the public-key Paillier Cryptosystem.
Definition of class CpuTimer.
std::shared_ptr< SecureComparisonServer > secureComparisonServer
A reference to the SecureComparisonServer.
size_t scaledNormalizedRatingBitSize
k - The size of the scaled normalized ratings (in bits) (should be l / 2?)
~ServiceProvider()
Destructor - void implementation.
size_t kappa
The security parameter for the secure comparison protocol (in bits)
size_t itemCount
Number of ratings per user.
std::deque< Paillier::Ciphertext > PackedData
Packed data.
BigInteger similarityTreshold
- Scaled public threshold value for the similarity values
EncryptedUserDataContainer gamma
- the encrypted gamma values for every user (the upper triangle of the matrix, excluding the diagona...
Definition of class Paillier.
std::deque< PackedItems > PackedItemContainer
Container for packed items.
static const std::string configurationPath
Service Provider configuration path.
size_t denselyRatedItemCount
Number of densely rated items.
size_t maxPackedBuckets
The maximum number of buckets that fit in one encryption.
std::shared_ptr< SecureMultiplicationServer< Paillier > > secureMultiplicationServer
A reference to the SecureMultiplicationServer.
unsigned int digitsToPreserve
Number of digits preserved from the normalized user ratings.
Paillier paillierCryptoProvider
Paillier crypto provider.
The public key container structure for the Paillier cryptosystem.