Lecture 8 Steganography References: Disappearing Cryptography by Peter Wayner URL: Digital...

33
Lecture 8 Steganography References: References: Disappearing Cryptography by Peter Wayner Disappearing Cryptography by Peter Wayner URL: URL: Digital Watermarking by Cox, Miller and Digital Watermarking by Cox, Miller and Bloom Bloom URL URL June 12, 2003 CSCE 590 Forensic Computing
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    222
  • download

    0

Transcript of Lecture 8 Steganography References: Disappearing Cryptography by Peter Wayner URL: Digital...

Lecture 8

Steganography

Lecture 8

Steganography

References:References:

Disappearing Cryptography by Peter WaynerDisappearing Cryptography by Peter Wayner

URL:URL:

Digital Watermarking by Cox, Miller and BloomDigital Watermarking by Cox, Miller and Bloom

URLURL

June 12, 2003

CSCE 590 Forensic Computing

– 2 – CSCE 212 Summer 03

OverviewOverview Steganography Overview Good Reasons for Secrecy Encryption: Public Key, Private key PGP Information Theory How is steganography used? RSA ? Error Correction / Error Detection Hiding Information in Parity Bits Hiding Information in Texts Compression Basic Mimicry Using Grammars Hiding in the Noise

– 3 – CSCE 212 Summer 03

Overview continuedOverview continued

Anonymous remailers Toolkits for steganography Watermarks

– 4 – CSCE 212 Summer 03

Steganography IntroductionSteganography Introduction

Etymology (origins of the terminology)Etymology (origins of the terminology)

Greek words Greek words Steganos – which means covered Graphia – which means writing

Covered writing or concealed communicationCovered writing or concealed communication

Hiding messages in pictures, and other messages.Hiding messages in pictures, and other messages.

– 5 – CSCE 212 Summer 03

Good Reasons for SecrecyGood Reasons for Secrecy

1.1. So you can seek counseling about deeply personal So you can seek counseling about deeply personal problems such as suicidal thoughts.problems such as suicidal thoughts.

2.2. So you can explore job possibilities without So you can explore job possibilities without revealing where you currently work and potentially revealing where you currently work and potentially losing your job.losing your job.

3.3. So you can turn a person in to the authorities So you can turn a person in to the authorities anonymously because you fear recriminations.anonymously because you fear recriminations.

4.4. So you can protect your personal information from So you can protect your personal information from being exploited.being exploited.

5.5. So the police can communicate with undercover So the police can communicate with undercover agents infiltrating gangs.agents infiltrating gangs.

– 6 – CSCE 212 Summer 03

Encryption: Public Key, Private keyEncryption: Public Key, Private key

Classical cryptographyClassical cryptography Caesar cipher – rotate alphabet Substitutions and transpositions

Private Key or Secret key cryptographyPrivate Key or Secret key cryptography Well known algorithm varies with key Same key used for encryption and decryption If the key is lost all is lost

Public Key CryptographyPublic Key Cryptography User A’s Public key is available to all and is used to encrypt

messages to be sent to A. A uses the private key to decode

What does steganography offer above this?What does steganography offer above this?

– 7 – CSCE 212 Summer 03

Pretty Good Privacy (PGP)Pretty Good Privacy (PGP)

– 8 – CSCE 212 Summer 03

How is steganography used?How is steganography used?

Document AuthenticationDocument Authentication Extra information added to document to verify that is ia

authentic, the real thing.

Strong WatermarksStrong Watermarks Creators of digital works of art, would like to be able to

stamp their movie or audio files for authentication Want the watermark to be non-reproduceble And to be non-removable by compression, cropping etc. Extra information, e.g., “view once” on downloaded video

Document Tracking – modification historyDocument Tracking – modification history

Private Communication – message for terrorists Private Communication – message for terrorists broadcast by placing it in a picture on Ebaybroadcast by placing it in a picture on Ebay

