Top Banner
Image Cryptography & Steganography Master : Dr. Ghaderi Mohammad Amin Amjadi Winter 2015
44

Image Cryptography and Steganography

Jan 25, 2017

Download

Documents

Welcome message from author
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
Page 1: Image Cryptography and Steganography

ImageCryptography &Steganography

Master :Dr. Ghaderi

Mohammad Amin Amjadi

Winter 2015

Page 2: Image Cryptography and Steganography

2

Main PaperEncrypted image-based reversible data hiding with public key cryptography from difference expansionChih-Wei Shiu , Yu-Chi Chen , Wien Hong

2015 Elsevier B.V. All rights reserved

Page 3: Image Cryptography and Steganography

3

Content

a) Prefaceb) EIRDH-Pc) new EIRDH-P

Page 4: Image Cryptography and Steganography

4

ImagePreface -> Image

Image : a Matrix of Pixels

Page 5: Image Cryptography and Steganography

5

PixelPreface -> Image -> Pixel

+

+

=

RedProperty (8 bit)

24 bit Image

GreenProperty (8 bit)

BlueProperty (8 bit)

B G RLSB MSB LSB MSB LSB MSB0000 0000 0000 0000 0000 0000

Pixel : 24 bit

LSB : Least significant bitMSB : Most significant bit

RGB Mode

Page 6: Image Cryptography and Steganography

6

Cryptography

Goal : Security

Terms :1) Cryptography2) Encrypt3) Decrypt4) Public key Cryptography

Page 7: Image Cryptography and Steganography

7

Cryptography

Sender : Encrypt Message Receiver : Decrypt EMessage

Preface -> Cryptography -> base scenario

SenderEncryptMessage EMessage Receiver

DecryptEMessage Message

Page 8: Image Cryptography and Steganography

8

Cryptography

1. Change Location (reordering) 2. Mapping

Preface -> Cryptography -> base Algorithms

2 14 3

3 41 2

2 14 3

F(2)

F(1)

F(4) F(3)

Page 9: Image Cryptography and Steganography

9

Cryptography

1. Symmetric-Key Cryptographysender and receiver using same keykey is secret

2. Public-Key Cryptographyanyone can access to the public keyonly receiver has the Private Key

Preface -> Cryptography -> Category

Page 10: Image Cryptography and Steganography

10

Steganography

Goal : Hide Message/Data

Terms :1) DH : Data Hiding2) RDH : Reversible Data

Hiding

Page 11: Image Cryptography and Steganography

11

Steganography

use Cover Image / Hide Message / Extract Message Sender : Hide Message inside Cover Image Receiver : Extract secret Message

Preface -> Steganography -> base scenario

SenderCover Image Cover Image(Message)Message

ReceiverCover Image(Message) Cover Image

Message

Page 12: Image Cryptography and Steganography

12

Steganography

LSBImage quality of Cover Image

Preface -> Steganography -> base Algorithms

B G RLSB MSB LSB MSB LSB MSB0000 0000 0000 0000 0000 0000

B G RLSB MSB LSB MSB LSB MSB0000 0000 0000 0000 0000 0000

3bit of Data in any pixel of Cover Image 8bit of Data in any pixel of Cover Image

Page 13: Image Cryptography and Steganography

13

Cryptography & SteganographyPreface -> compare Cryptography and Steganography

Encryption

Decryption

Page 14: Image Cryptography and Steganography

14

Cryptography & SteganographyPreface -> compare Cryptography and Steganography

Cover Image (512 x 512)94 KB

LSB AlgorithmUsing Jpeg Format

Message (450 x 321)20 KB

Stego (512 x 512)37.6 KB

Page 15: Image Cryptography and Steganography

15

EIRDH-P

Combine Cryptography & Steganography

Terms :1) EIRDH : encrypted image-

based reversible data hiding 2) EIRDH-P : encrypted image-

based reversible data hiding (EIRDH) with public key cryptography

3) Image Provider4) Hider

Page 16: Image Cryptography and Steganography

16

EIRDH-P

1. the receiver initially sets his public / secret key pair (pk , sk)

EIRDH-P -> Schematic and Scenario -> KeyGen

ReceiverR

Data HiderH

Image ProviderP

sk

pk

pk

Send

er

Send

Page 17: Image Cryptography and Steganography

17

EIRDH-P

2. the Image Provider picks a cover-image CI , and then uses pk and CI to generate the encrypted image EI , sends it to the hider

EIRDH-P -> Schematic and Scenario -> Image Enc

ReceiverR

Data HiderH

Image ProviderP

sk

pk

pk

Send

er

CI EIEncSe

nd

EI

Page 18: Image Cryptography and Steganography

18

EIRDH-P

3. the Data Hider takes a message M and pk to generate the secret message SM

EIRDH-P -> Schematic and Scenario -> Message Enc

ReceiverR

