Basics of Steganography CSM25 Secure Information Hiding Dr Hans Georg Schaathun University of Surrey Spring 2009 – Week 1 Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 1 / 54 The module Free thinkers and free speech Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 3 / 54 The module The other side Both clips: The Independent, Friday 27 October 2006. Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 4 / 54 The module The Outcomes and Expectations Pass (50+) Implement simple stego-systems and steganalysis techniques Be able to interpret steganalytic data Use the basic terminology correctly and unambiguously Merit (60+) (additionally) Program cleanly and show good structure in any delivarables. Have some (limited) wider overview of steganography and its relations to other research areas. Distinction (70+) (additionally) Be able to assess security properties in a communications system, and assess security needs in an application. Be able to discuss stego-systems in unambiguous terms, and choose appropriate approaches for given application needs. Be able to generalise theories and techniques in steganography, and relate and contrast different approaches. Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 5 / 54
12
Embed
The module Free thinkers and free speech Basics of ... · PDF fileSteganography models Threats and Controls Threats and controls CSM27 Re-cap – See Pfleeger&Pfleeger Ch. 1 Assets
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Basics of SteganographyCSM25 Secure Information Hiding
Dr Hans Georg Schaathun
University of Surrey
Spring 2009 – Week 1
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 1 / 54
The module
Free thinkers and free speech
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 3 / 54
The module
The other side
Both clips:The Independent, Friday 27 October 2006.
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 4 / 54
The module
The Outcomes and Expectations
Pass (50+)Implement simple stego-systems and steganalysis techniquesBe able to interpret steganalytic dataUse the basic terminology correctly and unambiguously
Merit (60+) (additionally)Program cleanly and show good structure in any delivarables.Have some (limited) wider overview of steganography and itsrelations to other research areas.
Distinction (70+) (additionally)Be able to assess security properties in a communications system,and assess security needs in an application.Be able to discuss stego-systems in unambiguous terms, andchoose appropriate approaches for given application needs.Be able to generalise theories and techniques in steganography,and relate and contrast different approaches.
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 5 / 54
The module
Exercises and Assessment
Weekly exercises One exercise sheet given after each lecture. This isto be done at home, and peer-assessed and/or discussedin the next session.
Portfolio (50%) To be handed in at the end of module, summarisingyour learning, including answers to some of the weeklyexercises. (As in csm27.)
Poster (20% collective mark) A poster on a chosen topic is to beprepared in groups of 3-5 and presented to the class inWeek 12.
Exam (30%) A short (112h) written exam at the end of term. This exam
will test your ability to interpret steganalytic data similar towhat you produce in the lab-based exercises. (It may alsotest other areas of the syllabus.)
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 6 / 54
The module
Lesson Objectives
After the session, you shouldhave an initial understanding of what steganography is and how itcould be usedbe able to write readable and reusable Matlab code, usingcomments, inline help text, and functions.understand how any piece of information can be represented indifferent ways.
In particular, convert text to binary.have implemented LSB embedding using the principles above
(by the end of Week 2, using the lab session)
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 7 / 54
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 15 / 54
Steganography models What steganography is
The data hiding systemWatermarking System
Embedding Extractor
Message RecoveredKey
File
Security depends on the confidentiality of the algorithm.
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 16 / 54
Steganography models What steganography is
Watermarking vs. Steganography
Watermarking: the cover-image is essentialTwo receivers:
One observes the cover-imageOne extracts the hidden message
Minimum distortion is importantSteganography: What is the use of cover-image at receiver?
Bob wants the messageThe image is a red herringDistortion (relative the original cover) is irrelevant
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 17 / 54
Steganography models What steganography is
Two key differencesWatermarking vs. Steganography
1 Cover-imageimportant in watermarkingmeaningless in steganography
2 AttackerSteganography: determine whether secret information exists or notWatermarking: various other goals
Change cover-textRemove watermarkChange watermark
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 18 / 54
Steganography models What steganography is
SteganographyCryptographic view
A Secret-Key stego-system (by synthesis) is S = (C, M, K , E , D)where
C : set of cover textsM : set of messagesK : key space (set of possible keys)E is an encoding function, E : K ×M → CD is a decoding function, D : K × C → M
such thatPr(D(k , E(k , m)) = m) ≈ 1.
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 19 / 54
Steganography models What steganography is
Steganography from Information Hiding
Secret-Key Stego-system by modificationThe encoding function takes a cover text from C as input
E : K × C ×M → C
Pure stego-system (by modification)The encoding function takes a cover text from C as input, and nokey is used
E :C ×M → CD :C → M
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 20 / 54
Steganography models What steganography is
On Pure Stegosystems
Bob has no advantage over Evehe has no information which Eve does not have
What prevents Eve from breaking the system?Evidently the algorithm must be secret.Once it is broken, it cannot be reused.Keyed systems can be reused with a new key
if they are properly designed
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 21 / 54
Steganography models What steganography is
To remember
The cover-text is a red herring in steganography.The standard definitions of pure steganography and secret-keysteganography apply to a very limited class of steganography,based on data hiding.Cover-text irrelevant ⇒ distortion irrelevant.
PSNR used to measure distortion in Watermarking.
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 22 / 54
Steganography models Definitions
DefinitionsThe tools
Definition (Cipher)A system which allows Alice and Bob to communicate secretly withoutEve being able to learn the contents of the communication.
Encryption refers to the process of applying a cipher.
Definition (Stego-system)A system which allows Alice and Bob to communicate secretly withoutEve knowing that any secret communication is taking place.
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 23 / 54
Steganography models Definitions
DefinitionsThe disciplines
Definition (Steganography)
The study of (and art of developing) stego-systems.
Definition (Cryptography)
A general term encompassing the study of ciphers and othertechnology for secure communications.
Cryptography is more than ciphersDigital signaturesAuthorisation protocolsSteganography
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 24 / 54
Steganography models Definitions
DefinitionsThe countermeasures
Definition (Steganalysis)
The art of detecting whether secret communications is taking place ornot.
Definition (Cryptoanalysis)The art of breaking any cryptographic system, most often referring tobreaking ciphers, i.e. to find the contents of secret communications.
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 25 / 54
Steganography models Definitions
Steganography versus Cryptography
We define Steganography by its objective (control a specificthreat).
We don’t make any assumptions on how it works.
Cryptography includes SteganographyModern cryptography does assume certain principles andmethods
not all Steganography qualifies as modern Cryptography.
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 26 / 54
Particular strengthsGood matrix processing (efficient and syntactically simple)Good libraries for many areas, including image processingRelatively simple for prototyping
(Brief Demo)
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 28 / 54
Image and Data representations The image in the spatial domain
A tiny grayscale example
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 30 / 54
Image and Data representations The image in the spatial domain
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 31 / 54
Image and Data representations The image in the spatial domain
Image formats
Distinguish betweenImage format e.g. pixmap (spatial domain)
How the image is represented.File format
How the image data are stored on disk.A file format may contain metadata + image datapnm (netpbm), png, and Microsoft-BMP containpixmap images.TIFF can carry different image formats
JPEG is an image format and a compression algorithmThe JPEG standard does not define a file formatJFIF, EXIF, and TIFF all support JPEG data
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 32 / 54
Image and Data representations The image in the spatial domain
Images in Matlab
Load pixmap image: I = imread (filename)The pixmap is stored as a matrix.
If the file is not a pixmap,then the image is converted (by imread)possible rounding errormetadata are lost (always, also for pixmap formats)
Some stego-systems based on JPEG are vulnerableA JPEG file is converted (decompressed) and recompressed beforeembeddingThe double compression leads to artifacts which can be exploited
You should know which image format you work with
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 33 / 54
Image and Data representations The image in the spatial domain
Data types
A Matlab image are usually eitheruint8: Integers [0, 255]double: Floating point [0, 1]
Any range is possible, but imshow makes assumptionsSuppose img is a uint8 image.Convert: dblimg = double ( img ) (does not change range.What does imshow(dblimg) display?Assumed range [0, 1]; anything > 1 is treated as 1.
imshow(dblimg,[0,255]) lets you define the rangeData hiding often requires type conversion
always remember the range
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 34 / 54
Image and Data representations Numbers in Bits
The coefficients in bits
Take a number 217.Written Base 10i.e. 217 = 7 · 100 + 1 · 101 + 2 · 102
Least significant digit: the last/the ones
Same number 21710 = 110110012
Written in Base 2110110012 = 1 ·20 +0 ·21 +0 ·22 +1 ·23 +1 ·24 +0 ·25 +1 ·26 +1 ·27
Least significant bit: the last/the ones
Any base could be used. (8 and 16 are common.)
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 35 / 54
Image and Data representations Numbers in Bits
The mod operator
We write m = x mod Nwhen x = y · N + m for some y and 0 ≤ m < N.
i.e. m is the remainder of x when divided by N.
Matlab: m = mod ( x, N )
What does this have to with Least Significant bits?What is the remainder when you divide by 2 (your base)?
lsb = x mod 2
You can extract k bits if you want, y = x mod 2k .And x and y may be matrices (images).
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 36 / 54
Image and Data representations Numbers in Bits
Matlab Demo: image
pic = imread ( ’picfile.pnm’ )
whos pic
imshow ( pic ) ;
lsbpic = mod ( pic, 2 ) ;
figure ; imshow ( lsbpic, [ 0 1 ] ) ;
pic7bit = pic - lsbpic
figure ; imshow ( pic7bit ) ;
Dr Hans Georg Schaathun Basics of Steganography Spring 2009 – Week 1 37 / 54
Image and Data representations Characters in Numbers
The message
Message: Hello World!
0 1 2 3 4 5 6 7 8 9 A B C D E F0 NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI1 DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US2 SP ! " # $ % & ’ ( ) * + , - . /3 0 1 2 3 4 5 6 7 8 9 : ; < = > ?4 @ A B C D E F G H I J K L M N O5 P Q R S T U V W X Y Z [ \ ] ^ _6 ‘ a b c d e f g h i j k l m n o7 p q r s t u v w x y z { | } ~ DEL
H e l l o W o r l d !48 65 6C 6C 6F 20 57 6F 72 6C 64 21