In painting, a pentimento (italian) is "the presence or emergence of earlier images, forms, or strokes that have been changed and painted over"
TLDR
Its a tool to hide encrypted data inside images and stay undetected.
This project aims to dive into the image steganography, researching and implementing various techniques using Golang. The purpose is to practice bitwise operations, cryptography and error correction.
Original Image |
Image with 212 Kb of hidden text |
Encode
go run main.go encode original.png secrets.txt
Decode
go run main.go decode hidden.png
Test fit size
go run main.go fit original.png
The Least Significant Bit (LSB) is a method used in digital steganography for hiding information within a digital file, such as an image or audio file.
In the context of an image, each pixel is represented by a binary number. The "least significant bit" is the last bit in this binary representation. The LSB method works by replacing these least significant bits with the bits from the data that needs to be hidden.
Because the least significant bit has the smallest impact on the overall value, changing it usually results in a minor alteration to the pixel's color. This change is typically so small that it's imperceptible to the human eye, making LSB a popular method for hiding information within images.
Generation and Exchange for One-Time-Pad Encryption Method
Summary from the paper
Discrete Haar Wavelet Transform (DHWT)
One-Time-Pad (OTP) Encryption
Highly Secured Information Exchange Algorithm (HSIEA)
Least Significant Bit (LSB) Method
Optimal Pixel Adjustment Process (OPAP)
Discrete Cosine Transform (DCT)
They propose a new method for integrating cryptography and steganography, which they call ISC (Image-based Steganography and Cryptography).
It uses images as cover objects for steganography and as keys for cryptography.
It's designed to work with bit streams scattered over multiple images or with still images. The method yields random outputs to make steganalysis more difficult and can cipher the message in a theoretically secure manner while preserving the stego image's statistical properties.
Basically this paper discusses the use of Reed-Solomon error correcting codes in steganography, which is the art of hiding information in a way that is not detectable to the naked eye. The authors propose a design that substitutes redundant Reed-Solomon codes with the steganographic message.
Ideas from the paper:
LSB Matching Revisited (LSBMR)
This scheme improves the security of LSB matching by reducing the number of changes made to the cover image, making it harder for steganalytic tools to detect hidden messages.
Enhanced LSBMR (ELSBMR)
This scheme further improves the security of LSBMR by using a pseudorandom number generator to determine the locations of the pixels to be changed, making it even more difficult for steganalytic tools to detect hidden messages.
Double-layered Embedding (DLE)
This scheme uses two different embedding rates for different parts of the image, improving the security of the hidden message by m 5EBF aking it harder to detect with steganalytic tools.
https://www.blackhatethicalhacking.com/tools/steganography-toolkits/
docker run -it --rm -v $(pwd)/data:/data dominicbreuker/stego-toolkit /bin/bash
zsteg -a out.png
Simple LSB zsteg detects 100%
After our custom LSB hashing algo zsteg shows garbage
- basic lsb
- custom lsb with partial 2lsb to avoid detection
- add compression
- add logger
- add tests
- add colored output
- add visual fill % on encoding
- encryption
- add metadata with date and filename (optional)
- add error correction
- support for multiple images on input