Data HiderH

Image ProviderP

sk

pk

pk

Send

er

CI EI

EI

EncSe

nd

M pk Enc S

M

Page 19: Image Cryptography and Steganography

19

EIRDH-P

4. the Data Hider takes SM and EI to generate the encrypted image with the embedded message, EIM

EIRDH-P -> Schematic and Scenario -> Embedding

ReceiverR

Data HiderH

Image ProviderP

sk

pk

pk

Send

er

CI EIEncSe

nd

EI

M pk Enc S

M

Hid EIM

Page 20: Image Cryptography and Steganography

20

EIRDH-P

5. The receiver uses EIM and sk to recover the stego-image SI

EIRDH-P -> Schematic and Scenario -> Image Dec

ReceiverR

Data HiderH

Image ProviderP

sk

pk

pk

Send

er

CI EIEncSe

nd

EI

M pk Enc S

M

Hid EIM

EIM Dec SI

Send

Page 21: Image Cryptography and Steganography

21

EIRDH-P

6. The receiver uses SI to recover CI’ and obtain SM’

EIRDH-P -> Schematic and Scenario -> Extracting

ReceiverR

Data HiderH

Image ProviderP

sk

pk

pk

Send

er

CI EIEncSe

nd

EI

M pk Enc S

M

Hid EIM

EIM Dec SI

ExtSM’CI’Send

Page 22: Image Cryptography and Steganography

22

EIRDH-P

7. The receiver obtains the pure message M’ by using sk to decrypt SM’

EIRDH-P -> Schematic and Scenario -> Message Dec

ReceiverR

Data HiderH

Image ProviderP

sk

pk

pk

Send

er

CI EIEncSe

nd

EI

M pk Enc S

M

Hid EIM

EIM Dec SI

ExtSM’CI’

Dec M’

Send

Page 23: Image Cryptography and Steganography

23

EIRDH-PEIRDH-P -> Encryption Algorithm

Public key

Diffie-Hellma

nRSAPaillier

Terms :1) gcd : Greatest common divisor2) lcm : Least common multiple

Page 24: Image Cryptography and Steganography

24

EIRDH-P

1. Choose two distinct prime numbers p and qp != qp , q : Big

EIRDH-P -> Encryption Algorithm -> RSA -> KeyGen

1. p = 61 , q = 53

Page 25: Image Cryptography and Steganography

25

EIRDH-P

2. Compute n = pq

EIRDH-P -> Encryption Algorithm -> RSA -> KeyGen

1. p = 61 , q = 532. n = 61 x 53 = 3233

Page 26: Image Cryptography and Steganography

26

EIRDH-P

3. Compute φ(n) = φ(p)φ(q) = (p − 1)(q − 1) = n - (p + q -1) , where φ is Euler's totient function

EIRDH-P -> Encryption Algorithm -> RSA -> KeyGen

1. p = 61 , q = 532. n = 61 x 53 = 32333. φ(n) = (61 − 1)(53 − 1) = 3120

Page 27: Image Cryptography and Steganography

27

EIRDH-P

4. Choose an integer e such that 1 < e < φ(n) and gcd(e, φ(n)) = 1e is a prim Number on {1 to φ(n) }

EIRDH-P -> Encryption Algorithm -> RSA -> KeyGen

1. p = 61 , q = 532. n = 61 x 53 = 32333. φ(n) = (61 − 1)(53 − 1) = 31204. e = 17

Page 28: Image Cryptography and Steganography

28

EIRDH-P

5. Determine d as d ≡ e−1 (mod φ(n))d⋅e ≡ 1 (mod φ(n))

d.e = 1 + k.φ(n)

EIRDH-P -> Encryption Algorithm -> RSA -> KeyGen

1. p = 61 , q = 532. n = 61 x 53 = 32333. φ(n) = (61 − 1)(53 − 1) = 31204. e = 175. d = 2753 17 x

2753 mod 3120 = 1

Page 29: Image Cryptography and Steganography

29

EIRDH-P

6. public key : ( n , e )

EIRDH-P -> Encryption Algorithm -> RSA -> KeyGen

1. p = 61 , q = 532. n = 61 x 53 = 32333. φ(n) = (61 − 1)(53 − 1) = 31204. e = 175. d = 2753 17 x

2753 mod 3120 = 16. public key : ( n , e ) = ( 3233 , 17 )

Page 30: Image Cryptography and Steganography

30

EIRDH-P

7. private key a) ( n , d )b) ( p , q ) , d mod (q-1) , d mod (p-1) , q-1 mod (p)

EIRDH-P -> Encryption Algorithm -> RSA -> KeyGen

1. p = 61 , q = 532. n = 61 x 53 = 32333. φ(n) = (61 − 1)(53 − 1) = 31204. e = 175. d = 2753 17 x

