red-xai-encrypt (Red-SecretsXAI)
Password-based file, folder and text encryption from Red-XAI LLC, built on a from-scratch C++ core (librsx) with a Python front end. Sealed data can be saved as a compact binary container or as a PNG of red-X "micro-digit" art.
- Argon2id key derivation, ChaCha20-Poly1305 authenticated encryption in 64 KiB chunks, HKDF-SHA256 key separation.
- Two key modes: self-contained password mode, or port mode with a local
.red-xai-portkeymap folder plus your password. - Recovery key, Shamir k-of-n key cards, keymap generations with rollback detection.
- Red-X PNG carrier with Reed-Solomon error correction.
Install
pip install red-xai-encrypt
Requires Python 3.10+. Installs numpy and Pillow. Prebuilt native core wheels are published for Linux x86_64 (glibc 2.38+). On other platforms (macOS, Windows, older Linux, aarch64) install from the source distribution and build librsx yourself (CMake + a C++17 compiler; see docs/ inside the sdist):
cmake -S core -B core/build -DCMAKE_BUILD_TYPE=Release -DRSX_SHARED=ON
cmake --build core/build
Then place the built librsx.so / librsx.dylib / librsx.dll in redxai/_native/.
Quickstart
from redxai import encrypt_file, decrypt_file, encrypt_text, decrypt_text
# Self-contained: only the password is needed to open it
out = encrypt_file("notes.txt", "correct horse battery staple", mode="password")
print(out) # notes.txt.Red_SecretXAI (a red-X PNG)
decrypt_file(out, "correct horse battery staple", out_dir="restored")
# Binary container instead of a PNG
encrypt_file("notes.txt", "pw", mode="password", output="binary")
# Text
token = encrypt_text("hello", "pw", mode="password")
assert decrypt_text(token, "pw") == "hello"
A wrong password, or any change to the file, raises WrongPasswordError and nothing is written.
Port mode
Without mode="password", the SDK uses a .red-xai-port folder (keymap) next to your work, created on first use after a setup prompt. You get a 256-bit recovery key once: write it down and store it offline. Losing both the port folder and the recovery key means losing the data.
Command line
redsecretsxai --help # or: python -m redsecretsxai --help
redsecretsxai encrypt-file -i report.pdf # -> report.pdf.Red_SecretXAI
redsecretsxai decrypt-file -i report.pdf.Red_SecretXAI -o report.pdf
redsecretsxai encrypt-folder my-repo -o my-repo.Red_SecretXAI
redsecretsxai archive-preview my-repo.Red_SecretXAI
redsecretsxai decrypt-folder my-repo.Red_SecretXAI -d restored/
redsecretsxai convert my-repo.Red_SecretXAI my-repo.png # blob <-> red-X PNG
redsecretsxai encode -m "short message" -o msg.png
redsecretsxai decode -i msg.png
redsecretsxai init-port --path ./.red-xai-port
Passwords are prompted without echo when -p is omitted (avoid -p on shared machines; it shows up in shell history and process lists).
File format (overview)
.Red_SecretXAIfiles hold an authenticated header (magic, version, capability flags, KDF parameters, salt, nonce) followed by a ChaCha20-Poly1305 stream in 64 KiB chunks. Each chunk has its own tag, counter and final-chunk flag, so tampering, truncation and reordering are detected.- Folders and drives are packed into an RSXA archive before encryption. Payloads are padded to fixed size bands.
- Output is written to a temporary file and only published after the last chunk verifies; existing files are never overwritten.
- The red-X PNG carrier encodes the encrypted bytes with Reed-Solomon error correction. It must stay a lossless PNG: JPEG, screenshots and resizing will break it.
- Full concept docs (
docs/spec/), language guides and test vectors are included in the source distribution.
Security notes and honest limitations
- No independent audit yet. All primitives are implemented from scratch and checked against official test vectors and internal stress testing, but have not been reviewed by an outside firm. Do not rely on it as your only protection for high-value secrets until it has been audited.
- Your password matters. Argon2id makes each guess expensive (default about 0.5 s and 256 MiB), but a weak password can still be guessed.
- The red-X image is a carrier, not extra security. Secrecy comes from the encryption; the image only changes how the data looks and travels.
- Port-mode keymaps are local files. The tripwire and hardware binding are best-effort; sync tools, backups or malware on the same device can still copy files. Keep backups of the recovery key or key cards offline.
- No public-key sharing yet: recipients need the password (or keymap).
- Prebuilt native binaries are provided only for the platforms listed above.
Report security issues privately to support@infected-nation.com.
License
Apache-2.0, copyright 2026 Red-XAI LLC. Red-SecretsXAI, Red-XAI and the red-X logo are trademarks of Red-XAI LLC. Encryption software may be subject to export controls; you are responsible for complying with the laws that apply to you.
Metadata
Release files for red-xai-encrypt 0.3.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 |
|---|---|---|---|---|
| red_xai_encrypt-0.3.0.tar.gz | 2.8 MB | Without provenance | Details for red_xai_encrypt-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| red_xai_encrypt-0.3.0-py3-none-manylinux_2_38_x86_64.whl | Python 3 | none | Linux glibc 2.38+ x86-64 | Details for red_xai_encrypt-0.3.0-py3-none-manylinux_2_38_x86_64.whl |
Total release size: 3.1 MB
Release files / red_xai_encrypt-0.3.0.tar.gz
| Download URL | red_xai_encrypt-0.3.0.tar.gz |
|---|---|
| Size | 2.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1dd6f2f2d825edc305ec15ce933510412b82fda8ddf9b6d4da3ed77cf155379
|
|
BLAKE2b-256 checksum How to use checksums |
b2b0fb06322ea38ae0945e2a6c659ce8a9e916c822479e336cee83923b812c79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / red_xai_encrypt-0.3.0-py3-none-manylinux_2_38_x86_64.whl
| Download URL | red_xai_encrypt-0.3.0-py3-none-manylinux_2_38_x86_64.whl |
|---|---|
| Size | 329.8 kB |
| Tags | Linux glibc 2.38+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
f8cc03efccbe986fd380bd605c7f6cdd88b39c7d469d4aeac3f96d5425467e2c
|
|
BLAKE2b-256 checksum How to use checksums |
fd6039d79b3b543c3d46731639192c51ce4d74a45f1ee38c19c324f9123806ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for red-xai-encrypt 0.3.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.