Skip to main content

PyPI version Commit CI/CD Documentation Status PyPI downloads License

conseal

Making research in steganography and steganalysis reproducible and accessible.

conseal is a Python package implementing the cost functions and embedding simulators of modern steganographic methods, for JPEG and spatial images.

  • 13 methods, from LSB to J-UNIWARD and MiPOD, most verified against the reference implementations of their authors, down to the stego image.
  • Three levels of API: one call from cover to stego, or separate costs, probabilities and sampling.
  • Reproducible: seeded simulation, with the original implementations and random number generators of the references.
  • Fast: Rust backends for the costs of HILL, J-UNIWARD, S-UNIWARD, UERD and WOW.

Documentation: https://conseal.readthedocs.io

Installation

pip install conseal

Prebuilt wheels contain the Rust backend. Building from source, e.g., on other platforms or from a clone of the repository, requires the Rust toolchain.

Quick start

JPEG steganography, with jpeglib to access the DCT coefficients:

import conseal as cl
import jpeglib

# load cover
im0 = jpeglib.read_spatial("cover.jpeg", jpeglib.JCS_GRAYSCALE)
jpeg = jpeglib.read_dct("cover.jpeg")

# simulate J-UNIWARD at 0.4 bits per nonzero AC coefficient
jpeg.Y = cl.juniward.simulate_single_channel(
    y0=jpeg.Y,               # DCT of cover luminance
    qt=jpeg.qt[0],           # quantization table
    x0=im0.spatial[..., 0],  # decompressed cover luminance
    alpha=0.4,               # embedding rate
    seed=12345,              # seed for PRNG
)

# save stego
jpeg.write_dct("stego.jpeg")

Spatial steganography:

import conseal as cl
import numpy as np
from PIL import Image

# load cover
x0 = np.array(Image.open("cover.png"))

# simulate HILL at 0.4 bits per pixel
x1 = cl.hill.simulate_single_channel(
    x0=x0,       # cover pixels
    alpha=0.4,   # embedding rate
    seed=12345,  # seed for PRNG
)

# save stego
Image.fromarray(x1).save("stego.png")

An example for each method is in the documentation.

Methods

Method Domain Paper
EBS: entropy block steganography JPEG link
F5 JPEG link
J-MiPOD: JPEG minimizing the power of optimal detector JPEG link
J-UNIWARD: JPEG universal wavelet relative distortion JPEG link
nsF5: no-shrinkage F5 JPEG link
UERD: uniform embedding revisited distortion JPEG link
HILL: high-low-low spatial link
HUGO: highly undetectable stego spatial link
MiPOD: minimizing the power of optimal detector spatial link
S-UNIGARD: spatial universal Gabor residual distortion spatial link
S-UNIWARD: spatial universal wavelet relative distortion spatial link
WOW: wavelet obtained weights spatial link
LSB: least significant bit replacement and matching JPEG, spatial

Which methods are verified against which reference implementation, with links to the unit tests, is shown on the title page of the documentation.

Scope

conseal simulates the embedding changes, which is what steganalysis research needs. For nsF5, it also embeds and extracts real messages with wet-paper codes. It is not a stego system for real-world use: it has no encryption, no message framing, and no key management.

Contributing

Contributions are welcome, see CONTRIBUTING.md. Please report bugs and deviations from reference implementations as GitHub issues.

Acknowledgements

Developed by Martin Beneš and Benedikt Lorch, University of Innsbruck.

The J-UNIWARD and nsF5 implementations are based on the original Matlab code by the Digital Data Embedding Lab at Binghamton University. We also thank Patrick Bas and Rémi Cogranne for sharing their implementations of UERD and EBS with us.

conseal is released under the Mozilla Public License 2.0.

Metadata

Release files for conseal 2026.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for conseal 2026.11
File Size Uploaded Provenance Actions
conseal-2026.11.tar.gz 775.9 kB Without provenance Details for conseal-2026.11.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for conseal 2026.11
File Interpreter ABI Platform Actions
conseal-2026.11-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details for conseal-2026.11-cp38-abi3-win_amd64.whl
conseal-2026.11-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.8 abi3 Linux glibc 2.17+ x86-64 Details for conseal-2026.11-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
conseal-2026.11-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details for conseal-2026.11-cp38-abi3-macosx_11_0_arm64.whl

Total release size: 4.1 MB

Release files / conseal-2026.11.tar.gz

Download URL conseal-2026.11.tar.gz
Size 775.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3206e9c3e1a88bed5acd676305f4726c733814a5bb0fa8817665e7fe7cdd529c
BLAKE2b-256 checksum
How to use checksums
9e965b3fb772f47c53878f94538a0dfc4f250b19afac8832c5c7d817170707cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / conseal-2026.11-cp38-abi3-win_amd64.whl

Download URL conseal-2026.11-cp38-abi3-win_amd64.whl
Size 1.0 MB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
063862b966de3d26aa7faf2aee3297418f01128109a76318ac3c7b22449c681c
BLAKE2b-256 checksum
How to use checksums
a630b52857f92989d86fb48d90e0758e9ab1bc4346ec5558fd17118ce752ede7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / conseal-2026.11-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL conseal-2026.11-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.2 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
aeb7c4400ee56b900a411f9618680d99a454966a97b34ef644c13ac048c6d44b
BLAKE2b-256 checksum
How to use checksums
74bbeb6ba4752f09672a7ea777714f75f71217f70745bb867e63232561ae9c75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / conseal-2026.11-cp38-abi3-macosx_11_0_arm64.whl

Download URL conseal-2026.11-cp38-abi3-macosx_11_0_arm64.whl
Size 1.1 MB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a10752cd5e3317961d564058c506bbd82a89cc36ee6ea8ffcd8fdbd4ac87586f
BLAKE2b-256 checksum
How to use checksums
94b707b7b123838dac2ac2f67a64991d5a9806b5ddbda6996c258b91772251d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for conseal 2026.11

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page