2753 mod 3120 = 16. public key : ( n , e ) = ( 3233 , 17 )7. private key : ( n , d ) = ( 3233 , 2753 )

Page 31: Image Cryptography and Steganography

31

EIRDH-P

8. Encryptionm (Message) such that 0 ≤ m < n and gcd(m, n) = 1c : ciphertext 

EIRDH-P -> Encryption Algorithm -> RSA -> Encryption

1. p = 61 , q = 532. n = 61 x 53 = 32333. φ(n) = (61 − 1)(53 − 1) = 31204. e = 175. d = 2753 17 x

2753 mod 3120 = 16. public key : ( n , e ) = ( 3233 , 17 )7. private key : ( n , d ) = ( 3233 , 2753 )8. c(m)

Page 32: Image Cryptography and Steganography

32

EIRDH-P

9. Decryption

EIRDH-P -> Encryption Algorithm -> RSA -> Decryption

1. p = 61 , q = 532. n = 61 x 53 = 32333. φ(n) = (61 − 1)(53 − 1) = 31204. e = 175. d = 2753 17 x

2753 mod 3120 = 16. public key : ( n , e ) = ( 3233 , 17 )7. private key : ( n , d ) = ( 3233 , 2753 )8. c(m) 9. m(c)

Page 33: Image Cryptography and Steganography

33

EIRDH-P

1. Choose two large prime numbers p and q randomly2. Compute n = pq , 3. Select random integer g where 4. ; where 5. ( N , g ) is public key6. ( p , q , ) is private key7. where r is random such that

EIRDH-P -> Encryption Algorithm -> Paillier

Page 34: Image Cryptography and Steganography

34

new EIRDH-P

each pixel is divided into two parts : an even integer and a bit, where the summation of them is equal to the pixel value

any pixel = x + y + bit(x , y )is an even integer , x > y

[[m]] = c(m) = ciphertext of m [[m1]] [[m2]] = [[ m1 + m2 ]]

new EIRDH-P

Page 35: Image Cryptography and Steganography

35

new EIRDH-P

1. Receiver sets the public/secret key pair (pk, sk) as Paillier encryption

new EIRDH-P -> Algorithm -> KeyGen

Page 36: Image Cryptography and Steganography

36

new EIRDH-P

2. Image Provider pre-processes (x,y) to compute and , and then computes and Note that d can be positive or negativeHe generates and by using pk to encrypt , Here and are the encrypted pixel pair in the encrypted imageThis step will produce EI

new EIRDH-P -> Algorithm -> Image Enc

y xCover Image

Pre Process y' x' Encrypt [[y‘]] [[x‘]]

Enc Image

Page 37: Image Cryptography and Steganography

37

new EIRDH-P

3. Data Hider generates the secret message SM by using pk to encrypt the message M

new EIRDH-P -> Algorithm -> Message Enc

EncMpk SM

Page 38: Image Cryptography and Steganography

38

new EIRDH-P

4. For a bit b of SM , Data Hider generates and computes and Note that is only inserted into the first encrypted pixelFinally, he generates and as a pixel pair of EIM. This step will output EIM

new EIRDH-P -> Algorithm -> Embedding

[[y‘]] [[x‘]][[y”]] [[x”]] Embed

b = 1 , ,

b = 0 , ,

Page 39: Image Cryptography and Steganography

39

new EIRDH-P

5. Receiver uses and and sk to recover x ″ , y ″ as a pixel pair of the stego-image SI This step will finally output SI

new EIRDH-P -> Algorithm -> Image Dec

[[y”]] [[x"]] Dec y “ x “

Stego Image

Page 40: Image Cryptography and Steganography

40

new EIRDH-P

6. If x “ and y “ are both odd or both even , Receiver extracts b = 0 and recover x’ = x” and y’ = y”if not, extracts b = 1 and recovers x’ = x”-1 and y’ = y” since b is only embedded into the first pixelReceiver can easily compute and and obtain the original pixel pair of CI by computing and At the end, this step will output SM and recovers CI

new EIRDH-P -> Algorithm -> Extracting

y” x” Extract y‘ x‘Stego Image

Page 41: Image Cryptography and Steganography

41

new EIRDH-P

7. Receiver obtains the pure message M by using sk to decrypt SM

new EIRDH-P -> Algorithm -> Message Dec

y‘ x‘ Recover y xStego Image

Page 42: Image Cryptography and Steganography

42

new EIRDH-Pnew EIRDH-P -> Schematic

Cover Image

Pre Process Encrypt

Enc Image

[[y‘]] [[x‘]][[y”]] [[x”]] EmbedIf bit = 1 , , If bit = 0 , ,

[[y”]] [[x"]]

Dec

y “ x “Stego Image

Extract y‘ x‘ Recover

, ,

P

H

R

Page 43: Image Cryptography and Steganography

43

Question ?

Page 44: Image Cryptography and Steganography

44

Thanks