GithubHelp home page GithubHelp logo

pombredanne / libsbf-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spatialbloomfilter/libsbf-python

0.0 1.0 0.0 34 KB

libSBF - implementation of the Spatial Bloom Filters in Python

License: GNU Lesser General Public License v3.0

Python 100.00%

libsbf-python's Introduction

libSFB-python

libSBF - implementation of the Spatial Bloom Filters in Python

Synopsis

The Spatial Bloom Filters (SBF) are a compact, set-based data structure that extends the original Bloom filter concept. An SBF represents and arbitrary number of sets, and their respective elements (as opposed to Bloom filters, which represent the elements of a single set). SBFs are particularly suited to be used in privacy-preserving protocols, as set-membership queries (i.e. the process of verifying if an element is in a set) can be easily computed over an encrypted SBF, through (somewhat) homomorphic encryption.

Usage

Spatial Bloom Filters have been first proposed for use in location-privacy application, but have found application in a number of domains, including network security and the Internet of Things.

The libSBF-python repository contains the Python implementation of the SBF data structure. The SBF class is provided, as well as various methods for managing the filter:

  • once the filter is constructed, the user can insert elements into it through the insert method. The check method, on the contrary, is used to verify weather an element belongs to one of the mapped sets. Two additional methods, insert_from_file and check_from_file can be used to insert and check elements from a CSV file.
  • methods such as filter_sparsity, filter_fpp, compute_area_fpp, compute_apriori_area_fpp, compute_area_isep, compute_apriori_area_isep, expected_area_emersion and area_emersion allow to compute and return several probabilistic properties of the constructed filter.
  • finally, two methods are provided to print out the filter: print_filter prints the filter and related statistics to the standard output, whereas save_filter writes the filter onto a CSV file.

Additionally, a separate set of plotting funtions is provided in sbfplot. The provided functions are based on matplotlib.pyplot and enable the generation of graphs depicting the probabilistic properties of a generated filter, including emersion and safeness, as well as false positive probability and inter-set error probability.

For more details on the implementation, and how to use the library please refer to the homepage of the project.

The library and the test application can be tested using the sample datasets provided in a separate repository.

A C++ implementation is also available.

Bibliography

The SBFs have been proposed in the following research papers:

  • Luca Calderoni, Paolo Palmieri, Dario Maio: Location privacy without mutual trust: The spatial Bloom filter. Computer Communications, vol. 68, pp. 4-16, September 2015. ISSN 0140-3664. DOI
  • Paolo Palmieri, Luca Calderoni, Dario Maio: Spatial Bloom Filters: Enabling Privacy in Location-aware Applications. In: Inscrypt 2014. Lecture Notes in Computer Science, vol. 8957, pp. 16โ€“36, Springer, 2015. DOI

Authors

Luca Calderoni, Dario Maio - University of Bologna (Italy)

Paolo Palmieri - University College Cork (Ireland)

License

The source code is released under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Please refer to the included files COPYING and COPYING.LESSER.

Acknowledgements

This project uses several Python modules and in particular: hashlib, numpy, base64, csv, sys.

libsbf-python's People

Contributors

palmaway avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.