A powerful custom encryption library built from scratch
Project description
xploitenc 🔐
A powerful custom encryption library for Python — built from scratch, no dependencies.
Installation
Install xploitenc via pip
pip install xploitenc
Quick Start
import xploitenc
# Encrypt & decrypt
enc = xploitenc.encrypt("Hello!", key="my-secret-key")
dec = xploitenc.decrypt(enc, key="my-secret-key")
print(dec.decode()) # Hello!
# Generate a secure random key
key = xploitenc.generate_key(bits=256)
Features
XploitCipher — Main Cipher
cipher = xploitenc.XploitCipher("password", bits=256) # 128 / 256 / 512
enc = cipher.encrypt(b"data")
dec = cipher.decrypt(enc)
b64 = cipher.encrypt_to_base64("data") # returns str
text = cipher.decrypt_from_base64(b64) # returns str
Password Hashing
hashed = xploitenc.hash_password("MyPassword123!")
xploitenc.verify_password("MyPassword123!", hashed) # True
xploitenc.verify_password("WrongPassword", hashed) # False
Digital Signatures
key = xploitenc.generate_key(256)
sig = xploitenc.sign("my message", key)
xploitenc.verify_signature("my message", sig, key) # True
xploitenc.verify_signature("tampered", sig, key) # False
KeyManager — Multiple Keys
km = xploitenc.KeyManager(master_key="master-password")
km.add_key("db_key", bits=256)
km.add_key("api_key", bits=128)
enc = km.encrypt_with("db_key", "secret")
dec = km.decrypt_with("db_key", enc)
exported = km.export() # save all keys (encrypted)
km.load(exported) # restore
SecureVault — Encrypted Config Store
A safe alternative to .env files — everything is encrypted on disk.
# Save secrets
vault = xploitenc.SecureVault("master-password")
vault.set("api_key", "sk-abc123")
vault.set("db_pass", "P@ssw0rd!")
vault.save("vault.xenc")
# Load secrets
vault = xploitenc.SecureVault("master-password")
vault.load("vault.xenc")
print(vault.get("api_key")) # sk-abc123
Tip: Add
vault.xencto.gitignore— never commit it.
Error Handling
try:
xploitenc.decrypt(data, "wrong-key")
except xploitenc.DecryptionError:
print("Wrong key or tampered data")
try:
xploitenc.verify_signature(msg, expired_sig, key)
except xploitenc.SignatureError:
print("Signature invalid or expired")
How It Works
| Layer | Details |
|---|---|
| Cipher | 16-round Feistel network (XSCC) |
| S-Box | Key-dependent, non-linear substitution |
| Diffusion | GF(2⁸) MixColumns — identical to AES |
| Key derivation | PBKDF2-SHA256 + SHA3-256 chain, 100k iterations, random salt per message |
| Integrity | HMAC-SHA3-256 authentication tag on every message |
| Key sizes | 128 / 256 / 512-bit |
Key Sizes
| Bits | Use Case |
|---|---|
| 128 | General data |
| 256 | Sensitive data (default) |
| 512 | Maximum security |
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
xploitenc-1.0.1.tar.gz
(9.8 kB
view details)
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 xploitenc-1.0.1.tar.gz.
File metadata
- Download URL: xploitenc-1.0.1.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0f4835e3bd25779964d7bf4d4702468cd5469620b8bb711ab6de401defb6d02
|
|
| MD5 |
e8defc12331b6f90eae6a2761886ce33
|
|
| BLAKE2b-256 |
d08999357244e78562a2a006dc6d6af522b9cdca16570eccbc20f7eb15c5487c
|
File details
Details for the file xploitenc-1.0.1-py3-none-any.whl.
File metadata
- Download URL: xploitenc-1.0.1-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
146471757ba4bea671419b991c16a9a521c65f02a1738055cc36aed0c9ce70c6
|
|
| MD5 |
e1ffa056e33c9f81e16a6ab279b90422
|
|
| BLAKE2b-256 |
1fce3f2e66c24b775f71a771d473f3702cce05a84044f0c3803d7f2439ee95f9
|