BX Marshall
BX Marshall (bxmarshall) is a local-first Python toolkit for password-based file protection, compression, Unicode text representation, project checksums and conservative Python-source utilities. Version 0.2.0, by BXCODE. Supports Python 3.11–3.13.
Security model and limitations
BXM v1 uses AES-256-GCM authenticated encryption and a per-package random 16-byte salt and 12-byte nonce. A 32-byte key is derived from the password using scrypt (N=2^15, r=8, p=1). There are no embedded keys or network calls. Use a long, unique password and keep it separately: there is no password recovery. GCM detects tampering. File decryption writes to a temporary file and only publishes the output after authentication completes. Memory usage is bounded for file operations, though scrypt itself requires memory.
BXM v1 currently protects integrity/confidentiality but does not compress files automatically; explicitly compress first if desired. Passwords are not stored. The format is not a substitute for key management, backups, or independent security review. Hashes alone do not establish legal ownership. Character Engine is reversible representation, not encryption. Cython compilation can make casual inspection harder but is neither encryption nor absolute protection. Do not treat minification as a security boundary.
The required cryptography dependency supplies vetted AES-GCM and Ed25519 primitives. A C compiler and Cython are optional and only needed for compile_file. Android/Pydroid may install cryptography wheels on supported ARM64/Python combinations, but availability depends on the specific platform and package index; native compilation is not guaranteed.
Install
python -m pip install bxmarshall
# From a source checkout, including tests:
python -m pip install -e '.[test]'
# Build and publishing tools are separate and generally best installed on a desktop/CI machine:
python -m pip install -e '.[release]'
# Optional Cython integration:
python -m pip install -e '.[cython]'
Quick start
import bxmarshall
package = bxmarshall.protect("Hello BX بالعربية", password="use-a-long-unique-password")
text = bxmarshall.unprotect(package, password="use-a-long-unique-password", as_text=True)
bxmarshall.protect_file("main.py", "main.bxm", password="use-a-long-unique-password")
bxmarshall.unprotect_file("main.bxm", "restored.py", password="use-a-long-unique-password")
print(bxmarshall.inspect("main.bxm"))
print(bxmarshall.compress_file("main.py", "main.zip"))
bxmarshall.minify_file("main.py", "main.min.py")
API overview: protect / unprotect handle bytes or UTF-8 text; protect_file / unprotect_file stream files; compress_data and decompress_data support zlib or raw data, while compress_file emits ZIP for .zip destinations and otherwise zlib/auto; encode_text / decode_text are Unicode-safe representations; sha256_file, create_manifest, and verify_manifest support integrity workflows; signatures.generate_keypair, sign, verify provide optional Ed25519 signing; compile_file optionally builds an extension; minify_file removes comments conservatively and AST-checks the result. See docstrings for arguments and returned values.
Manifest output must be outside the project root to avoid including its own output. A manifest is an integrity aid, not a legal ownership certificate. Verify signed release manifests with a public key obtained through a trusted channel.
Development and tests
python -m pip install -e '.[test]'
python -m pytest -q
Build and publish
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
# Configure a PyPI API token in ~/.pypirc with mode 600, or enter it interactively:
python -m twine upload dist/*
Never commit tokens. Recommended interactive upload: use __token__ as username and paste the token only at the prompt. Alternatively set TWINE_USERNAME=__token__ and TWINE_PASSWORD in a temporary shell environment; avoid writing credentials into source files or shell history.
GitHub release starter files
The repository includes GitHub Actions tests, Dependabot, SECURITY.md, CONTRIBUTING.md, secret-scanning guidance and a project .gitignore. Review them before adoption. GitHub's native secret scanning availability depends on repository plan/settings; local checks are advisory, not a guarantee.
git init
git add .
git commit -m "BX Marshall 0.2.0"
git branch -M main
git remote add origin YOUR_GITHUB_REPOSITORY
git push -u origin main
Create a GitHub release from the repository's Releases → Draft a new release, tag v0.2.0, title BX Marshall 0.2.0; attach the wheel, source archive, and checksums. Confirm the release notes and artifacts before publishing.
License
MIT; see LICENSE.
Metadata
Release files for bxmarshall 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bxmarshall-0.2.0.tar.gz | 13.7 kB | Without provenance | Details for bxmarshall-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bxmarshall-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for bxmarshall-0.2.0-py3-none-any.whl |
Total release size: 26.2 kB
Release files / bxmarshall-0.2.0.tar.gz
| Download URL | bxmarshall-0.2.0.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c66a70a501497082be58a6a5a11428b66a31354e758e53179ab79a3c8513bb3f
|
|
BLAKE2b-256 checksum How to use checksums |
0fc30cad3d1b105aa940a4849d320d6313a06b8b869859741cb652882fcd4798
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / bxmarshall-0.2.0-py3-none-any.whl
| Download URL | bxmarshall-0.2.0-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ba7ba4406e0f8606d9b1fdfa9cb32d0251612cdf2db7b2a7dca0fcb1fab07c0
|
|
BLAKE2b-256 checksum How to use checksums |
85a7a8361c67947e436718404307b3071930a962692418af2be9f1db77f02248
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for bxmarshall 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.