Skip to main content

Universal steganographic analysis — statistical, forensic, and neural watermark detection

Project description

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.

Project details


Download files

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

Source Distribution

stegmarc-1.0.2.tar.gz (28.4 kB view details)

Uploaded Source

Built Distribution

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

stegmarc-1.0.2-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file stegmarc-1.0.2.tar.gz.

File metadata

  • Download URL: stegmarc-1.0.2.tar.gz
  • Upload date:
  • Size: 28.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for stegmarc-1.0.2.tar.gz
Algorithm Hash digest
SHA256 713dcfd9986d8a6ffbdf4c1d3464ccc73dec23b2f604d3b0af5f9e48cc659d3e
MD5 43fe919b8ad2e8530816808a7d38bcbf
BLAKE2b-256 6c19d88d4adeb8bda0d6f032bc27cec0761674a662a2dd6c7839e820f7257c70

See more details on using hashes here.

File details

Details for the file stegmarc-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: stegmarc-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 32.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for stegmarc-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 74faf1d25ea6359656d9b5bfecc785289e14acf801ad11e3e2fe8817c67c0692
MD5 60f39d8ea31f93711a3ed8a14c550f84
BLAKE2b-256 15206e6b8b898cfb6085630ae14f29771364e15eae89945b440c51481c67decf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page