Stego was created to apply steganographic principles for embedding hidden data within image files
Supports a carrier image in PNG, JPEG, or BMP formats and outputs stego-images containing embedded secret data
Implements Least Significant Bit (LSB) and Bit-Plane Complexity Segmentation (BPCS) algorithms
Live website: https://ltlaitoff.github.io/stego/
Image of Rick Astley from the clip "Never Gonna Give You Up"
A message to hide is the lyrics of the song "Never Gonna Give You Up"
Original image:
On the left is the image with hidden data, and on the right is the same image with highlighted pixels that were changed by using an application debug:
You can try to restore the original message by using the S50T25E0N0H2V1P3I0CRCGCB LSB key
On the left is the image with hidden data, and on the right is the difference between an original image as a PNG (because the stego-image is a PNG) and the output of BPCS:
Application architecture was designed to be scalable in the future
The main module of the application is core, which consists of all steganography logic
The core module also has two sub-modules, lsb and bpcs, where each one implements an algorithm for hiding information
To visually interact with the application, a website was created which communicates with core via the wasm.go adapter. And because the website runs in the browser, Go code is transformed into a WASM representation as well
Because of this approach, it's very easy to add another user of core, for example a CLI, or add a new algorithm for hiding information
To run the project locally, you need to install Go, TinyGo, NodeJS, and pnpm. You can find versions in tool_version
To use Go WASM in the browser, we need to add the wasm_exec.js file. This file depends on the compiler version, so if you change the compiler version or the compiler itself, you need to change this file as well
For TinyGo of version from tool_version this file is already saved in repository
To load the file from TinyGo you can run the command (be sure the Makefile has access to environment variables):
make initAll frontend code located in the website directory
To install pnpm dependencies:
pnpm installBefore running the website, you need to generate a WASM file. To do this, run the command:
make build-wasmThis command will create a main.wasm file in the website/src/ directory
The project doesn't have hot reload after updating Go code, so you need to run this command after each change
The frontend source code itself doesn't need any additional transformation to run, because it was written in pure JS
But we cannot just open the index.html file in a browser and expect it to run, because of CORS. Check StackOverflow for more details
So, we need to start some sort of server, for example, live-server:
npx live-server website/src/To build the project for production, run the command:
make buildThis script will create a directory dist with the website output code