Format-Transforming Encryption
Project description
libfte
Format-Transforming Encryption — encrypt data so the ciphertext matches any format you specify.
What is FTE?
Unlike standard encryption that produces random-looking output, FTE produces ciphertext that looks like whatever format you specify with a regular expression—hex strings, alphanumeric tokens, or any regex-expressible pattern.
Installation
pip install fte
Works out of the box with pure Python—no compilation required.
Quick Example
Encrypt a secret so the ciphertext looks like words:
import fte
# Create encoder: output will be lowercase "words" with spaces
encoder = fte.Encoder(regex=r'^([a-z]+ )+[a-z]+$', fixed_slice=80)
# Encrypt
ciphertext = encoder.encode(b'Attack at dawn')
print(ciphertext.decode())
# → "kqpvx mzbjw tnrdc fyhls wqaem xocgi znvub pdkry lfstj bhwce"
# Decrypt
plaintext, _ = encoder.decode(ciphertext)
# → b'Attack at dawn'
Use Cases
- Protocol obfuscation: Make encrypted traffic look like benign data
- Bypassing filters: Evade systems that block encrypted-looking content
- Steganography: Hide data within expected formats
Performance
For ~3x better performance, enable the optional native extension:
sudo apt-get install libgmp-dev # or: brew install gmp
FTE_BUILD_NATIVE=1 pip install --force-reinstall fte
export FTE_USE_NATIVE=1
Documentation
Full docs and examples: github.com/kpdyer/libfte
Reference
Based on Protocol Misidentification Made Easy with Format-Transforming Encryption (ACM CCS 2013).
License
MIT
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 fte-0.2.1.tar.gz.
File metadata
- Download URL: fte-0.2.1.tar.gz
- Upload date:
- Size: 25.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2331ec0ff99777d394e5b60a156a08ad3acbe8f4f74922ce117e82c21ae55feb
|
|
| MD5 |
c27f2931267af47d45baa148a1e64760
|
|
| BLAKE2b-256 |
502ecd9ec0a5e603b21556f1095dd02409b558d65f28bc0ea8a62da74444cfc6
|
Provenance
The following attestation bundles were made for fte-0.2.1.tar.gz:
Publisher:
publish.yml on kpdyer/libfte
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fte-0.2.1.tar.gz -
Subject digest:
2331ec0ff99777d394e5b60a156a08ad3acbe8f4f74922ce117e82c21ae55feb - Sigstore transparency entry: 813364195
- Sigstore integration time:
-
Permalink:
kpdyer/libfte@85a10c1bdf880cbe3771875cc4e5dcb590676102 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/kpdyer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@85a10c1bdf880cbe3771875cc4e5dcb590676102 -
Trigger Event:
release
-
Statement type:
File details
Details for the file fte-0.2.1-py3-none-any.whl.
File metadata
- Download URL: fte-0.2.1-py3-none-any.whl
- Upload date:
- Size: 25.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae0a9f8182dbb2da6499d73e048970328ae1ac73c1d3d5dd3396e848495dc08e
|
|
| MD5 |
cd4a8598ba9155d4c1c7b8b02ea5190e
|
|
| BLAKE2b-256 |
a49cc2228eb5a266bf968afeb1932d8a139566dcbaff4d4c2897d4c4bd35ae89
|
Provenance
The following attestation bundles were made for fte-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on kpdyer/libfte
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fte-0.2.1-py3-none-any.whl -
Subject digest:
ae0a9f8182dbb2da6499d73e048970328ae1ac73c1d3d5dd3396e848495dc08e - Sigstore transparency entry: 813364198
- Sigstore integration time:
-
Permalink:
kpdyer/libfte@85a10c1bdf880cbe3771875cc4e5dcb590676102 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/kpdyer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@85a10c1bdf880cbe3771875cc4e5dcb590676102 -
Trigger Event:
release
-
Statement type: