Documentation
¶
Overview ¶
Package f5 is the umbrella module for the F5 JPEG steganography toolkit.
The module is intentionally split into independent, narrowly-scoped packages so that a build only ever compiles the capability it imports. There is no umbrella facade here on purpose: importing this root package pulls in nothing but documentation, and importing one capability (for example embed) never compiles another (for example [detect] or [encode]).
Packages ¶
embed F5 message embedding into JPEG DCT coefficients (Westfeld 2001).
The lightest package: it operates on []int16 coefficients and never
pulls in a JPEG codec.
extract F5 message extraction from JPEG DCT coefficients.
encode Byte-identical re-implementation of the James R. Weeks JPEG encoder
used by the original f5.jar, suitable for producing carriers.
detect Statistical detection of F5 steganography using the Fridrich,
Goljan and Hogea (2002) attack. Pure statistics, no machine learning.
Design constraints ¶
Every package compiles to TinyGo/WebAssembly: no cgo, no unsafe, no panics in library code, and all errors are returned rather than swallowed. Optional integrations (structured logging and localized error messages) are injected through small interfaces and default to no-ops, so a minimal build links neither a logger nor the localization tables.
See the package-level documentation of each capability for details and the reference papers in the module's docs directory.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
f5
command
Command f5 is a unified front-end for the F5 JPEG steganography toolkit.
|
Command f5 is a unified front-end for the F5 JPEG steganography toolkit. |
|
wasm
command
Command wasm exposes the f5 light-detection path (structural f5.jar/PixelKnot fingerprint + the Fridrich β attack) to the browser as a syscall/js function, for the f5-scan extension.
|
Command wasm exposes the f5 light-detection path (structural f5.jar/PixelKnot fingerprint + the Fridrich β attack) to the browser as a syscall/js function, for the f5-scan extension. |
|
wasmneural
command
Command wasmneural exposes the FULL f5 neural detection pipeline to the browser — the same pipeline the `f5` binary runs: the chroma-subsampling rule-out, the structural f5.jar/PixelKnot fingerprint, the embedded Tier-2 neural ensemble + recompression gate (ARTIFACT routing), all fused through the shared fuse package so the verdict matches the binary byte-for-byte on the same image.
|
Command wasmneural exposes the FULL f5 neural detection pipeline to the browser — the same pipeline the `f5` binary runs: the chroma-subsampling rule-out, the structural f5.jar/PixelKnot fingerprint, the embedded Tier-2 neural ensemble + recompression gate (ARTIFACT routing), all fused through the shared fuse package so the verdict matches the binary byte-for-byte on the same image. |
|
Package steganalysis provides statistical detection of F5 steganography in JPEG images.
|
Package steganalysis provides statistical detection of F5 steganography in JPEG images. |
|
internal/calibration
Package calibration implements double compression detection and multi-quality-factor calibration for JPEG steganalysis.
|
Package calibration implements double compression detection and multi-quality-factor calibration for JPEG steganalysis. |
|
internal/codec
Package codec provides the JPEG adapter layer for the steganalysis package.
|
Package codec provides the JPEG adapter layer for the steganalysis package. |
|
internal/estimator
Package estimator implements the core estimation algorithms for F5 steganalysis.
|
Package estimator implements the core estimation algorithms for F5 steganalysis. |
|
internal/jpegscan
Package jpegscan is a lightweight, allocation-frugal JPEG marker scanner used by the detection-signature layer.
|
Package jpegscan is a lightweight, allocation-frugal JPEG marker scanner used by the detection-signature layer. |
|
Package embed implements the F5 steganographic algorithm for embedding hidden messages into JPEG DCT coefficients.
|
Package embed implements the F5 steganographic algorithm for embedding hidden messages into JPEG DCT coefficients. |
|
examples
|
|
|
detect
command
Command detect-example runs the Fridrich (2002) statistical F5 detector over a freshly encoded, clean JPEG and prints the verdict.
|
Command detect-example runs the Fridrich (2002) statistical F5 detector over a freshly encoded, clean JPEG and prints the verdict. |
|
embed
command
Command embed-example shows the minimal F5 embedding flow.
|
Command embed-example shows the minimal F5 embedding flow. |
|
encode
command
Command encode-example encodes a synthetic image to a JPEG whose bytes match the original James R. Weeks / f5.jar encoder, then prints the output size.
|
Command encode-example encodes a synthetic image to a JPEG whose bytes match the original James R. Weeks / f5.jar encoder, then prints the output size. |
|
roundtrip
command
Command roundtrip-example embeds a message and extracts it back, exercising the embed and extract packages together.
|
Command roundtrip-example embeds a message and extracts it back, exercising the embed and extract packages together. |
|
Package extract implements the F5 steganographic algorithm for extracting hidden messages from JPEG DCT coefficients.
|
Package extract implements the F5 steganographic algorithm for extracting hidden messages from JPEG DCT coefficients. |
|
Package fuse is the F5 detection decision layer: it fuses the three detectors (the neural ensemble + recompression gate, the Fridrich β attack, and the structural f5.jar/PixelKnot fingerprint) into one verdict and likelihood score.
|
Package fuse is the F5 detection decision layer: it fuses the three detectors (the neural ensemble + recompression gate, the Fridrich β attack, and the structural f5.jar/PixelKnot fingerprint) into one verdict and likelihood score. |
|
Package gate runs the trained F5 steganalysis CNN models in pure Go (no cgo), over the standalone ONNX engine github.com/0verkilll/onnx.
|
Package gate runs the trained F5 steganalysis CNN models in pure Go (no cgo), over the standalone ONNX engine github.com/0verkilll/onnx. |
|
embedded
Package embedded ships the redesign_v5 detection models inside the binary (compiled in with the standard library's embed package), so the full pipeline runs turnkey with no external files.
|
Package embedded ships the redesign_v5 detection models inside the binary (compiled in with the standard library's embed package), so the full pipeline runs turnkey with no external files. |
|
Package i18nx is the opt-in localization loader for the F5 toolkit's embed and extract packages.
|
Package i18nx is the opt-in localization loader for the F5 toolkit's embed and extract packages. |
|
internal
|
|
|
coefficient
Package coefficient adapts the f5coefficient primitive to the internal API used by the embed and extract capabilities.
|
Package coefficient adapts the f5coefficient primitive to the internal API used by the embed and extract capabilities. |
|
logx
Package logx provides a tiny, thread-safe holder for an injected logger.Logger.
|
Package logx provides a tiny, thread-safe holder for an injected logger.Logger. |
|
permutation
Package permutation provides the shared F5 permutative-straddling primitives: PRNG seeding, Fisher-Yates permutation generation, and the JPEG de-zigzag index transform.
|
Package permutation provides the shared F5 permutative-straddling primitives: PRNG seeding, Fisher-Yates permutation generation, and the JPEG de-zigzag index transform. |
|
valid
Package valid holds the shared input-validation rules for F5 coefficients and passwords.
|
Package valid holds the shared input-validation rules for F5 coefficients and passwords. |