Recommend this page to a friend! |
![]() |
Info | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
![]() ![]() ![]() ![]() | Total: 637 This week: 1 | All time: 5,007 This week: 42![]() |
Version | License | PHP version | Categories | |||
steganography-kit 1.0.0 | BSD License | 5.4 | Algorithms, PHP 5, Graphics, Cryptogr... |
Description | Author | |
This package is a library of algorithms to encode messages in images. |
|
use steganography in php
hide and retrieve data in image
What is the best PHP image steganography class?
Hide user names and passwords inside images with steganography
SteganographyKit is a package with implementation several algorithms for image Steganography.
Steganography is the art and science of hiding information by embedding messages within other, seemingly harmless messages [1]. General overview of Steganography can be found in [3], [7]. SteganographyKit is used terminology described by Christian Cachin [1].
SteganographyKit contains:
Only for Suhosin patch special configuration should be added:
suhosin.srand.ignore = Off
suhosin.mt_srand.ignore = Off
The best way to install SteganographyKit is use composer:
{
"require": {
"picamator/steganographykit": "dev-master"
}
}
<?php
require __DIR__ . '/vendor/autoload.php';
$stegoContainer = new Picamator\SteganographyKit\StegoContainer();
// cover-image.png|.jpg|.gif - path to existing image to cover secretText
// stego-image.png - path where new stegoImage should be saved
$stegoContainer->encode('/path/to/cover-image.png',
'/path/to/stego-image.png', 'secret test');
// output raw image
$stegoContainer->renderImage();
<?php
require __DIR__ . '/vendor/autoload.php';
$stegoContainer = new Picamator\SteganographyKit\StegoContainer();
// stego-image.png
$secretText = $stegoContainer->decode('/path/to/stego-image.png');
echo $secretText;
<?php
require __DIR__ . '/vendor/autoload.php';
$stegoContainer = new Picamator\SteganographyKit\StegoContainer();
$stegoSystem = new Picamator\SteganographyKit\StegoSystem\SecretLsb();
// configure secret key
$secretKey = 123456;
$stegoKey = new Picamator\SteganographyKit\StegoKey\RandomKey($secretKey);
$stegoSystem->setStegoKey($stegoKey);
$stegoContainer->setStegoSystem($stegoSystem);
// it's not necessary to set second parameter if result will put in stream
$stegoContainer->encode('/path/to/cover-image.png', '', 'secret test');
// output raw image
header('Content-Type: image/png');
$stegoContainer->renderImage();
LSB method is modified least significant bit of coverText to get stegoText. Detailed description with example can be found in [4] or in "Steganography in Depth" section [5].
SteganographyKit has implementation of LSB with such conditions: * png, jpg or gif images as coverText, * text as a secretText.
Pure Steganography is a Steganography system that doesn't require prior exchange of some secret information before sending message [2].
Additionally it's possible to configurate channels that will be used in algorithm. For instance secretText can use only Red or Green and Blue or Red, Green, Blue. Moreover order in witch channels are used is important. So channels can be interpreted as Secret Key.
Note: Some researches use only Blue channel for steganography because that color is less perceived by human eye. Such conclusion is based on experiment [6]. But it should be taken critically because first of all stegoanalyze use computer technique to identify picture with hidden information, the second digital picture is displayed on a screen that has enough light.
For Secret Key Steganography is similar with Pure Steganography but Secret Key is used for encode-decode process [2].
SteganographyKit is used approach described in [2], accordingly them Secret Key is a seed for pseudo-random generator [8]. Such seed is used to create sequences of coordinates of coverText's pixels for covering secretText.
SteganogrpahyKit implements Secret Key Steganography with such conditions:
* SecretKey has limit: from 4 to 8 numbers. It uses as a seed for mt_srand
function.
Encode/Decode algorithm is differ from Pure Steganography by: * Method of choosing pixels in CoverText. In Pure Steganography it gets one by one but in Secret Key Steganography gets accordingly pseudo-random algorithm. * Method of use RGB channels. In Pure Steganography order is the same as user set but for Secret Key Steganography is changes accordingly pixel's coordinates.
If pixel coordinates X
and Y
and array of channels is ['red', 'green', 'blue']
then 'red' will have (X + Y) % 3
index in channel array the
channel that had (X + Y) % 3
would be moved to old red's place. For instance X = 4, Y = 10
them (2 + 10) % 3 = 2
then new channels array is
['blue', 'green', 'red']
. So using such approach secretText will be randomly spread through coverText bits but also through channels.
UML diagrams can be found in /doc/uml
folder:
BSD-3-Clause
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Documentation | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Lic. | License text | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Doc. | Documentation |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
![]() |
![]() | steganography-kit-2014-11-18.zip 401KB |
![]() | steganography-kit-2014-11-18.tar.gz 388KB |
![]() | Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
User Ratings | User Comments (1) | ||||||||||||||||||||||||||||||||||
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.