– 9 – CSCE 212 Summer 03

How is steganography accomplished?How is steganography accomplished?

Use the noiseUse the noise

Spread the information outSpread the information out

Adopt a statistical profileAdopt a statistical profile

Replace randomnessReplace randomness

Change the orderChange the order

Split informationSplit information

Hide the sourceHide the source

– 10 – CSCE 212 Summer 03

Error Correction / Error DetectionError Correction / Error Detection

Extra information added for detection and correction of Extra information added for detection and correction of errorserrors

Parity bitsParity bits

Hamming codes – single error correcting, double error Hamming codes – single error correcting, double error detectingdetecting

– 11 – CSCE 212 Summer 03

Information TheoryInformation Theory

Claude Shannon founded the field of information Claude Shannon founded the field of information theory.theory.

ExampleExample Consider a sequence of 8 bit bytes, how much information is

transmitted. What if the sequence is ‘a’, ‘b’, ‘a’, ‘a’, ‘b’ … just ‘a’s and

‘b’s? We could do this with bits 01001 … 0 for ‘a’ and 1 for ‘b’ So how much information is really being transmitted?

Entropy – the measure of the amount of informationEntropy – the measure of the amount of information

If the information stream is characters xIf the information stream is characters x00, x, x11, … x, … xnn

With probabilities of occuring ρ(xWith probabilities of occuring ρ(xii) then the entropy is) then the entropy is

ρ(xρ(xii) log[1/ρ(x) log[1/ρ(xii)])]

– 12 – CSCE 212 Summer 03

Entropy ExampleEntropy Example

Data stream consists of 8 bit ASCII characters with Data stream consists of 8 bit ASCII characters with each character equally likelyeach character equally likely

ρ(‘x’) = 1/256 for each character ‘x’ ρ(‘x’) = 1/256 for each character ‘x’

ρ(xρ(xii) log[1/ρ(x) log[1/ρ(xii)] =)] =

1/256 log [256] =1/256 log [256] =

256(1/256) 8 =256(1/256) 8 =

88

– 13 – CSCE 212 Summer 03

Entropy ExampleEntropy Example

Data stream consists of 8 bit ASCII characters withData stream consists of 8 bit ASCII characters with

ρ(‘a’) = ρ(‘b’) = ½ρ(‘a’) = ρ(‘b’) = ½

and ρ(x) =0 for x not either of ‘a’ and ‘b’and ρ(x) =0 for x not either of ‘a’ and ‘b’

ρ(xρ(xii) log[1/ρ(x) log[1/ρ(xii)] =)] =

½ log [2] =½ log [2] =

2(1/2) 1 =2(1/2) 1 =

11

– 14 – CSCE 212 Summer 03

Entropy ExampleEntropy Example

8 bit ASCII characters ρ(‘a’) = ¼ ρ(‘b’) = ¾8 bit ASCII characters ρ(‘a’) = ¼ ρ(‘b’) = ¾

and ρ(x) =0 for x not either of ‘a’ and ‘b’and ρ(x) =0 for x not either of ‘a’ and ‘b’

ρ(xρ(xii) log[1/ρ(x) log[1/ρ(xii)] =)] =

¼ log(1/[1/4]) + ¾ log(1/[3/4]) =¼ log(1/[1/4]) + ¾ log(1/[3/4]) =

¼ * 2 + ¾ log(1.333) =¼ * 2 + ¾ log(1.333) =

.5 + .75( ).5 + .75( )

– 15 – CSCE 212 Summer 03

Entropy ExampleEntropy Example

8 bit ASCII characters with parity bit & bits for character 8 bit ASCII characters with parity bit & bits for character + parity+ parity

What is the entropy of a byte assuming all characters What is the entropy of a byte assuming all characters are equally likely?are equally likely?

– 16 – CSCE 212 Summer 03

Hiding Information in the Order of Things Hiding Information in the Order of Things

