Skip to main content

phasm_core/stego/stc/
mod.rs

1// Copyright (c) 2026 Christoph Gaffga
2// SPDX-License-Identifier: GPL-3.0-only
3// https://github.com/cgaffga/phasmcore
4
5//! Syndrome-Trellis Coding (STC) for minimal-distortion embedding.
6//!
7//! STC encodes a message into a cover sequence by finding the minimum-cost
8//! modification pattern via the Viterbi algorithm. The trellis has `2^h`
9//! states, where `h` is the constraint length (typically 7, giving 128 states).
10//!
11//! The submatrix H-hat defines the parity-check structure. Each group of `w`
12//! cover elements produces one message bit. The encoder finds the stego
13//! sequence that matches all message bits with minimum total distortion cost.
14//!
15//! References:
16//! - Filler, Judas, Fridrich. "Minimizing Additive Distortion in Steganography
17//!   Using Syndrome-Trellis Codes", IEEE TIFS, 2011.
18
19pub mod hhat;
20pub mod embed;
21pub mod extract;
22pub mod streaming;
23pub mod streaming_segmented;