Loading [MathJax]/extensions/tex2jax.js
SeComLib
All Classes Namespaces Files Functions Variables Typedefs Enumerations Macros Pages
secure_face_recognition_utils/dgk_comparison_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 DGK_COMPARISON_SERVER_HEADER_GUARD
30 #define DGK_COMPARISON_SERVER_HEADER_GUARD
31 
32 //include our headers
33 #include "utils/config.h"
34 #include "core/big_integer.h"
35 #include "core/random_provider.h"
36 #include "core/paillier.h"
37 #include "core/dgk.h"
39 
42 
43 //include C++ headers
44 #include <deque>
45 
46 namespace SeComLib {
47 using namespace Core;
48 
49 namespace SecureFaceRecognitionUtils {
50  //forward-declare required classes
51  class DgkComparisonClient;
52 
57  public:
59  DgkComparisonServer (const Paillier &paillierCryptoProvider, const Dgk &dgkCryptoProvider, const std::string &configurationPath);
60 
63 
65  Paillier::Ciphertext ComputeLambda (const std::deque<long> &hatRBits, const BigInteger &s);
66 
68  void SetClient (const std::shared_ptr<DgkComparisonClient> & dgkComparisonClient);
69 
70  private:
73 
76 
79 
81  std::weak_ptr<const DgkComparisonClient> dgkComparisonClient;
82 
84  size_t l;
85 
88 
91 
94 
96  DgkComparisonServer operator= (DgkComparisonServer const &);
97  };
98 }//namespace SecureFaceRecognitionUtils
99 }//namespace SeComLib
100 
101 #endif//DGK_COMPARISON_SERVER_HEADER_GUARD
Implementation of the public-key DGK Cryptosystem.
Definition: dgk.h:104
Definition of class Dgk.
Definition of class SecurePermutation.
Defines BigInteger.
Definition of struct DgkComparisonBlindingFactorContainer.
Definition of class Config.
std::weak_ptr< const DgkComparisonClient > dgkComparisonClient
A reference to the DgkComparisonClient.
const Paillier & paillierCryptoProvider
Reference to the Paillier crypto provider.
DgkComparisonBlindingFactorContainer< Dgk, DgkComparisonBlindingFactorCacheParameters > BlindingFactorContainer
Alias for the blinding factor container.
RandomizerCache< BlindingFactorContainer > blindingFactorCache
Blinding factor cache instance.
Implementation of the public-key Paillier Cryptosystem.
Definition: paillier.h:103
Defines RandomProvider.
Definition of class Paillier.
Definition of struct DgkComparisonBlindingFactorCacheParameters.