The purpose of a list is to convey information.The purpose of a list is to convey information.

But the order of the list might be used to convey other But the order of the list might be used to convey other information.information.

As a trivial example is we need a yes/no answer to a As a trivial example is we need a yes/no answer to a question we need only one bit to be transferred.question we need only one bit to be transferred.

By transferring a shopping listBy transferring a shopping list In alphabetial order could convey “YES” Not alphabetial order could convey “NO”

But we can do better than this!But we can do better than this!

– 17 – CSCE 212 Summer 03

Kinds of ListsKinds of Lists

Shopping listsShopping lists

Favorite …Favorite …

GIF colorsGIF colors

– 18 – CSCE 212 Summer 03

Flexibase NotationFlexibase Notation

Decimal Decimal digit j corresponds to 10 digit j corresponds to 10j j (numbering from (numbering from right starting with zero)right starting with zero)

Flexibase Flexibase digit j (numbering from the right again) is digit j (numbering from the right again) is in the range 0 to j+1in the range 0 to j+1 0th digit can be 0 or 1 1st digit can be 0, 1, or 2 2nd digit can be 0, 1, 2, or 3 Etc

Conversion from flexibase to decimalConversion from flexibase to decimal 0th digit * 1! + 1st digit * 2! + 2nd digit * 3! … Example 53311

– 19 – CSCE 212 Summer 03

From a list to a numberFrom a list to a number

Let's begin with the “master list” say five recording Let's begin with the “master list” say five recording artists in alphabetical order:artists in alphabetical order:

Abba Abba

Barry Manilow Barry Manilow

Cher Cher

Donny and Marie Donny and Marie

Eagles Eagles

– 20 – CSCE 212 Summer 03

From a list to a numberFrom a list to a number

One ordering of favorites is:One ordering of favorites is: Eagles Abba Barry Manilow Donny and Marie Cher

How do we get this to be a number?How do we get this to be a number?

– 21 – CSCE 212 Summer 03

Conversion from List to FlexibaseConversion from List to Flexibase1.1. Start with an alphabetical master list. Number the items beginning with zero Start with an alphabetical master list. Number the items beginning with zero

instead of 1. That means Abba gets 0, Barry gets 1, Cher gets 2, etc. instead of 1. That means Abba gets 0, Barry gets 1, Cher gets 2, etc.

2.2. Take the first item from your arbitrary list and find it in the alphabetical master Take the first item from your arbitrary list and find it in the alphabetical master list. In this case, my first choice, the Eagles, is in position 4 at the bottom of the list. In this case, my first choice, the Eagles, is in position 4 at the bottom of the alphabetical master list. This will be the left most digit in our notational alphabetical master list. This will be the left most digit in our notational scheme. scheme.

3.3. Delete the Eagles from the list. Delete the Eagles from the list.

4.4. Now find the second band from my list, Abba, in the alphabetical list. It's first Now find the second band from my list, Abba, in the alphabetical list. It's first which means it comes with the digit 0. This will be the next digit in the value which means it comes with the digit 0. This will be the next digit in the value which now looks like: 40. which now looks like: 40.

5.5. Delete Abba. The alphabetical list now looks like: Delete Abba. The alphabetical list now looks like: 1. Barry Manilow 2. Cher 3. Donny and Marie

6.6. The third item on my list, Barry Manilow, is now at the top of the alphabetical The third item on my list, Barry Manilow, is now at the top of the alphabetical list. That means it has a value of 0. After deleting it, the number now looks like list. That means it has a value of 0. After deleting it, the number now looks like 400. 400.

7.7. The fourth item, Donny and Marie, is second on the list meaning it has value 1. The fourth item, Donny and Marie, is second on the list meaning it has value 1.

8.8. The final name, Cher, is ignored. The final name, Cher, is ignored.

This algorithm produces the value 4001 This algorithm produces the value 4001

– 22 – CSCE 212 Summer 03

