Read-only mirror of https://github.com/epfl-dlab/secvm-server — EPFL Data Science & AI Lab (dlab). Issues & pull requests at the source.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2020-08-17 00:24:19 +02:00
config adapt configs to current MySQL version 2020-08-16 23:22:36 +02:00
database add sample database data 2020-08-16 23:26:33 +02:00
src/com/cliqz/secvmserver fix typo in response package content type 2018-02-02 13:13:40 +01:00
.gitignore add experiment-configs to .gitignore 2020-08-16 23:28:34 +02:00
pom.xml adapt configs to current MySQL version 2020-08-16 23:22:36 +02:00
README.md make paper title link to paper 2020-08-17 00:24:19 +02:00

SecVM Server

This repository contains the server code for the online evaluation in Sec. 6 of the paper 'Privacy-Preserving Classification with Secret Vector Machines'.

The README in the respository with the client code contains more information on the project and on the implementation.

Setting up the backend

Database

  1. Install MySQL and set a root password.
  2. Create the database, fill it with sample data:
cd database
mysql -u root -p
source create-SecVM_DB.sql;
source fill-database.sql;
  1. Create the MySQL user and give them access to the database (stay inside the MySQL command prompt):
CREATE USER 'java'@'localhost' IDENTIFIED BY 'java';
GRANT ALL PRIVILEGES ON SecVM_DB . * TO 'java'@'localhost';

Java

  1. Install Java (at least version 8) and Maven.
  2. Compile the server:
mvn clean install
  1. Create the folder that contains the files that are later fetched by the clients:
mkdir experiment-configs

Running the server

In the production setting, we ran the main server behind NGINX and also served the files via NGINX. For testing purposes, one can do without NGINX.

  1. Start the main server:
java -Dsun.net.httpserver.maxReqTime=1 -Dsun.net.httpserver.maxRspTime=1 -Dsun.net.httpserver.idleInterval=1 -cp target/secvmserver-1.0-jar-with-dependencies.jar com.cliqz.secvmserver.Server 4
  1. Start the file server (requires Python):
cd SecVM-Server/experiment-configs
python -m SimpleHTTPServer
  1. Start Firefox with the Cliqz plugin that contains the SecVM module and log in at facebook.com.

  2. Check if packages arrive (new terminal):

mysql -u java -p
connect SecVM_DB;
select * from package_test;
select * from package_participation;
select * from package_train;
  1. Shut the server down: type stop, followed by enter.