Embeds data into png images
| doc | ||
| examples | ||
| src | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE.md | ||
| README.md | ||
png_data -- Data as images
png_data -- Data to PNG
png_data encodes a file into a png image.
Encoding
png_data -l rgb8 -e file.pdf -o output.png -c "(.pdf) documentation"
Where:
rgb8is the RGB layout with 8 bits per pixelfile.pdfis the file to store in the resulting imageoutput.pngthe resulting png image
Available layouts
rgb[8|16]RGB with 8 or 16 bits per channelrgba[8|16]RGBA with 8 or 16 bits per channel (densest layout)g[1|2|4|8|16]Grayscale with 1-16 bits per channelga[1|2|4|8|16]Grayscale Alpha with 1-16 bits per channel
Decoding
png_data -d output.png -o original.pdf
Where:
output.pngthe encoded png imageoriginal.pdfthe resulting decoded file
Getting header information
png_data -z output.png
output.pngapng_dataencoded image This will display the header of the encoded file, as well as the comment.
png_embed -- Embed files into mostly innocent PNG
png_embed encodes a file into an existing png image making it possible to recover that file by passing the image around.
Current algorithm:
loEmbeds data in the colors channels lowest bits.
See examples/test.sh for usage.
Encoding an image
png_embed -l lo2 -e embed.tar original.png -o output.png -c "(.tar) archive"
Where:
lo2is theLoalgorithm using the 2 lowest bitsembed.tarthe file to embed into the final imageoriginal.pngthe original PNG fileoutput.pngthe resulting PNG file"(.tar) archive"an optional comment
Additional Options
-s|--seed TXTSets the random seed for determining the payload blocks. By default the random seed is "WIDTHxHEIGHT" where WIDTH and HEIGHT are the original image's dimensions.-n|--entropyFills unused payload blocks with random data that tries to match the payload's entropy. This feature is experimental and may not fully protect against entropy based steganography-detection. We highlihy recommend that the payload has maximal entropy, which can be achieved by compressing it.
Decoding an image
png_embed -l lo2 -d image.png -o embed.tar
Where:
lo2is theLoalgorithm using the 2 lowest bitsimage.pngthe PNG containing an embedembed.tarthe extracted embedded file
Additional Options
-s|--seed TXTSets the random seed for determining the payload blocks. By default the random seed is "WIDTHxHEIGHT" where WIDTH and HEIGHT are the original image's dimensions.
Getting header information
png_embed -l lo2 -z output.png
lo2is theLoalgorithm using the 2 lowest bitsoutput.pngapng_embedencoded image This will display the header of the encoded file, as well as the comment.
Additional Options
-s|--seed TXTSets the random seed for determining the payload blocks. By default the random seed is "WIDTHxHEIGHT" where WIDTH and HEIGHT are the original image's dimensions.
License
png_data is licensed under the GNU AGPL version 3 or later. See LICENSE.md for more information.
License for third-party dependencies can be accessed via cargo license


