Skip to main content

shredder_encryptor

A small, dependency-free playground for encoding and encryption in Python. The project bundles a handful of classical ciphers, an opinionated encoding toolbox, a tiny framework for wiring ciphers together and a small on-disk key store. Everything relies on the standard library only.

Status

Early-stage example code. The shipped ciphers (Vigenère, XOR-stream, Feistel block ciphers, SHA-256 wrapper) are intended for learning and experimentation; do not use them to protect real secrets maybe.

Installation

pip install shredder-encryptor

Layout

shredder_encryptor/
  codec/         # encoding helpers (text, hex, base64, padding, ...)
  framework/     # BaseCipher, Pipeline, testing utilities
  cipher/        # ready-to-use algorithms (Vigenère, XorStream, ...)
  boom/          # irreversible (one-way) encryption primitives
  persistence.py # tiny on-disk key store
  version.py     # version metadata
tests/           # pytest suite (codec, framework, cipher, persistence, boom)

codec — encoders in one place

from shredder_encryptor import codec

codec.encode(b"hello")                # standard base64
codec.encode_url(b"hello")            # URL-safe base64
codec.pkcs7_pad(b"hi", 8)             # PKCS#7 block padding
codec.token_urlsafe(32)               # secrets.token_urlsafe wrapper
codec.hexdigest(b"hello", "sha1")     # hashlib wrapper

framework — compose ciphers, test them

from shredder_encryptor.cipher import VigenereCipher, XorStreamCipher
from shredder_encryptor.framework import Pipeline, assert_round_trip

pipeline = Pipeline([VigenereCipher(b"alpha"), XorStreamCipher(b"beta")])
assert_round_trip(pipeline, b"pipeline payload")

cipher — concrete algorithms

from shredder_encryptor.cipher import (
    VigenereCipher, XorStreamCipher, FeistelEcbCipher, FeistelCbcCipher,
    Sha256Hash,
)

ct = FeistelCbcCipher(b"my-key").encrypt(b"hello world")
pt = FeistelCbcCipher(b"my-key").decrypt(ct)

persistence — small key store

from shredder_encryptor.persistence import save_key, load_key, list_keys

save_key("api-token", b"super-secret-bytes")
print(list_keys())               # ['api-token']
load_key("api-token")            # b'super-secret-bytes'

Keys live in ~/.shredder_encryptor/keys/ by default with 0o600 permissions on POSIX and ACL-stripped equivalents on Windows.

boom — one-way encryption primitives

from shredder_encryptor.boom import (
    ScrambleCipher, TruncateCipher, DiscardCipher, BloomFingerprint,
)
from shredder_encryptor.framework import assert_irreversible

assert_irreversible(TruncateCipher(keep=8), b"hello world")
digest = ScrambleCipher(b"my-key").encrypt(b"hello world")
fingerprint = BloomFingerprint(size=16, hashes=4).encrypt(b"hello world")

Conventions

  • Public APIs are typed and re-exported through each package's __init__.py. Internal helpers start with an underscore.
  • Cipher classes inherit from framework.BaseCipher; setting DECRYPTABLE = False marks a one-way cipher.
  • codec mirrors the style of well-known libraries (e.g. hashlib, secrets, base64) but keeps a single import root.

Security notice

The ciphers in shredder_encryptor.cipher are pedagogical. FeistelEcbCipher / FeistelCbcCipher use a hand-rolled block cipher with a tiny key size. VigenereCipher and XorStreamCipher provide no authentication. For real-world cryptography, use a vetted library such as cryptography.

License

MIT. See LICENSE.

Download files

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

Source Distribution

shredder_encryptor-2026.8.1.tar.gz (48.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shredder_encryptor-2026.8.1-py3-none-any.whl (51.0 kB view details)

Uploaded Python 3

File details

Details for the file shredder_encryptor-2026.8.1.tar.gz.

File metadata

  • Download URL: shredder_encryptor-2026.8.1.tar.gz
  • Upload date:
  • Size: 48.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for shredder_encryptor-2026.8.1.tar.gz
Algorithm Hash digest
SHA256 847d395b0ab09b647b6eca13064b9423c99f40d279a181d9b552ea204bb51303
MD5 7478616147f0d5c8b4f12d2a21136bbe
BLAKE2b-256 a8fdd287feb32d77f886a4d765866ff66a00264346b0abd8d75be855a80a7b31

See more details on using hashes here.

File details

Details for the file shredder_encryptor-2026.8.1-py3-none-any.whl.

File metadata

File hashes

Hashes for shredder_encryptor-2026.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 288caef9da6f4e74d971ee81a111ff9d8af37515bee58b2a356a06cba7cc3744
MD5 41a480e2761c24c07862502283f080c0
BLAKE2b-256 2868904a918a4f6388d482eb9a5260e6c051f3643b27e16800f2b1a67396c020

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2026.8.1 This release

2 files

2026.8.0

2 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