Skip to main content
Privkit Logo

Privkit: A Privacy Toolkit

Privkit is a privacy toolkit that provides methods for privacy analysis. It includes different data types, privacy-preserving mechanisms, attacks, and metrics. The current version is focused on location data and facial data. The Python Package is designed in a modular manner and can be easily extended to include new mechanisms. Privkit can be used to process data, configure privacy-preserving mechanisms, apply attacks, and also evaluate the privacy/utility trade-off through suitable metrics.

See https://privkit.fc.up.pt for a complete documentation.

Citation

If you use privkit in your work, please consider to cite:

@inproceedings{cunha2024privkit,
  title={Privkit: A Toolkit of Privacy-Preserving Mechanisms for Heterogeneous Data Types},
  author={Cunha, Mariana and Duarte, Guilherme and Andrade, Ricardo and Mendes, Ricardo and Vilela, Jo{\~a}o P},
  booktitle={Proceedings of the Fourteenth ACM Conference on Data and Application Security and Privacy},
  pages={319--324},
  year={2024}
}

Installation

Privkit can be installed through this Github repository or by using pip:

pip install privkit

Then, if needed, you can run the following command to install the dependencies.

pip install -r requirements.txt

Creating a virtual environment

Note that you can create a virtual environment (pipenv), which is optional but strongly recommended, in order to avoid potential conflicts with other packages. You just need to download the Pipfile and Pipfile.lock files and run in the same directory:

pipenv install

Then you can access the virtual environment by executing:

pipenv shell

Examples

The repository https://github.com/privkit/privkit-tutorials contains practical tutorials of Privkit available as Jupyter Notebooks. This repository aims at promoting the reproducibility of results from research papers.

Getting started

import privkit as pk

data_to_load = [['2008-10-23 02:53:04', 39.984702, 116.318417],
                ['2008-10-23 02:53:10', 39.984683, 116.31845],
                ['2008-10-23 02:53:15', 39.984686, 116.318417]]

location_data = pk.LocationData()
location_data.load_data(data_to_load, datetime=0, latitude=1, longitude=2)

planar_laplace = pk.ppms.PlanarLaplace(epsilon=0.01)
planar_laplace.execute(location_data)

Contributing

Check the contributing guidelines.

License

Privkit is open-source and licensed under the BSD 3-clause license.

Supported by

University of Porto INESC TEC CISUC PRIVATEER

Metadata

Release files for privkit 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for privkit 0.5.1
File Size Uploaded
privkit-0.5.1.tar.gz 59.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for privkit 0.5.1
File Interpreter ABI Platform
privkit-0.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 146.6 kB

Release files / privkit-0.5.1.tar.gz

Download URL privkit-0.5.1.tar.gz
Size 59.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7c50b3c23fb91ee3a372b8d7941b009b1f3241932a12683a0d0fa43b230ff1fe
BLAKE2b-256 checksum
How to use checksums
426e58bdcc15d6800572f2fb2c6f18d2e6e6f4712ee06fed5a6a3a0e61732f78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / privkit-0.5.1-py3-none-any.whl

Download URL privkit-0.5.1-py3-none-any.whl
Size 87.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3bef50b20a73cffc0611ab95fa922019315a612f1dd4676a84a96cfe7372549
BLAKE2b-256 checksum
How to use checksums
9e2fe9d81e39c3c8c95ab2738b6368b9470ce75581589856b25752416be27b73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page