Final TouchesFinal Touches

Flexibase Flexibase decimal decimal binary binary

Encode message to binary Encode message to binary decimal decimalflexibase flexibase order of listorder of list

– 23 – CSCE 212 Summer 03

Hiding Information in textHiding Information in text

http://www.wayner.org/texts/mimic/http://www.wayner.org/texts/mimic/

Mimicry Applet by PETER WAYNERMimicry Applet by PETER WAYNER

This applet shows how data can be mutated into This applet shows how data can be mutated into innocent sounding plaintext with the push of a innocent sounding plaintext with the push of a button. In this case, the destination is a the button. In this case, the destination is a the voiceover from a hypothetical baseball game voiceover from a hypothetical baseball game between two teams named the Blogs and the between two teams named the Blogs and the Whappers. Whappers.

The information is encoded by choosing the words, the The information is encoded by choosing the words, the players and the action in the game. In some cases, players and the action in the game. In some cases, one message will lead to a string of homeruns and in one message will lead to a string of homeruns and in other cases a different message will strike out three other cases a different message will strike out three players in a row. See the players in a row. See the FAQ FAQ for more information. for more information.

– 24 – CSCE 212 Summer 03

Mimicry Applet by PETER WAYNER demoMimicry Applet by PETER WAYNER demo

Applet LayoutApplet Layout Message Box “Push for Mimicry” button Mimic text “push to Remove Mimicry” button Unscramble text box

OperationOperation1. Enter secret message

2. Push for mimicry button

3. Read story – send. Cut and paste to unscramble text box.

4. Push “remove mimicry” button

– 25 – CSCE 212 Summer 03

Mimicry Applet by PETER WAYNER demoMimicry Applet by PETER WAYNER demo

Secret Message – Test WednesdaySecret Message – Test Wednesday

StoryStory

Well Bob, Welcome to yet another game between the Whappers Well Bob, Welcome to yet another game between the Whappers and the Blogs here in scenic downtown Blovonia . I think it is and the Blogs here in scenic downtown Blovonia . I think it is fair to say that there is plenty of Blog Fever brewing in the fair to say that there is plenty of Blog Fever brewing in the stands as the hometown comes out to root for its favorites. It's stands as the hometown comes out to root for its favorites. It's a fine day for a game. Another new inning . Ain't life great, a fine day for a game. Another new inning . Ain't life great, Bob ? Nobody out yet . Now, Sal Sauvignon swings the Bob ? Nobody out yet . Now, Sal Sauvignon swings the baseball bat to stretch and enters the batter's box . The baseball bat to stretch and enters the batter's box . The pitchers is winding up to throw. No wood on that one . He's pitchers is winding up to throw. No wood on that one . He's winding up . What a toaster . No good. Definitely a ball . Checks winding up . What a toaster . No good. Definitely a ball . Checks first base . Nothing. Winds up and pitches a curve ball . He first base . Nothing. Winds up and pitches a curve ball . He bounces one of the ground into the first-baseman's glove . The bounces one of the ground into the first-baseman's glove . The Whappers have only one out . Now, Sal Sauvignon swings the Whappers have only one out . Now, Sal Sauvignon swings the baseball bat to stretch and enters the batter's box . Here we go. baseball bat to stretch and enters the batter's box . Here we go. Checks first base . Nothing. Winds up and pitches a bouncing Checks first base . Nothing. Winds up and pitches a bouncing ……

– 26 – CSCE 212 Summer 03

How does the mimicry work?How does the mimicry work?

The mimic computations starts with a collection of The mimic computations starts with a collection of words and a set of rules for joining the words words and a set of rules for joining the words together. These are often called a "grammar". together. These are often called a "grammar".

For instance, it might include words like "Hello", "My For instance, it might include words like "Hello", "My name is ", "How are you?", "Larry", "Moe", "Curly". name is ", "How are you?", "Larry", "Moe", "Curly". The information would be encoded by stringing the The information would be encoded by stringing the words together in a phrase. words together in a phrase.

