SeComLib
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Macros Pages
secure_face_recognition/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 SERVER_HEADER_GUARD
30 #define SERVER_HEADER_GUARD
31 
32 //include our headers
33 #include "utils/config.h"
34 #include "core/big_integer.h"
35 #include "core/paillier.h"
36 #include "core/dgk.h"
37 
39 
40 namespace SeComLib {
41 using namespace Core;
42 using namespace SecureFaceRecognitionUtils;
43 
44 namespace SecureFaceRecognition {
45  //forward-declare required classes
46  class Client;
47 
51  class Server {
52  public:
54  Server (const PaillierPublicKey &paillierPublicKey, const DgkPublicKey &dgkPublicKey);
55 
57  ~Server () {}
58 
60  Paillier::Ciphertext SecureComparison (const Paillier::Ciphertext &a, const Paillier::Ciphertext &b) const;
61 
63  void SetClient (const std::shared_ptr<const Client> &client);
64 
66  const std::shared_ptr<SecureComparisonServer> &GetSecureComparisonServer () const;
67 
68  private:
70  std::weak_ptr<const Client> client;
71 
74 
77 
79  const std::shared_ptr<SecureComparisonServer> secureComparisonServer;
80 
82  static const std::string configurationPath;
83 
85  Server (Server const &);
86 
88  Server operator= (Server const &);
89  };
90 }//namespace SecureFaceRecognition
91 }//namespace SeComLib
92 
93 #endif//SERVER_HEADER_GUARD
Definition of class SecureComparisonServer.
Implementation of the public-key DGK Cryptosystem.
Definition: dgk.h:104
Definition of class Dgk.
std::weak_ptr< const Client > client
A reference to the Client.
Defines BigInteger.
Definition of class Config.
The public key container structure for the Dgk cryptosystem.
Definition: dgk.h:47
Implementation of the public-key Paillier Cryptosystem.
Definition: paillier.h:103
static const std::string configurationPath
Service Provider configuration path.
Paillier paillierCryptoProvider
Paillier crypto provider.
Definition of class Paillier.
const std::shared_ptr< SecureComparisonServer > secureComparisonServer
A reference to the SecureComparisonServer.
The public key container structure for the Paillier cryptosystem.
Definition: paillier.h:49