Data protection SDK — format-preserving encryption (FF1/FF3), AES-GCM, data masking, and hashing.
Project description
cyphera
Data protection SDK for Python — format-preserving encryption (FF1/FF3), AES-GCM, data masking, and hashing.
pip install cyphera
Usage
from cyphera import Cyphera
# Auto-discover: checks CYPHERA_CONFIG_FILE env, ./cyphera.json, /etc/cyphera/cyphera.json
c = Cyphera.load()
# Or load from a specific file
c = Cyphera.from_file("./config/cyphera.json")
# Or inline config
c = Cyphera({
"configurations": {
"ssn": {"engine": "ff1", "key_ref": "my-key", "header": "T01"},
},
"keys": {
"my-key": {"material": "2B7E151628AED2A6ABF7158809CF4F3C"},
},
})
# Protect
encrypted = c.protect("123-45-6789", "ssn")
# → "T01i6J-xF-07pX" (DPH-prefixed, dashes preserved)
# Access (header-based, no configuration name needed)
decrypted = c.access(encrypted)
# → "123-45-6789"
Configuration File (cyphera.json)
{
"configurations": {
"ssn": { "engine": "ff1", "key_ref": "my-key", "header": "T01" },
"ssn_mask": { "engine": "mask", "pattern": "last4", "header_enabled": false }
},
"keys": {
"my-key": { "material": "2B7E151628AED2A6ABF7158809CF4F3C" }
}
}
The header (Data Protection Header, DPH) is a short prefix prepended to
protected output that identifies the configuration used. It lets access()
reverse a value without the caller naming the configuration.
Cross-Language Compatible
All SDKs produce identical output for the same inputs:
Input: 123-45-6789
Java: T01i6J-xF-07pX
Rust: T01i6J-xF-07pX
Node: T01i6J-xF-07pX
Python: T01i6J-xF-07pX
Go: T01i6J-xF-07pX
.NET: T01i6J-xF-07pX
Status
Alpha. API is unstable. Cross-language test vectors validated against Java, Rust, Node, Go, and .NET implementations.
License
Apache 2.0 — Copyright 2026 Horizon Digital Engineering LLC
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cyphera-0.0.1a9.tar.gz.
File metadata
- Download URL: cyphera-0.0.1a9.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6780d8898b5815ba5e4e2acea48151ea10be6cabf04772ceefc5721965ad9eef
|
|
| MD5 |
53cd3866f86a87b6834bc366fb20e322
|
|
| BLAKE2b-256 |
6e001edcc4913e5376906e8432fbbc5a810714c3cf54e1f66d72d75edd3d2755
|
Provenance
The following attestation bundles were made for cyphera-0.0.1a9.tar.gz:
Publisher:
publish.yml on cyphera-labs/cyphera-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cyphera-0.0.1a9.tar.gz -
Subject digest:
6780d8898b5815ba5e4e2acea48151ea10be6cabf04772ceefc5721965ad9eef - Sigstore transparency entry: 1612914339
- Sigstore integration time:
-
Permalink:
cyphera-labs/cyphera-python@11bb4ccdf2b6e71fa4f9c85797c3e8f55d99bd7a -
Branch / Tag:
refs/tags/v0.0.1a9 - Owner: https://github.com/cyphera-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@11bb4ccdf2b6e71fa4f9c85797c3e8f55d99bd7a -
Trigger Event:
push
-
Statement type:
File details
Details for the file cyphera-0.0.1a9-py3-none-any.whl.
File metadata
- Download URL: cyphera-0.0.1a9-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db0ac5cf3676e522734e6d77ff97adc2cf8a084902db19d9a2e5febdf428f119
|
|
| MD5 |
160ce8b80c4f12389e240a1f60c11e77
|
|
| BLAKE2b-256 |
2f414cb9170d339084e0869f642426ff52cd6080ef62e9174f51116ce5e68f33
|
Provenance
The following attestation bundles were made for cyphera-0.0.1a9-py3-none-any.whl:
Publisher:
publish.yml on cyphera-labs/cyphera-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cyphera-0.0.1a9-py3-none-any.whl -
Subject digest:
db0ac5cf3676e522734e6d77ff97adc2cf8a084902db19d9a2e5febdf428f119 - Sigstore transparency entry: 1612914519
- Sigstore integration time:
-
Permalink:
cyphera-labs/cyphera-python@11bb4ccdf2b6e71fa4f9c85797c3e8f55d99bd7a -
Branch / Tag:
refs/tags/v0.0.1a9 - Owner: https://github.com/cyphera-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@11bb4ccdf2b6e71fa4f9c85797c3e8f55d99bd7a -
Trigger Event:
push
-
Statement type: