SeComLib
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
SeComLib::SecureFaceRecognition::Server Class Reference

Server. More...

#include <server.h>

Public Member Functions

 Server (const PaillierPublicKey &paillierPublicKey, const DgkPublicKey &dgkPublicKey)
 Constructor. More...
 
 ~Server ()
 Destructor - void implementation.
 
Paillier::Ciphertext SecureComparison (const Paillier::Ciphertext &a, const Paillier::Ciphertext &b) const
 Computes the relation between the inputs. More...
 
void SetClient (const std::shared_ptr< const Client > &client)
 Sets a reference to the Privacy Service Provider. More...
 
const std::shared_ptr
< SecureComparisonServer > & 
GetSecureComparisonServer () const
 Getter for this->secureComparisonServer. More...
 

Private Member Functions

 Server (Server const &)
 Copy constructor - not implemented.
 
Server operator= (Server const &)
 Copy assignment operator - not implemented.
 

Private Attributes

std::weak_ptr< const Clientclient
 A reference to the Client.
 
Paillier paillierCryptoProvider
 Paillier crypto provider.
 
Dgk dgkCryptoProvider
 DGK crypto provider.
 
const std::shared_ptr
< SecureComparisonServer
secureComparisonServer
 A reference to the SecureComparisonServer.
 

Static Private Attributes

static const std::string configurationPath
 Service Provider configuration path. More...
 

Detailed Description

Server.

Definition at line 51 of file secure_face_recognition/server.h.

Constructor & Destructor Documentation

SeComLib::SecureFaceRecognition::Server::Server ( const PaillierPublicKey paillierPublicKey,
const DgkPublicKey dgkPublicKey 
)

Constructor.

Parameters
paillierPublicKeyThe Paillier public key
dgkPublicKeyThe DGK public key

Definition at line 45 of file secure_face_recognition/server.cpp.

Member Function Documentation

const std::shared_ptr< SecureComparisonServer > & SeComLib::SecureFaceRecognition::Server::GetSecureComparisonServer ( ) const

Getter for this->secureComparisonServer.

Returns
The SecureComparisonServer instance.

Definition at line 80 of file secure_face_recognition/server.cpp.

Paillier::Ciphertext SeComLib::SecureFaceRecognition::Server::SecureComparison ( const Paillier::Ciphertext a,
const Paillier::Ciphertext b 
) const

Computes the relation between the inputs.

Parameters
aPaillier encryption
bPaillier encryption
Returns
\( a < b ? [0] : [1] \)

To determine the minimum value, the server can compute \( [min] = [a + z_l (b - a)] = [a] ([y] \times ([b] [a]^{-1})) \) using an interactive protocol for the secure multiplication. Since this operation is rather expensive and the client already has the value \( d = 2^l + a - b + r \), the server can blind \( [y] \) with \( \eta \in_R \{0, 1\} \): if \( \eta = 1 \Rightarrow [\tilde{y}] = [1] [y]^{-1} \) else \( [\tilde{y}] = [y] \) and send it to the client. The client can decrypt \( [\tilde{y}] \) and compute \( [y d] \), which gets sent back to the server. The server now computes \( [\tilde{min}] = [b + y d - (r + 2^l) y] = [b] [yd] [y]^{-(r + 2^l)} \). If \( \eta = 1 \Rightarrow [min] = [\tilde{min}] \) else \( [min] = [a + b - \tilde{min}] = [a] [b] [\tilde{min}]^{-1} \)

Definition at line 56 of file secure_face_recognition/server.cpp.

void SeComLib::SecureFaceRecognition::Server::SetClient ( const std::shared_ptr< const Client > &  client)

Sets a reference to the Privacy Service Provider.

Parameters
clienta Client instance

Definition at line 72 of file secure_face_recognition/server.cpp.

Member Data Documentation

const std::string SeComLib::SecureFaceRecognition::Server::configurationPath
staticprivate

Service Provider configuration path.

Set the configuration path.

Definition at line 82 of file secure_face_recognition/server.h.


The documentation for this class was generated from the following files: