InPlainSight hides encrypted payload bytes inside lossless image files
It has two interfaces:
- A C CLI that does the actual image, crypto, capacity, hide, and extract work
- A Rust GTK4 app that provides a guided desktop workflow around the CLI
LSB means least significant bit
In an image, each pixel channel is stored as a number. Changing the smallest bit of that number usually changes the color so little that it is hard to notice by eye. LSB steganography uses that small bit position to carry hidden data
Example:
original byte: 11010110
hidden bit: 1
new byte: 11010111
Only the last bit changed
InPlainSight uses this idea, but it does not put raw payload data directly into pixels. The payload is first packed, encrypted, and authenticated. The encrypted container bits are then written into selected pixel bytes
Hide flow:
- Decode the cover image
- Read the payload as bytes
- Compress when it helps and the selected mode allows it
- Build a small metadata container
- Derive encryption keys from the passphrase
- Encrypt and authenticate the payload container
- Embed the encrypted container into pixel LSBs
- Write a lossless output image
Extract flow:
- Decode the stego image or split image folder
- Read embedded container bytes from the pixel LSBs
- Derive keys from the passphrase
- Verify and decrypt the container
- Write the recovered payload bytes
Wrong passphrases fail verification. Changed output images can also fail verification
LSB data is fragile
PNG, BMP, PPM, and lossless JPEG XL preserve the pixel bytes well enough for recovery. JPEG and most WebP usage are lossy, which means they can rewrite pixel values and destroy hidden bits
That is why JPEG and WebP are accepted as cover inputs but not as stego outputs
Capacity depends on the decoded cover image, selected LSB settings, container overhead, compression result, and payload size
The user does not choose whether the payload uses one image or many. Preflight calculates what is physically possible:
- If one image has enough room, one lossless output image is created
- If one image does not have enough room, the payload is split across every required output image
Every split output image is required for extraction
Cover input:
.png.jxl.bmp.ppm.jpg.jpeg.webp
Stego output:
.png.jxl.bmp.ppm
Build the optimized CLI:
makeThis writes ./inplainsight
Run full checks:
make checkmake check runs C sanitizer builds, C tests, clang-tidy, Rust formatting, Rust clippy, and Rust tests
Useful targets:
make gcc-sanitize
make clang-sanitize
make verify-c
make verify-rust
make cleanRequired:
- C11 compiler
makepkg-configlibsodiumlibpnglibjpeglibwebplibzstd
Optional:
- JPEG XL libraries for
.jxlsupport - Rust and GTK4 development packages for the UI
clang-tidyandintercept-buildfor full C verification
Preflight a cover and payload:
./inplainsight info \
--cover ~/Pictures/cover.png \
--payload ~/Documents/payload.pdf \
--method lsb \
--lsb-bits 1 \
--density 1.0 \
--jsonHide in one image:
./inplainsight hide \
--cover ~/Pictures/cover.png \
--payload ~/Documents/payload.pdf \
--output ~/Downloads/hidden_payload.png \
--passphrase-file ~/Documents/passphrase.txt \
--method lsb \
--compress autoHide across multiple images:
./inplainsight hide \
--cover ~/Pictures/cover.png \
--payload ~/Documents/payload.pdf \
--split auto \
--output-dir ~/Downloads/hidden_payload_images \
--output-template 'hidden_payload_part_%04u.png' \
--passphrase-file ~/Documents/passphrase.txt \
--method lsbExtract one image:
./inplainsight extract \
--input ~/Downloads/hidden_payload.png \
--output ~/Downloads/recovered_payload.pdf \
--passphrase-file ~/Documents/passphrase.txt \
--method lsbExtract split images:
./inplainsight extract \
--input-dir ~/Downloads/hidden_payload_images \
--output ~/Downloads/recovered_payload.pdf \
--passphrase-file ~/Documents/passphrase.txt \
--method lsb~/... paths are accepted by the CLI and UI
Run the GTK app:
cd ui
cargo runThe app follows the same pipeline as the CLI:
- Select files
- Run preflight
- Review the output plan
- Confirm and create output
- Payload bytes are encrypted before embedding
- Extraction verifies authentication before writing recovered bytes
- Output paths refuse overwrites
- Extracted payload files use private permissions
- Passphrases can be typed in the UI without being written to disk
- Generated split images must stay together and unchanged

