palettes and gif
play

Palettes and GIF CSM25 Secure Information Hiding Dr Hans Georg - PowerPoint PPT Presentation

Palettes and GIF CSM25 Secure Information Hiding Dr Hans Georg Schaathun University of Surrey Spring 2007 Dr Hans Georg Schaathun Palettes and GIF Spring 2007 1 / 30 Learning outcomes Learn how images are represented using a palette Get


  1. Palettes and GIF CSM25 Secure Information Hiding Dr Hans Georg Schaathun University of Surrey Spring 2007 Dr Hans Georg Schaathun Palettes and GIF Spring 2007 1 / 30

  2. Learning outcomes Learn how images are represented using a palette Get an overview of hiding techniques in GIF et c. Understand how grayscale steganography can be adapted for palette images Dr Hans Georg Schaathun Palettes and GIF Spring 2007 2 / 30

  3. Colour palettes The image format Outline Colour palettes 1 The image format The palette in Matlab Steganography in the palette Steganography in the pixmap 2 What about LSB? Palette sorting Steganalysis of palette images 3 Dr Hans Georg Schaathun Palettes and GIF Spring 2007 3 / 30

  4. Colour palettes The image format The colour palette 0 1 The palette is a table of colours 2 Typically 256 for images 3 Sometimes 8 or 16 for screen view Each colour has an index 4 The palette can be stored as 5 array of (say) 256 entries 6 each entry: RGB colour . . . using 3 × 8 bits . . . . . . 255 Dr Hans Georg Schaathun Palettes and GIF Spring 2007 4 / 30

  5. Colour palettes The image format Using the colour palette The GIF file The GIF file format uses the colour palette . . . in the spatial domain Like the grayscale image, GIF is a matrix, I entry ( x , y ) defines the colour of pixel ( x , y ) however I x , y is the index of a colour in the palette A GIF file has to store both A palette The pixel matrix (pixmap) Dr Hans Georg Schaathun Palettes and GIF Spring 2007 5 / 30

  6. Colour palettes The image format Which is best? GIF? JPEG? ‘true colour’? GIF saves space compared to ‘true colour’ Perfect representation of selected colours Perfect for drawings and computer graphics where only selected colours are used JPEG is better for photos Colours are ‘truer’ can ‘blur’, losing contrast and detail Dr Hans Georg Schaathun Palettes and GIF Spring 2007 6 / 30

  7. Colour palettes The palette in Matlab Outline Colour palettes 1 The image format The palette in Matlab Steganography in the palette Steganography in the pixmap 2 What about LSB? Palette sorting Steganalysis of palette images 3 Dr Hans Georg Schaathun Palettes and GIF Spring 2007 7 / 30

  8. Colour palettes The palette in Matlab Loading a palette image Remember to store the palette [pixmap,palette] = imread ( ’picture.gif’ ) imshow ( pixmap, palette ) otherwise, treated as a weird grayscale image You can work on palette and pixmap separately >> [X,P] = imread ( ’krinslogo.gif’ ) ; >> whos X P Name Size Bytes Class Attributes P 256x3 6144 double X 120x90 10800 uint8 Dr Hans Georg Schaathun Palettes and GIF Spring 2007 8 / 30

  9. Colour palettes The palette in Matlab Exercise Preliminaries Suppose a GIF file uses a 8-bit palette. How much space does this GIF file save compared to a 24-bit true-colour image? Consider a 64 × 64 image and a 512 × 768 image. Give the answer as a percentage. How do you generate a random binary message (bit string) in matlab? Look up in the help system and find the necessary commands to generate a random N binary (logical) matrix. Dr Hans Georg Schaathun Palettes and GIF Spring 2007 9 / 30

  10. Colour palettes Steganography in the palette Outline Colour palettes 1 The image format The palette in Matlab Steganography in the palette Steganography in the pixmap 2 What about LSB? Palette sorting Steganalysis of palette images 3 Dr Hans Georg Schaathun Palettes and GIF Spring 2007 10 / 30

  11. Colour palettes Steganography in the palette A simple idea Data hiding is possible in the palette leaving the pixmap unaltered How? Any ideas? Two basic ideas changing colours changing order Main disadvantage: low capacity Dr Hans Georg Schaathun Palettes and GIF Spring 2007 11 / 30

  12. Colour palettes Steganography in the palette A simple idea Data hiding is possible in the palette leaving the pixmap unaltered How? Any ideas? Two basic ideas changing colours changing order Main disadvantage: low capacity Dr Hans Georg Schaathun Palettes and GIF Spring 2007 11 / 30

  13. Colour palettes Steganography in the palette A simple idea Data hiding is possible in the palette leaving the pixmap unaltered How? Any ideas? Two basic ideas changing colours changing order Main disadvantage: low capacity Dr Hans Georg Schaathun Palettes and GIF Spring 2007 11 / 30

  14. Colour palettes Steganography in the palette Changing colours Minor changes to palette colours as if they were pixels in ‘true colour’ only difference: there are only (say) 256 entries For instance, LSB Capacity 3 × 256 bits ( = 768 bits) Dr Hans Georg Schaathun Palettes and GIF Spring 2007 12 / 30

  15. Colour palettes Steganography in the palette Changing order Define a canonical colour order i.e. obtained by a deterministic sorting algorithm always same order, regardless of input order Assign colour indices according to canonical order For each message, assign a permutation P on { 1 , 2 , 3 , . . . , N } ( N is palette size) Shuffle the palette using the permutation of the message Decoder can find canonical order (deterministic) and hence deduce P which maps to the message. N ! = 1 · 2 · 3 · . . . · N possible messages Approx. 1684 bits for an 8-bit palette Dr Hans Georg Schaathun Palettes and GIF Spring 2007 13 / 30

  16. Colour palettes Steganography in the palette Large-scale data hiding pixmap is main part of palette image file to hide a lot of data, the pixmap must be used the palette is small can cover a correspondingly small amount of data Dr Hans Georg Schaathun Palettes and GIF Spring 2007 14 / 30

  17. Steganography in the pixmap What about LSB? Outline Colour palettes 1 The image format The palette in Matlab Steganography in the palette Steganography in the pixmap 2 What about LSB? Palette sorting Steganalysis of palette images 3 Dr Hans Georg Schaathun Palettes and GIF Spring 2007 15 / 30

  18. Steganography in the pixmap What about LSB? First attempt: LSB We still have a pixmap as before Logical to attempt LSB in the colour indices in selected pixels What happens? Dr Hans Georg Schaathun Palettes and GIF Spring 2007 16 / 30

  19. Steganography in the pixmap What about LSB? Exercise LSB test Take any GIF image from the web. Some test GIF images can be found on the module web pages. Make stego-images by embedding random binary messages of length 10 % , 30 % , 50 % and 75 % of capacity in the least significant bit. View the images. What does it look like? Extract the message again. Do you get the same message back? Hint: Reuse functions from previous exercises. Dr Hans Georg Schaathun Palettes and GIF Spring 2007 17 / 30

  20. Steganography in the pixmap What about LSB? What it looks like Dr Hans Georg Schaathun Palettes and GIF Spring 2007 18 / 30

  21. Steganography in the pixmap What about LSB? So, what do we do? Green areas, are not too bad Visible, but still green Brown is terrible It is suddenly green Why is this? Neighbour colour in the palette, can be Similar or far away Somehow, we have to change to a similar colour Dr Hans Georg Schaathun Palettes and GIF Spring 2007 19 / 30

  22. Steganography in the pixmap What about LSB? So, what do we do? Green areas, are not too bad Visible, but still green Brown is terrible It is suddenly green Why is this? Neighbour colour in the palette, can be Similar or far away Somehow, we have to change to a similar colour Dr Hans Georg Schaathun Palettes and GIF Spring 2007 19 / 30

  23. Steganography in the pixmap What about LSB? So, what do we do? Green areas, are not too bad Visible, but still green Brown is terrible It is suddenly green Why is this? Neighbour colour in the palette, can be Similar or far away Somehow, we have to change to a similar colour Dr Hans Georg Schaathun Palettes and GIF Spring 2007 19 / 30

  24. Steganography in the pixmap Palette sorting Outline Colour palettes 1 The image format The palette in Matlab Steganography in the palette Steganography in the pixmap 2 What about LSB? Palette sorting Steganalysis of palette images 3 Dr Hans Georg Schaathun Palettes and GIF Spring 2007 20 / 30

  25. Steganography in the pixmap Palette sorting Three possible solutions Colour reduction Colour sorting Beyond sorting Dr Hans Georg Schaathun Palettes and GIF Spring 2007 21 / 30

  26. Steganography in the pixmap Palette sorting Reduce the palette An ancient solution Reduce colour depth by 50 % 256 colours → 128 colours Duplicate each colour (or use a slight variation of it) Such that colour i and colour i + 1 are identical (or almost) Now LSB embedding is hardly perceptible visually How do you steganalyse it? Dr Hans Georg Schaathun Palettes and GIF Spring 2007 22 / 30

  27. Steganography in the pixmap Palette sorting Reduce the palette An ancient solution Reduce colour depth by 50 % 256 colours → 128 colours Duplicate each colour (or use a slight variation of it) Such that colour i and colour i + 1 are identical (or almost) Now LSB embedding is hardly perceptible visually How do you steganalyse it? Dr Hans Georg Schaathun Palettes and GIF Spring 2007 22 / 30

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend