Reference: Python Implementation
LSB substitution and PVD are applied. In PVD, adaptive non-overlapping 3x3 pixel blocks or a combination of 3x3 and 2x2 blocks are used in raster fashion.
As of now extraction is done using the generated log file containing data locations using Python.
- libpng-dev (C PNG Library)
- libmath (C Inbuilt Math Library)
- (Optional) openmp (C Parallelization)
- PIL (Python2/3)
Note: Makefile uses text
as input to C binary
$ echo 'Hello world!' > text
$ make (icc/strip-icc/gcc/strip-gcc/parallel-gcc/secure-gcc/all-gcc) (run) (verify)
Embedded data Log can be found in: embed.log
Note: Makefile uses embedded.png
and text
as inputs below
$ python3 extract.py (Embedded_Image) (Output_File)
extract.py uses embed.log from the same directory
-
Fractal bitmap generation
- The binary uses
srand(time(NULL))
to choose a random fractal algorithm. - Randomly generate 2 of the quartenion vector directions
- Use fractal algorithm to iterate bitmap pixel colours of set dimensions
- The binary uses
-
Check bitmap generation
- Anti-alias bitmap with adjacent pixels
- Verify bitmap is not generated entirely black
-
Randomly choose 3x3 grids within bitmap to embed
- Using floored division of the bitmap dimensions, generate non-repeating
(x//3, y//3)
coordinates - Use randomly chosen
(x//3, y//3) * 3
3x3 matrix to embed bits
Example:
i. ii. 1 - - ... - 2 - ... - 3 - ... ... ... ... ... 1 1 1 - - - - - - ... 1 1 1 - - - - - - ... 1 1 1 - - - - - - ... - - - 2 2 2 - - - ... - - - 2 2 2 - - - ... - - - 2 2 2 - - - ... - - - 3 3 3 - - - ... - - - 3 3 3 - - - ... - - - 3 3 3 - - - ... ... ... ... ... ... ... ... ... ... ... - Using floored division of the bitmap dimensions, generate non-repeating
-
Embed bits
- Classify bits to determine how much to embed
- Determine capacity of RGB bits can be embedded using reference to center of the 3x3 matrix
- Embed bits based on chosen 3x3 matrices (or 2x2 within 3x3 matrices)
Example:
x x x - - - - - - ... x x x - - - - - - ... x x x - - - - - - ... - - - x x - - - - ... - - - x x - - - - ... - - - - - - - - - ... - - - x x x - - - ... - - - x x x - - - ... - - - x x x - - - ... ... ... ... ... ... ... ... ... ... ... -
Log embedded bits
- Log variables (x, y), RGB pixel bit used, embedded length and amount of padding used, change in index of input
- Log variables as concatenated binary bits to reduce logging
-
Extract embedded bits
- Using index of input embedded, it can determine how many bits are used for each input character
- Retrieve 3x3 matrix used from (x, y), or 2x2 within 3x3 matrix
- As some RGB pixels may have values smaller than the bits to embed, splice the embedded bits into its original length
- No check for whether text string exceeds embedding capacity
- Long text strings just below embedding capacity might get corrupted in the process
- Capacity Enlargement Of The PVD Steganography Method Using The GLM Technique
- Digital Image Steganography Using LSB Substitution, PVD, and EMD
- High Capacity Image Steganography Using Modified LSB Substitution and PVD against Pixel Difference Histogram Analysis
- Adaptive PVD Steganography Using Horizontal, Vertical, and Diagonal Edges in Six-Pixel Blocks
- Digital Image Steganography Using Eight-Directional PVD against RS Analysis and PDH Analysis
- A Steganographic Method Based on Pixel-Value Differencing and the Perfect Square Number
- An RGB colour image steganography scheme using overlapping block-based pixel-value differencing