For instance, "Hello, my name is Larry" would hide the For instance, "Hello, my name is Larry" would hide the message 1, while "Hello, my name is Curly." would message 1, while "Hello, my name is Curly." would hide the message 3. The choice of the name hid the hide the message 3. The choice of the name hid the information. information.

– 27 – CSCE 212 Summer 03

How is the message turned into choices? How is the message turned into choices?

26 characters + space + punctuation? + digits?26 characters + space + punctuation? + digits?

How many bits needed to represent?How many bits needed to represent?

Then develop an encodingThen develop an encoding

– 28 – CSCE 212 Summer 03

GrammarGrammar

*WeatherComment = *WeatherComment = Hmm . Do you think it will rain ? /.1/ What are the chances of rain today ? /.1/ Nice weather as long as it doesn't rain . /.1/ Well, if rain breaks out it will certainly change things . /.1/ You can really tell the mettle of a manager when rain is

threatened . /.1//

*Announcer= Bob /.1/ Ted /.1/ Mike /.1/ Rich /.*Announcer= Bob /.1/ Ted /.1/ Mike /.1/ Rich /.

DumbComment = DumbComment = Some kind of Ballplayer, huh ? /.1/ These guys came to play ball ./.1/ What a game so far today ./.1/ How about those players ./.1/ Got to love baseball ./.1/ Hey, they're playing the organ ./.1//

– 29 – CSCE 212 Summer 03

Pulling it all together (Text Mimicry)Pulling it all together (Text Mimicry)

Encode message in binary. Encode message in binary. Help 8 - 5 - 12 - 16 01000 00101 01100 10000

Generate choices in story to match bit streamGenerate choices in story to match bit stream 1st choice of two 0 2nd choice of two 1 1st choice of four 00 2nd choice of four 01 3rd choice of four 01 4th choice of four 01

– 30 – CSCE 212 Summer 03

Data CompressionData Compression

If the entropy of a file is less than its size then we can If the entropy of a file is less than its size then we can compress it without losing information.compress it without losing information.

Of course we need to be able to uncompress when we Of course we need to be able to uncompress when we need the data.need the data.

Lossless compression – Lossless compression – loses no data; uncompression is perfect Used for text; medical images

Lossy compressionLossy compression Loses information Usually done with images and sound The goal is to compress, but not affect perception If you can’t see the difference, what’s the big deal!

– 31 – CSCE 212 Summer 03

Approaches to compressionApproaches to compression

Probabilistic methodsProbabilistic methods More frequently occurring letters represented by shorter

strings Morse code e = dot, p which occurs less frequently is

represented by dot-dash-dash-dot Huffman codes

Dictionary MethodsDictionary Methods Compiles a list of most frequently occuring words or

collections of bytes in a file and then numbers them Lempel-Ziv compression

Wave Methods Wave Methods Compress the wave expansion, JPEG, JPEG2000, MPEG

Fractal MethodsFractal Methods

– 32 – CSCE 212 Summer 03

Huffman CodesHuffman Codes

Wayner Table 5.1 and 5.2 p 72,73Wayner Table 5.1 and 5.2 p 72,73

Huffman tree figure 5.2 p 76Huffman tree figure 5.2 p 76

– 33 – CSCE 212 Summer 03

Steganography in imagesSteganography in images

Pixel – picture elementPixel – picture element

Each pixel has red-blue-green intensity tripleEach pixel has red-blue-green intensity triple

Greyscale 0 to 255 intensityGreyscale 0 to 255 intensity 0 = 0000 0000 white 255 = 1111 1111 black So for any pixel drop the least significant bit(s) and replace

with coded information 237 = …. …1 …. …x where x is the info we are encoding

Replace least significant bits in images with encoded Replace least significant bits in images with encoded information.information.