Skip to main content

Python implementation of ciphersweet

Project description


Python implementation of ciphersweet

This is a very early stage implementation of ciphersweet from Please do not attempt to use this in production yet, as I'm not sure if everything works. There are tests that match the original ciphersweet tests and those tests are currently passing.

Currently, only the "modern" modes are supported.

Here is an example of how to create an encrypted field of the last four digits of a number:

import ciphersweet
import secrets

nacl_key = secrets.token_bytes(32)
field = ciphersweet.EncryptedField(
t = ciphersweet.Transformation.last_four_digits
field.add_blind_index('contact_ssn_last_four', t, output_length=16, fast=True)
index = field.get_blind_index('hello', name='contact_ssn_last_four')


For documentation on how this works, look into the original ciphersweet project.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ciphersweet, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size ciphersweet-0.1.1.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View
Filename, size ciphersweet-0.1.1-py2.py3-none-any.whl (9.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page