III. Steganography in Bit map files

Bit map file format

            Windows bitmap files are stored in a device-independent bitmap (DIB) format that allows Windows to display the bitmap on any type of display device. The term "device independent" means that the bitmap specifies pixel color in a form independent of the method used by a display to represent color. The default filename extension of a Windows DIB file is .BMP.

Hide and unhide algorithms.

 

                The hide and unhide algorithms  are similar to algorithms for hiding and unhiding in wave file

 

 

IV. Steganography in 256-colour(8-bit) bit map files

 

 

            The 256 colour bmp file format is one of the most widely used image formats in the internet when compared to the 24-bit file format just because the size of the file is comparatively less .Here we need only one byte to represent each pixel while in the 24 bit format we need 3 bytes to represent a pixel. The format is similar to that of 24 bit format except that there is a palette after the info header which consists of all the 256 colors, each colour represented by 4 bytes – 3 bytes for specifying R G B and one byte is reserved and must always be set to zero. The data part consists of pixels which are pointers to this palette.

 

 

 

The Problem

 

Applying LSB insertion will be very difficult in the 256 file format because of the palette. As each pixel is mapped into the palette, a change of the least significant bit may cause that pixel to point to the next or the previous colour in the palette. This color may completely different from the present colour. If this happens then the image will get distorted and it becomes easy for anyone to suspect something hidden in the image. The basic idea of steganography will be lost.

 

The Solution

 

The above problem can be solved by reducing the colors by quantization and fill up the palette with these colours with each color repeated 2 times. The pixels are then pointed to the first of the two colours. Now even if LSB insertion is applied the pixel may point another colour which is the same as that of the original colour. This is illustrated in the steps below

 

         Quantization—Reduction of colours in an image.

         Quality of resulting image depends on the quantization algorithm.

         Here we reduce 256 colours to 128 i.e. half the original.

         A new palette is generated with the 128 colours.

         Each colour occurs 2 times (in pairs) so as to fill up the 256 spaces in the palette.

         Remap all pixels to the new palette.

         Each pixel is mapped to the first colour of each pair of colours.

 

Quantization Algorithm

 

         Put all the 256 colours of the palette into a linked list.

         Calculate the amount of pixels mapped to each colour and store in linked list.

         Delete nodes not mapped by any pixel.

         Sort the linked list by the number of pixels

         Calculate distance D b/w each colour and all others in the palette.

          D˛=(R1-R2)˛+(G1-G2) ˛+(B1-B2) ˛

         Eliminate the colours whose D˛<Quality Factor.

         Create new palette by taking the first 128 colours of the modified linked list.

         Each colour is put in pairs.

         If colours<128 black is inserted at end.

         Remap pixels to new palette by comparing with original image & using distance formula.

          Pixel mapped to first colour of a pair.

         Now our image is ready for hiding data.

 

The Quality Factor can be selected to that value giving the maximum performance.

More the quality factor, the more will be colours deleted and so less will be the clarity of the image. We have tested and taken the quality factor to be 200. Now LSB insertion can be applied for steganography as explained before.

 

Data Encryption Standard ( D.E.S)

 

Refer these websites for DES encrytion algorithm.

   http://www.aci.net/kalliste/des.htm
    http://www.tropsoft.com/strongenc/des.htm
   http://www.eventid.net/docs/desexample.htm
 

 

 

 

 

Home     Previous Page