User Tools

Site Tools


sql-derivative-sensitivity-analyser_install

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
sql-derivative-sensitivity-analyser_install [2019/09/29 16:53]
admin
sql-derivative-sensitivity-analyser_install [2019/12/07 16:03] (current)
alisa [Running the analysis]
Line 1: Line 1:
 ====== Installation guide ====== ====== Installation guide ======
  
-Sensitivity ​analyzers are implemented in Haskell, and require ​[[https://​www.haskell.org/​cabal|cabal]] installation as a prerequisite. The analyser ​should work at least with version 1.22.5.0.+The source code of SQL combined sensitivity analysis tools is available at [[https://​github.com/​pleak-tools/​pleak-sql-analysis|pleak-sql-analysis]]. 
 + 
 +Sensitivity ​analysis is implemented in Haskell, and requires ​[[https://​www.haskell.org/​cabal|cabal]] installation as a prerequisite. The analysis tools should work at least with version 1.22.5.0.
  
 ===== Local sensitivity part ===== ===== Local sensitivity part =====
  
-Building starts at ''​pleak-sql-analysis/​local-sensitivity-cabal''​. When building for the first time, a sandbox needs to be initilaized,​ and the dependencies installed ​my means of cabal.+Building starts at ''​pleak-sql-analysis/​local-sensitivity-cabal''​. When building for the first time, a sandbox needs to be initilaized,​ and the dependencies installed ​by means of cabal.
 <​code>​ <​code>​
 cabal sandbox init cabal sandbox init
Line 36: Line 38:
 Building starts at ''​pleak-sql-analysis/​banach''​. First, repeat the building procedure using ''​cabal'',​ exactly in the same way as it was done for local sensitivity part. Building starts at ''​pleak-sql-analysis/​banach''​. First, repeat the building procedure using ''​cabal'',​ exactly in the same way as it was done for local sensitivity part.
  
-[[https://​www.postgresql.org/​|PostgreSQL]] needs to run as a background process on the local machine. The analyser ​should work at least with version 9.5.13.+[[https://​www.postgresql.org/​|PostgreSQL]] needs to run as a background process on the local machine. The analyzer ​should work at least with version 9.5.13.
  
-After PostgreSQL has been installed, it is necessary to create a database named '​banach',​ assuming it will be used only by the sensitivity ​analyser. Permissions on '​banach'​ database need to be given to the user that runs the analyser. Here is an example of how to do it with Ubuntu system:+After PostgreSQL has been installed, it is necessary to create a database named '​banach',​ assuming it will be used only by the sensitivity ​analyzer. Permissions on '​banach'​ database need to be given to the user that runs the analyzer. Here is an example of how to do it with Ubuntu system:
  
 <​code>​ <​code>​
Line 75: Line 77:
 ===== Combined sensitivity ===== ===== Combined sensitivity =====
  
-While both local and derivative sensitivity ​analysers ​can be used independently,​ we can combine their results together, so that both types of distances can be defined for the tables. To enable such analysis, go to ''​pleak-sql-analysis/​banach''​ and give execution permission to the file ''​sqlsa-quiet''​ located there.+While both local and derivative sensitivity ​analyzers ​can be used independently,​ we can combine their results together, so that both types of distances can be defined for the tables. To enable such analysis, go to ''​pleak-sql-analysis/​banach''​ and give execution permission to the file ''​sqlsa-quiet''​ located there.
 <​code>​ <​code>​
 chmod a+x sqlsa-quiet chmod a+x sqlsa-quiet
 </​code>​ </​code>​
-The derivative sensitivity ​analyser ​will now be able to call the local sensitivity ​analyser.+The derivative sensitivity ​analyzer ​will now be able to call the local sensitivity ​analyzer.
  
 ===== Running the analysis ===== ===== Running the analysis =====
  
-We give some example runs of the analysers.+We give some example runs of the analyzers.
  
 === Derivative sensitivity analysis === === Derivative sensitivity analysis ===
  
 <​code>​ <​code>​
-dist/​build/​banach/​banach -QD --db-create-tables demo_schema.sql demo_query.sql ​demo_attacker.att --epsilon 1.0 --beta 0.1+dist/​build/​banach/​banach -QDs --db-create-tables demo_schema.sql demo_query.sql ​demo_constraints.att --epsilon 1.0 --beta 0.1
 </​code>​ </​code>​
 where where
   * ''​demo_schema.sql''​ contains the database schema   * ''​demo_schema.sql''​ contains the database schema
   * ''​demo_query.sql''​ contains the query   * ''​demo_query.sql''​ contains the query
-  * ''​default_attacker.att''​ (allowed to be an empty file) is the description of constraints on attributes+  * ''​demo_constraints.att''​ (allowed to be an empty file) is the description of constraints on table attributes 
 +  * ''​epsilon''​ is the desired level of differential privacy
   * each table T that is used by the query needs existence of two particular files:   * each table T that is used by the query needs existence of two particular files:
-    * ''​T.db''​ contains the table data, where the entries are delimited by whitespaces,​ and the first row contains corresponding attribute names +    * ''​T.db''​ contains the table data, where the entries are delimited by whitespaces,​ and the first row contains corresponding attribute names (which should be the same as defined in the schema) 
-    * ''​T.nrm''​ contains the table norm, defined using the syntax described in the [[sql-derivative-sensitivity-analyser|quick guide]].+    * ''​T.nrm''​ contains the table norm, defined using the syntax described in the [[sql-derivative-sensitivity-analyser_advanced|analyser advanced settings]].
  
 The parameters ''​epsilon''​ and ''​beta''​ are optional. The default ''​epsilon''​ value is 1, so it is actually reasonable for the user to choose it depending on privacy requirements. The default ''​beta''​ is chosen in such a way that it is adapted to epsilon, so it is not of great importance. The parameters ''​epsilon''​ and ''​beta''​ are optional. The default ''​epsilon''​ value is 1, so it is actually reasonable for the user to choose it depending on privacy requirements. The default ''​beta''​ is chosen in such a way that it is adapted to epsilon, so it is not of great importance.
Line 105: Line 108:
  
 <​code>​ <​code>​
-dist/​build/​banach/​banach -QDp --db-create-tables demo_schema.sql demo_query.sql ​demo_attacker.att --policy=demo_policy.plc --epsilon 0.3+dist/​build/​banach/​banach -QDsp --db-create-tables demo_schema.sql demo_query.sql ​demo_constraints.att --policy=demo_attacker_goal.sql --epsilon 0.3
 </​code>​ </​code>​
 where where
-  * ''​demo_policy.plc'' ​contains ​the attributes that the attacker ​tries to guess, and the corresponding ​precision +  * ''​demo_attacker_goal.sql'' ​is the query representing ​the attacker's goal, i.e. what he is trying ​to guess with which precision 
-  * ''​epsilon''​ is no longer the differential privacy parameter, but the desired bound on //guessing advantage//​.+  * ''​epsilon''​ is the desired bound on //guessing advantage//​.
  
 === Combined sensitivity analysis === === Combined sensitivity analysis ===
  
 <​code>​ <​code>​
-dist/​build/​banach/​banach -QDc --db-create-tables demo_schema.sql demo_query.sql ​demo_attacker.att --epsilon 1.0 --beta 0.1 --distance-G=1.0+dist/​build/​banach/​banach -QDsc --db-create-tables demo_schema.sql demo_query.sql ​demo_constraints.att --epsilon 1.0 --beta 0.1 --distance-G=1.0
 </​code>​ </​code>​
 where where
   * ''​--distance-G''​ is the default cost of row addition/​deletion,​ overloaded by individual G values given in the table norm ''​.nrm''​ files.   * ''​--distance-G''​ is the default cost of row addition/​deletion,​ overloaded by individual G values given in the table norm ''​.nrm''​ files.
 +
 +
 +=== More examples ===
 +
 +More examples can be found in the subdirectories of ''​pleak-sql-analysis/​banach/​lightweight-examples/'',​ where '​test.sh'​ scripts show how to run these examples.
sql-derivative-sensitivity-analyser_install.1569765230.txt.gz · Last modified: 2019/10/01 13:53 (external edit)