SeComLib
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Macros Pages
secure_multiplication_client.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_CLIENT_HEADER_GUARD
30 #define SECURE_MULTIPLICATION_CLIENT_HEADER_GUARD
31 
32 //include our headers
33 #include "utils/config.h"
34 #include "big_integer.h"
35 #include "random_provider.h"
37 
38 namespace SeComLib {
39 namespace Core {
40  //forward-declare required classes
41  template <typename T_CryptoProvider>
43 
48  template <typename T_CryptoProvider>
50  public:
52  SecureMultiplicationClient (const T_CryptoProvider &cryptoProvider);
53 
56 
58  typename T_CryptoProvider::Ciphertext Multiply (const typename T_CryptoProvider::Ciphertext &lhs, const typename T_CryptoProvider::Ciphertext &rhs) const;
59 
62 
63  private:
65  const T_CryptoProvider &cryptoProvider;
66 
68  std::shared_ptr<const SecureMultiplicationServer<T_CryptoProvider>> secureMultiplicationServer;
69 
72 
75  };
76 }//namespace Core
77 }//namespace SeComLib
78 
79 //Separate the implementation from the declaration of template methods
81 
82 #endif//SECURE_MULTIPLICATION_CLIENT_HEADER_GUARD
T_CryptoProvider::Ciphertext Multiply(const typename T_CryptoProvider::Ciphertext &lhs, const typename T_CryptoProvider::Ciphertext &rhs) const
Computes the encrypted product.
SecureMultiplicationClient(const T_CryptoProvider &cryptoProvider)
Constructor.
const T_CryptoProvider & cryptoProvider
Reference to the crypto provider.
~SecureMultiplicationClient()
Destructor - void implementation.
Defines BigInteger.
Definition of class Config.
std::shared_ptr< const SecureMultiplicationServer< T_CryptoProvider > > secureMultiplicationServer
A reference to the SecureMultiplicationServer.
Definition of template class SecureMultiplicationServer.
Defines RandomProvider.
Implementation of template members from class SecureMultiplicationClient. To be included in secure_mu...
SecureMultiplicationClient operator=(SecureMultiplicationClient const &)
Copy assignment operator - not implemented.
void SetServer(const std::shared_ptr< SecureMultiplicationServer< T_CryptoProvider >> &secureMultiplicationServer)
Setter for this->secureMultiplicationServer.