Stegmarc
Universal steganographic analysis — statistical, forensic, and neural watermark detection.
Install
pip install stegmarc # statistical + forensic detectors
pip install "stegmarc[neural]" # + TrustMark / Stable Signature neural detection
Usage
from stegmarc import analyze, robustness_test
# Analyze any image
result = analyze("image.jpg")
print(result.verdict)
print(result.confidence)
result.save_report("audit.pdf")
# Test watermark robustness
report = robustness_test("cover.jpg", secret="my_id")
print(f"Survived {report.survival_rate:.0%} of attacks")
print(f"Failed: {report.failed_attacks}")
report.save_report("robustness_audit.pdf")
# With cover image for quality metrics
result = analyze("stego.jpg", cover_path="original.jpg")
print(f"PSNR: {result.psnr:.1f} dB SSIM: {result.ssim:.4f}")
What it detects
| Detector | Domain | Catches |
|---|---|---|
| Chi-square | JPEG DCT | LSB replacement in DCT coefficients |
| RS Analysis | Spatial | Pixel-level LSB substitution |
| SPA | Spatial | Sample pair analysis |
| EOF Detection | Forensic | Data appended after image end marker |
| EXIF Analysis | Forensic | Metadata anomalies, steg tool fingerprints |
| LSB Histogram | Forensic | LSB plane uniformity |
| Multi-channel | Forensic | Per-R/G/B channel embedding |
| TrustMark | Neural | Adobe C2PA robust watermarks |
| Stable Signature | Neural | Meta AI Stable Diffusion watermarks |
| SRNet | Neural/GPU | Adaptive spatial steg (WOW/S-UNIWARD/HILL) |
API
Also available as a hosted API: https://raghav7006--stegmarc-api-web.modal.run
curl -X POST https://raghav7006--stegmarc-api-web.modal.run/analyze \
-F "stego=@image.jpg"
Installation Notes
Apple Silicon (M1/M2/M3 Mac)
jpegio requires a native arm64 build:
ARCHFLAGS="-arch arm64" pip install jpegio
pip install stegmarc
Linux
pip install stegmarc
Windows
jpegio is not supported on Windows. Use WSL2 or Docker.
Metadata
Release files for stegmarc 1.0.4
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 | |
|---|---|---|---|---|
| stegmarc-1.0.4.tar.gz | 28.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stegmarc-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 60.8 kB
Release files / stegmarc-1.0.4.tar.gz
| Download URL | stegmarc-1.0.4.tar.gz |
|---|---|
| Size | 28.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1cb59386b58eed7af92e3c0ea490e3377f71a2bbf2a390dff0eb02d5702679d2
|
|
BLAKE2b-256 checksum How to use checksums |
25587648f06173cd0ae07698228d601f5e789c5467a48a410eff009efd0a000a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Release files / stegmarc-1.0.4-py3-none-any.whl
| Download URL | stegmarc-1.0.4-py3-none-any.whl |
|---|---|
| Size | 32.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c9ab74c76be1873889bf03697b8fe14d6f41d207425dac6d23528ad6f9460bc
|
|
BLAKE2b-256 checksum How to use checksums |
f9e5fa86ec5d6c74a4945621fe6db89fc5faffb2892d12fa21dbc0527219eb98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Security for stegmarc 1.0.4
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.