SAMARTH ENC v0.6.10
SAMARTH ENC is a completely keyless, offline Python source-protection and packaging toolkit. No password, environment key, online service or mandatory authentication is used by the internal backend.
Profiles
standard— compiled CPython payload with metadata/path hardening.advanced— segmented function virtualization with conservative safety analysis.maximum— virtualizes every eligible function supported safely by the internal VM.native— genuine external Nuitka backend only.hybrid— genuine external backend workflow only.
NATIVE/HYBRID never silently fall back to the internal backend.
Keyless offline protection
samarth protect app.py -o protected --profile standard --backend internal
samarth protect app.py -o protected --profile advanced --backend internal
samarth protect app.py -o protected --profile maximum --backend internal
There is deliberately no --sealed, password, SAMARTH_KEY, or encryption-key configuration in v0.6.10. The internal protection is obfuscation/virtualization plus SHA-256 integrity, not cryptographic confidentiality. An attacker who fully controls the executing Python process can eventually inspect runtime-visible program state.
Existing workflows
samarth protect INPUT -o OUTPUT --profile advanced
samarth protect INPUT -o OUTPUT --profile maximum
samarth protect INPUT -o OUTPUT --profile standard
samarth run-bundle OUTPUT --name main
samarth run OUTPUT/main.sme
samarth protect-multi INPUT -o OUTPUT --profile advanced
Compatibility
The current runtime reads v0.6.2 (SAMENC62), v0.6.3 (SAMENC63), v0.6.4 (SAMENC64), v0.6.5 (SAMENC65) and v0.6.6 (SAMENC66) internal payloads. New artifacts use SAMENC67 / format version 8.
The universal samarth/loader.py is intentionally unchanged byte-for-byte.
Architecture changes
Advanced and Maximum move eligible function bodies into a segmented v2 VM capsule. The capsule uses numeric node tags, per-artifact symbol permutation, metadata/path hardening and generic callable shells. VM eligibility is conservative: async/generator-sensitive bodies, nested definitions, context-manager-heavy constructs, annotations and other CPython frame-sensitive cases remain native when needed for correctness. Zero-argument super() is tested specifically so the previous class-cell failure does not recur.
This is obfuscation rather than encryption. The v2 capsule is intentionally not presented as cryptographic secrecy.
Testing boundaries
CPython 3.13.5/Linux is the actual execution environment used for this release test. Python 3.11/3.12/3.14, Windows, Termux and Pydroid 3 are reported as NOT TESTED when those environments are unavailable. NATIVE/HYBRID are also reported separately when their external backends are unavailable.
Native backends and capability detection
samarth env prints the locally detected Python ABI, OS, architecture, compiler/linker, Python development headers and available native backends. NATIVE and HYBRID refuse unsupported environments instead of silently downgrading.
NATIVE
--backend nuitka: genuine Nuitka native executable when Nuitka is installed and succeeds.--backend cython: genuine Cython native executable when CPython development headers/libpython and a C compiler are available. If embedded-executable linking is unavailable but extension compilation is possible, the artifact is explicitly marked as a native extension rather than being mislabeled as an executable.
Example:
python -m samarth env
python -m samarth protect app.py -o dist-native --profile native --backend cython
python -m samarth run dist-native/app.sme
HYBRID
HYBRID applies SAMARTH's internal symbol/literal hardening before native compilation. The selected native backend is recorded in the artifact metadata. HYBRID accepts only genuine native backends (Nuitka or Cython); PyArmor cannot be used to claim HYBRID. There is no ADVANCED/MAXIMUM fallback.
python -m samarth protect app.py -o dist-hybrid --profile hybrid --backend cython
python -m samarth run dist-hybrid/app.sme
Android / Pydroid 3
Pydroid 3 advertises a built-in C/C++ compiler and Cython support, but SAMARTH does not treat that marketing capability as proof of a working native build. Run python -m samarth env inside the actual Pydroid interpreter. NATIVE/HYBRID are supported only if the detector finds Cython, setuptools, a compiler and usable Python.h; the final build must also succeed on that device. Pydroid 3 was NOT TESTED on a physical Android device for this release.
Android / Termux
Termux is a separate build environment. Install Python and the compiler toolchain using Termux's package manager, then run python -m samarth env. Do not copy native artifacts between Termux/Pydroid or between CPU architectures. Termux was NOT TESTED on a physical Android device for this release.
Python versions
Internal .sme payloads are interpreter-version specific. Native artifacts are also platform/architecture/ABI specific. Never reuse a native binary built for another Python ABI or Android architecture.
The available build environment for this release contained CPython 3.13.5 only. Python 3.11, 3.12 and 3.14 were NOT TESTED here.
Keyless/offline boundary
There is no AES/sealed mode, password, SAMARTH_KEY, online authentication or cloud dependency. SHA-256 is used for integrity only; it is not publisher authentication. Because execution is keyless and offline, a sufficiently privileged process owner can inspect runtime-visible state.
Multi-version native build package and matrix support
Install the Cython build extra into the exact interpreter/environment used to build:
python -m pip install ".[cython]"
For Nuitka:
python -m pip install ".[nuitka]"
Build one current-environment artifact:
python -m samarth env
python -m samarth protect app.py --profile native --backend cython -o dist-native
python -m samarth protect app.py --profile hybrid --backend cython -o dist-hybrid
Build Python 3.11–3.14 on the same build host (all four interpreters must be installed or bootstrappable). The resulting names are app_py311.sme through app_py314.sme, matching the unchanged universal loader. Each output directory is one OS/environment/architecture bundle; keep Pydroid, Termux and desktop bundles separate. The native container validates environment, architecture and ABI after Python-version selection:
python -m samarth protect-multi app.py --profile hybrid --backend cython --install-build-deps -o dist-matrix
NATIVE uses --profile native. A native multi-version matrix is built for one OS/architecture at a time. The GitHub Actions workflow .github/workflows/native-matrix.yml builds CPython 3.11–3.14 for Linux, Windows and macOS. Android/Pydroid and Termux must be built separately on the actual target environments; desktop CI does not prove Android compatibility.
Cython extension fallback is now packaged as an importable module inside .sme, and the native runner imports that module instead of trying to execute a .so as a process. Native artifacts record and validate OS, architecture, Python version, ABI (for extensions) and Pydroid/Termux environment identity. The final .sme remains one package file.
v0.6.10 audit notes
The final audit added the python -m samarth entry point, fixed HYBRID future-import and .so fallback execution, rejects PyArmor for NATIVE/HYBRID, and aligns multi-version filenames with the unchanged universal loader. The release test scope and untested environments are documented in the release notes. Do not assume untested platforms are supported.
Metadata
Release files for samarth 0.6.10
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 |
|---|---|---|---|---|
| samarth-0.6.10.tar.gz | 46.4 kB | Without provenance | Details for samarth-0.6.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| samarth-0.6.10-py3-none-any.whl | Python 3 | none | any | Details for samarth-0.6.10-py3-none-any.whl |
Total release size: 91.1 kB
Release files / samarth-0.6.10.tar.gz
| Download URL | samarth-0.6.10.tar.gz |
|---|---|
| Size | 46.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6fd7ddc6e7b0162eb606d9bea97dce996624d300d8a0222cf30e6c585c0b65be
|
|
BLAKE2b-256 checksum How to use checksums |
8a28825cd2e5fbccd6fbff9df5a1ac1ec8946b0209b2140462eb7c5b4cf19a19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / samarth-0.6.10-py3-none-any.whl
| Download URL | samarth-0.6.10-py3-none-any.whl |
|---|---|
| Size | 44.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e1b181213cedf5b2839420f98b21fbd7b20757b84333088cfa9e84cf9e1d589
|
|
BLAKE2b-256 checksum How to use checksums |
7dec3e3092895e59d44d339a4180d4c9098f1c5be9d0390fd0db98af8136893c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for samarth 0.6.10
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.