WELCOME

WELCOME TO TECH-VILLA.

SEARCH YOUR TECHNICAL STUFF

OR

BROWSE THROUGH LABELS IN SIDEBAR

HAPPY BLOGGING.

Thursday, November 5, 2009

Steganography

Steganography

Steganography is the art and science of writing hidden messages in such a way that no one, apart from the sender and intended recipient, suspects the existence of the message. The advantage of steganography, over cryptography alone, is that messages do not attract attention to themselves.

I am presenting a steganography software here. This software can be used for hiding a message behind or inside a picture. This encrypted picture will not be having any trace of message on it. Here I have made my own algorithm to encrypt the message within image.

In this algorithm, I am replacing the last bit of each byte of an image, with each of the bit of message. First complete byte of image is used to store the length of message. Second byte has been used for checking the status of Image (It is Encrypted or not).

Short code for the description is given here:-

*******************************************************************************

WritableRaster raster = image.getRaster();

DataBufferByte buffer = (DataBufferByte)raster.getDataBuffer();

byte img[]=buffer.getData();

byte msg[] = text.getBytes();

try

{

img[0]=(byte)(msg.length);

img[1]=0x00;

System.out.println("img[0]encry"+img[0]);

System.out.println("img[1]encry"+img[1]);

int count=2;

for(int i=0;i

{

for(int j=count,k=7;k>=0;j++,k--,count++)

{

byte tempmsg=(byte)((msg[i]>>>k));

tempmsg=(byte)((tempmsg)&(0x01));

byte tempimg=(byte)((img[j])&(0xFE));

img[j]=(byte)((tempmsg)|(tempimg));

}

}

*******************************************************************************

You can Download it from here:
http://rapidshare.com/files/302643178/Steg.exe


Try it enjoy hidden messages.





if this helped u bit, then let me know i will add complete tutorial

1 comment:

  1. This is great! I would love to see a full tutorial!

    ReplyDelete