SeComLib
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Macros Pages
secure_multiplication_server.h
Go to the documentation of this file.
1 /*
2 SeComLib
3 Copyright 2012-2013 TU Delft, Information Security & Privacy Lab (http://isplab.tudelft.nl/)
4 
5 Contributors:
6 Inald Lagendijk (R.L.Lagendijk@TUDelft.nl)
7 Mihai Todor (todormihai@gmail.com)
8 Thijs Veugen (P.J.M.Veugen@tudelft.nl)
9 Zekeriya Erkin (z.erkin@tudelft.nl)
10 
11 Licensed under the Apache License, Version 2.0 (the "License");
12 you may not use this file except in compliance with the License.
13 You may obtain a copy of the License at
14 
15 http://www.apache.org/licenses/LICENSE-2.0
16 
17 Unless required by applicable law or agreed to in writing, software
18 distributed under the License is distributed on an "AS IS" BASIS,
19 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 See the License for the specific language governing permissions and
21 limitations under the License.
22 */
29 #ifndef SECURE_MULTIPLICATION_SERVER_HEADER_GUARD
30 #define SECURE_MULTIPLICATION_SERVER_HEADER_GUARD
31 
32 //include our headers
33 #include "utils/config.h"
34 #include "big_integer.h"
35 #include "random_provider.h"
36 #include "randomizer_cache.h"
40 
41 namespace SeComLib {
42 namespace Core {
43  //forward-declare required classes
44  template <typename T_CryptoProvider>
45  class SecureMultiplicationClient;
46 
51  template <typename T_CryptoProvider>
52  class SecureMultiplicationServer {
53  public:
55  SecureMultiplicationServer (const T_CryptoProvider &cryptoProvider, const size_t l, const std::string &configurationPath);
56 
59 
61  typename T_CryptoProvider::Ciphertext Multiply (const typename T_CryptoProvider::Ciphertext &lhs, const typename T_CryptoProvider::Ciphertext &rhs);
62 
65 
66  private:
69 
71  const T_CryptoProvider &cryptoProvider;
72 
75 
77  std::weak_ptr<const SecureMultiplicationClient<T_CryptoProvider>> secureMultiplicationClient;
78 
81 
84  };
85 }//namespace Core
86 }//namespace SeComLib
87 
88 //Separate the implementation from the declaration of template methods
90 
91 #endif//SECURE_MULTIPLICATION_SERVER_HEADER_GUARD
~SecureMultiplicationServer()
Destructor - void implementation.
Definition of template class RandomizerCache.
Defines BigInteger.
const T_CryptoProvider & cryptoProvider
Reference to the crypto provider.
Definition of struct BlindingFactorCacheParameters.
Implementation of template members from class SecureMultiplicationServer. To be included in secure_mu...
Definition of class Config.
T_CryptoProvider::Ciphertext Multiply(const typename T_CryptoProvider::Ciphertext &lhs, const typename T_CryptoProvider::Ciphertext &rhs)
Interactive secure multiplication.
SecureMultiplicationServer operator=(SecureMultiplicationServer const &)
Copy assignment operator - not implemented.
Definition of template class SecureMultiplicationClient.
Definition of struct SecureMultiplicationBlindingFactorContainer.
RandomizerCache< BlindingFactorContainer > blindingFactorCache
Blinding factor cache instance.
Defines RandomProvider.
SecureMultiplicationServer(const T_CryptoProvider &cryptoProvider, const size_t l, const std::string &configurationPath)
Constructor.
std::weak_ptr< const SecureMultiplicationClient< T_CryptoProvider > > secureMultiplicationClient
A reference to the SecureMultiplicationClient.
void SetClient(const std::shared_ptr< SecureMultiplicationClient< T_CryptoProvider >> &secureMultiplicationClient)
Setter for this->secureMultiplicationClient.
SecureMultiplicationBlindingFactorContainer< T_CryptoProvider, BlindingFactorCacheParameters > BlindingFactorContainer
Alias for the blinding factor container.