stegano_rs
stegano_rs is a Rust library for steganography. It provides various techniques for hiding and extracting data using low-level methods, such as bitplane manipulation and pixel value differencing (PVD).
Most methods and structures in this library operate on u8 array or byte slices, giving users the freedom to apply them not only to images, but also to any type of binary data such as audio, video, or custom formats.
📦 Features
This library offers multiple steganographic algorithms and flexible embedding locator strategies to control how and where data is hidden.
Supported Algorithms
🔹 Bitplane Methods
bitplane_embed: general embedding using bitplanes.bitplane_extract: general extraction from bitplanes.embed_lsb: embed using the least significant bit.extract_lsb: extract from the least significant bit.embed_msb: embed using the most significant bit.extract_msb: extract from the most significant bit.
Configuration:
BitplaneOptions: options to customize bitplane-based embedding.
🔹 Pixel Value Differencing (PVD)
pvd_embed: embed data using pixel value differences.pvd_extract: extract data using pixel value differences.
Configuration:
PvdOptions: options for PVD configuration.
🚀 Installation
Add the following to your Cargo.toml:
[]
= "0.1.0"
📘 Example
- Bitplane (LSB, MSB)
use ;
use ;
- PVD
use ;
use ;
For more examples, please read the documentation or the tests
🔍 Embedding Locators
Locators define how the data is traversed during the embedding process.
Available implementations of the EmbeddingLocator trait:
LinearTraversal: simple sequential traversal.PositionListTraversal: custom list-based traversal.HeatmapTraversal: heatmap-based traversal for prioritized embedding regions.
🧱 Project Structure
Modules:
bitplane: contains bitplane embedding/extraction functions and configuration.pvd: contains pixel value differencing methods.embedding_locator: defines traversal logic and strategies.
🤝 Contributions
Contributions are welcome! If you wish to improve stegano_rs, feel free to open a pull request on GitHub.
📄 License
This project is licensed under the MIT License. See the LICENSE file for more details.