Computing Information Flow Using Symbolic Model-Checking Rohit Chadha - - PowerPoint PPT Presentation

computing information flow using symbolic model checking
SMART_READER_LITE
LIVE PREVIEW

Computing Information Flow Using Symbolic Model-Checking Rohit Chadha - - PowerPoint PPT Presentation

Computing Information Flow Using Symbolic Model-Checking Rohit Chadha 1 Umang Mathur 2 Stefan Schwoon 3 1 University of Missouri Columbia, Missouri, USA 2 Indian Institute of Technology - Bombay Mumbai 3 LSV, ENS Cachan France December 17, 2014


slide-1
SLIDE 1

Computing Information Flow Using Symbolic Model-Checking

Rohit Chadha 1 Umang Mathur 2 Stefan Schwoon 3

1University of Missouri

Columbia, Missouri, USA

2Indian Institute of Technology - Bombay

Mumbai

3LSV, ENS Cachan

France

December 17, 2014

slide-2
SLIDE 2

Outline

Introduction Preliminaries Summary Calculation Computing Information Leakage: Symbolic Algorithms Moped-QLeak Demo Conclusions and Future Work Thank You

slide-3
SLIDE 3

Introduction

◮ Quantifying information leakage - Inferring information about inputs by

  • bserving public outputs
slide-4
SLIDE 4

Introduction

◮ Quantifying information leakage - Inferring information about inputs by

  • bserving public outputs

◮ No leakage =

⇒ Outputs independent of inputs

slide-5
SLIDE 5

Introduction

◮ Quantifying information leakage - Inferring information about inputs by

  • bserving public outputs

◮ No leakage =

⇒ Outputs independent of inputs

◮ Full leakage =

⇒ Unique input corresponding to given output

slide-6
SLIDE 6

Introduction

◮ Quantifying information leakage - Inferring information about inputs by

  • bserving public outputs

◮ No leakage =

⇒ Outputs independent of inputs

◮ Full leakage =

⇒ Unique input corresponding to given output

◮ Comparing leakage across programs - less leakage is desirable

slide-7
SLIDE 7

Measuring Information Leakage

slide-8
SLIDE 8

Measuring Information Leakage

Several metrics - min-entropy, Shannon’s entropy, etc.,

slide-9
SLIDE 9

Measuring Information Leakage

Several metrics - min-entropy, Shannon’s entropy, etc.,

  • 1. Min-entropy leakage measures vulnerability of the secret inputs to being

guessed correctly in a single attempt of the adversary MEU(P) = log

  • ∈O

max

s∈S µ(S = s | O = o).

slide-10
SLIDE 10

Measuring Information Leakage

Several metrics - min-entropy, Shannon’s entropy, etc.,

  • 1. Min-entropy leakage measures vulnerability of the secret inputs to being

guessed correctly in a single attempt of the adversary MEU(P) = log

  • ∈O

max

s∈S µ(S = s | O = o).

  • 2. Shannon entropy leakage measures expected number of guesses required

to correctly guess the secret input SEU(P) = log |S| − 1 |S|

  • ∈O

|P−1(o)| log |P−1(o)|

slide-11
SLIDE 11

Example

Consider the following example:

slide-12
SLIDE 12

Example

Consider the following example: def example (input) :

  • utput = input % 8

return output

slide-13
SLIDE 13

Example

Consider the following example: def example (input) :

  • utput = input % 8

return output What would be the information leaked by the above program

slide-14
SLIDE 14

Example

Consider the following example: def example (input) :

  • utput = input % 8

return output What would be the information leaked by the above program

◮ using min-entropy ?

slide-15
SLIDE 15

Example

Consider the following example: def example (input) :

  • utput = input % 8

return output What would be the information leaked by the above program

◮ using min-entropy ? ◮ using Shannon entropy ?

slide-16
SLIDE 16

Dining Cryptographers

slide-17
SLIDE 17

Dining Cryptographers

◮ Cryptographers A, B and C: Dine out

slide-18
SLIDE 18

Dining Cryptographers

◮ Cryptographers A, B and C: Dine out

slide-19
SLIDE 19

Dining Cryptographers

◮ Cryptographers A, B and C: Dine out ◮ Payment done by

slide-20
SLIDE 20

Dining Cryptographers

◮ Cryptographers A, B and C: Dine out ◮ Payment done by

◮ One of A, B or C, or

slide-21
SLIDE 21

Dining Cryptographers

◮ Cryptographers A, B and C: Dine out ◮ Payment done by

◮ One of A, B or C, or ◮ NSA

slide-22
SLIDE 22

Dining Cryptographers

◮ Cryptographers A, B and C: Dine out ◮ Payment done by

◮ One of A, B or C, or ◮ NSA

◮ Determine if the NSA paid or not w/o revealing information about

cryptographers

slide-23
SLIDE 23

Dining Cryptographers: Protocol

2 stage protocol:

slide-24
SLIDE 24

Dining Cryptographers: Protocol

2 stage protocol:

  • 1. Every two cryptographers establish a shared one-bit secret : Toss a coin
slide-25
SLIDE 25

Dining Cryptographers: Protocol

2 stage protocol:

  • 1. Every two cryptographers establish a shared one-bit secret : Toss a coin
  • 2. Each cryptographer publicly announces a bit, which is
slide-26
SLIDE 26

Dining Cryptographers: Protocol

2 stage protocol:

  • 1. Every two cryptographers establish a shared one-bit secret : Toss a coin
  • 2. Each cryptographer publicly announces a bit, which is

◮ XOR of shared bits, if did not pay

slide-27
SLIDE 27

Dining Cryptographers: Protocol

2 stage protocol:

  • 1. Every two cryptographers establish a shared one-bit secret : Toss a coin
  • 2. Each cryptographer publicly announces a bit, which is

◮ XOR of shared bits, if did not pay ◮ ¬ (XOR of shared bits), otherwise

slide-28
SLIDE 28

Dining Cryptographers: Protocol

2 stage protocol:

  • 1. Every two cryptographers establish a shared one-bit secret : Toss a coin
  • 2. Each cryptographer publicly announces a bit, which is

◮ XOR of shared bits, if did not pay ◮ ¬ (XOR of shared bits), otherwise

1 1 ¬XOR(0, 1) = 0 XOR(0, 1) = 1 XOR(1, 1) = 0

slide-29
SLIDE 29

Dining Cryptographers: Protocol

2 stage protocol:

  • 1. Every two cryptographers establish a shared one-bit secret : Toss a coin
  • 2. Each cryptographer publicly announces a bit, which is

◮ XOR of shared bits, if did not pay ◮ ¬ (XOR of shared bits), otherwise

1 1 ¬XOR(0, 1) = 0 XOR(0, 1) = 1 XOR(1, 1) = 0

Stage-1 (left) and Stage-2 (right)

slide-30
SLIDE 30

Dining Cryptographers: Protocol

2 stage protocol:

  • 1. Every two cryptographers establish a shared one-bit secret : Toss a coin
  • 2. Each cryptographer publicly announces a bit, which is

◮ XOR of shared bits, if did not pay ◮ ¬ (XOR of shared bits), otherwise

1 1 ¬XOR(0, 1) = 0 XOR(0, 1) = 1 XOR(1, 1) = 0

Stage-1 (left) and Stage-2 (right)

XOR(AnnouncementA, AnnouncementB, AnnouncementC) = 0 iff NSA paid for the dinner

slide-31
SLIDE 31

Probabilistic Boolean Programs

◮ Global variablesn G: Input and output

slide-32
SLIDE 32

Probabilistic Boolean Programs

◮ Global variablesn G: Input and output ◮ Local variables: Internal calculations

slide-33
SLIDE 33

Probabilistic Boolean Programs

◮ Global variablesn G: Input and output ◮ Local variables: Internal calculations ◮ Program statements : transform global and local variables

slide-34
SLIDE 34

Probabilistic Boolean Programs

◮ Global variablesn G: Input and output ◮ Local variables: Internal calculations ◮ Program statements : transform global and local variables ◮ For Program P, FP : 2G → 2G ∪ {⊥}

slide-35
SLIDE 35

Probabilistic Boolean Programs

◮ Global variablesn G: Input and output ◮ Local variables: Internal calculations ◮ Program statements : transform global and local variables ◮ For Program P, FP : 2G → 2G ∪ {⊥} ◮ FP( ¯

g0) = ⊥ iff P does not terminate

slide-36
SLIDE 36

Probabilistic Boolean Programs

◮ Global variablesn G: Input and output ◮ Local variables: Internal calculations ◮ Program statements : transform global and local variables ◮ For Program P, FP : 2G → 2G ∪ {⊥} ◮ FP( ¯

g0) = ⊥ iff P does not terminate

◮ Summary - Joint probability distribution µ

slide-37
SLIDE 37

Probabilistic Boolean Programs

◮ Global variablesn G: Input and output ◮ Local variables: Internal calculations ◮ Program statements : transform global and local variables ◮ For Program P, FP : 2G → 2G ∪ {⊥} ◮ FP( ¯

g0) = ⊥ iff P does not terminate

◮ Summary - Joint probability distribution µ

slide-38
SLIDE 38

Algebraic Decision Diagrams

◮ Set of variables V

slide-39
SLIDE 39

Algebraic Decision Diagrams

◮ Set of variables V ◮ Algebraic set M (M = [0, 1] for probabilistic statements, M = {0, 1}

implies BDDs)

slide-40
SLIDE 40

Algebraic Decision Diagrams

◮ Set of variables V ◮ Algebraic set M (M = [0, 1] for probabilistic statements, M = {0, 1}

implies BDDs)

◮ ADD : 2V → M

slide-41
SLIDE 41

Algebraic Decision Diagrams

◮ Set of variables V ◮ Algebraic set M (M = [0, 1] for probabilistic statements, M = {0, 1}

implies BDDs)

◮ ADD : 2V → M ◮ Efficient reduced representations, similar to BDDs

slide-42
SLIDE 42

Algebraic Decision Diagrams

◮ Set of variables V ◮ Algebraic set M (M = [0, 1] for probabilistic statements, M = {0, 1}

implies BDDs)

◮ ADD : 2V → M ◮ Efficient reduced representations, similar to BDDs

x y y z z z z 1 1 0.5 0.5 0.5 0.5 x y z z 1 0.5

slide-43
SLIDE 43

Algebraic Decision Diagrams

◮ Set of variables V ◮ Algebraic set M (M = [0, 1] for probabilistic statements, M = {0, 1}

implies BDDs)

◮ ADD : 2V → M ◮ Efficient reduced representations, similar to BDDs

x y y z z z z 1 1 0.5 0.5 0.5 0.5 x y z z 1 0.5

ADD (up) and its reduced form (bottom)

slide-44
SLIDE 44

Computing Summaries: Fixed Point Iteration

◮ Program statement l → µl

slide-45
SLIDE 45

Computing Summaries: Fixed Point Iteration

◮ Program statement l → µl ◮ Can be represented efficiently as MTBBDs

slide-46
SLIDE 46

Computing Summaries: Fixed Point Iteration

◮ Program statement l → µl ◮ Can be represented efficiently as MTBBDs

x x' 0x2c 0x29 0x2b

1

Stmt: x = !x Stmt

slide-47
SLIDE 47

Computing Summaries: Fixed Point Iteration

◮ Program statement l → µl ◮ Can be represented efficiently as MTBBDs

x x' 0x2c 0x29 0x2b

1

Stmt: x = !x Stmt

◮ Compose statements

slide-48
SLIDE 48

Computing Summaries: Fixed Point Iteration

◮ Program statement l → µl ◮ Can be represented efficiently as MTBBDs

x x' 0x2c 0x29 0x2b

1

Stmt: x = !x Stmt

◮ Compose statements ◮ Arrive at a fixed point (Summary µ )

slide-49
SLIDE 49

Min Entropy : Symbolic Algorithm

For a program P, with

slide-50
SLIDE 50

Min Entropy : Symbolic Algorithm

For a program P, with

◮ input set S (uniform distribution),

slide-51
SLIDE 51

Min Entropy : Symbolic Algorithm

For a program P, with

◮ input set S (uniform distribution), ◮ output set O, and,

slide-52
SLIDE 52

Min Entropy : Symbolic Algorithm

For a program P, with

◮ input set S (uniform distribution), ◮ output set O, and, ◮ joint probability distribution µ,

slide-53
SLIDE 53

Min Entropy : Symbolic Algorithm

For a program P, with

◮ input set S (uniform distribution), ◮ output set O, and, ◮ joint probability distribution µ,

the min-entropy leakage MEU(P) is MEU(P) = log

  • ∈O

max

s∈S µ(S = s | O = o).

slide-54
SLIDE 54

Min Entropy : Symbolic Algorithm

For a program P, with

◮ input set S (uniform distribution), ◮ output set O, and, ◮ joint probability distribution µ,

the min-entropy leakage MEU(P) is MEU(P) = log

  • ∈O

max

s∈S µ(S = s | O = o).

Algorithm 6: Symbolic computation of min-entropy leakage of a probabilistic program Input: G, G′ and TP the summary of P. Output: MEU(P)

1 begin 2

Tout,P ← − abstract(max, G, TP)

3

sumout ← − val(abstract(+, G′, Tout,P))

4

Tterm,P ← − abstract(+, G′, TP)

5

sumout ← − sumout + (1 − val(abstract(min, G, Tterm,P)));

6

return log sumout

slide-55
SLIDE 55

Shannon Entropy : Symbolic Algorithm

SEU(P) = log |S| − 1 |S|

  • ∈O

|P−1(o)| log |P−1(o)|

slide-56
SLIDE 56

Shannon Entropy : Symbolic Algorithm

SEU(P) = log |S| − 1 |S|

  • ∈O

|P−1(o)| log |P−1(o)|

Algorithm 8: Symbolic computation of Shannon entropy leakage of a probabilis- tic program Input: G, G′ and TP the summary of P. Output: SEU(P)

1 Let n be the number of variables in G. 2 begin 3

Tnorm-eq-size,P ← − divide(abstract(+, G, TP), 2n)

4

valout ← − (- val(abstract(⋆, G′, Tnorm-eq-size,P)))

5

Tterm,P ← − abstract(+, G′, TP)

6

probout,non-term ← − (1 −

val(abstract(+,G,Tterm,P )) 2n

)

7

valout,non-term ← − (- probout,non-term log probout,non-term)

8

Tnorm-⋆out,P ← − divide(abstract(⋆, G′, TP), 2n)

9

valcond ← − (-val(abstract(+, G, T⋆out,P)))

10

Tnon-term,P ← − subtract(1, Tterm,P)

11

valcond,non-term ← − (-

val(abstract(⋆,G,Tnon-term-prob,P )) 2n

)

12

return (valout + valout,non-term − valcond − valcond,non-term)

slide-57
SLIDE 57

Moped-QLeak

◮ Tool Moped-QLeak: extends Moped

slide-58
SLIDE 58

Moped-QLeak

◮ Tool Moped-QLeak: extends Moped ◮ Source - C/C++

slide-59
SLIDE 59

Moped-QLeak

◮ Tool Moped-QLeak: extends Moped ◮ Source - C/C++ ◮ Input language Remopla - arrays, integers, struct’s, etc.,

slide-60
SLIDE 60

Moped-QLeak

◮ Tool Moped-QLeak: extends Moped ◮ Source - C/C++ ◮ Input language Remopla - arrays, integers, struct’s, etc.,

define N 32 define DEFAULT_INT_BITS N unsigned int var1; bool g; module void f(unsigned int v, bool z){ bool k; pchoice :: 0.2 -> label2: k = g && z; :: 0.8 -> var1 = var1 + v; choicep } module void main(){ var1 = 53; pchoice :: 0.3 -> label1: g = true; :: 0.7 -> f(var1, !g); choicep }

slide-61
SLIDE 61

Moped-QLeak

Modifications/Optimizations made:

slide-62
SLIDE 62

Moped-QLeak

Modifications/Optimizations made:

◮ Algebraic operations

slide-63
SLIDE 63

Moped-QLeak

Modifications/Optimizations made:

◮ Algebraic operations ◮ Variable orderings - manual

slide-64
SLIDE 64

Moped-QLeak

Modifications/Optimizations made:

◮ Algebraic operations ◮ Variable orderings - manual

Salient features:

slide-65
SLIDE 65

Moped-QLeak

Modifications/Optimizations made:

◮ Algebraic operations ◮ Variable orderings - manual

Salient features:

◮ Handles large number of bits (30 bits)

slide-66
SLIDE 66

Moped-QLeak

Modifications/Optimizations made:

◮ Algebraic operations ◮ Variable orderings - manual

Salient features:

◮ Handles large number of bits (30 bits) ◮ Time taken in miliseconds

slide-67
SLIDE 67

Moped-QLeak

Modifications/Optimizations made:

◮ Algebraic operations ◮ Variable orderings - manual

Salient features:

◮ Handles large number of bits (30 bits) ◮ Time taken in miliseconds ◮ Consistently outperforms sqifc (Malacaria et. al)

slide-68
SLIDE 68

Moped-QLeak

Example Order ME SE Time Data types Illustrative Example I 3 2.03966e-05 0.215 bool Electronic Purse D 2 2 0.009 5 bit integers (Restricted) Mix and Duplicate S 16 16 0.041 bool Binary Search I 16 16 9.307 bool Sanity Check I 4 1.168e-7 0.060 bool Implicit Flow D 2.8074 1.757e-07 0.016 30 bit integers Implicit Flow D 2.8074 0.003 0.010 15 bit integers Implicit Flow D 2.8074 4.67189e-08 0.190 bool Masked Copy I 16 16 0.038 bool Sum Query D 4.80735 4.35132 0.034 5 bit integers (Restricted)

slide-69
SLIDE 69

Related Work

◮ (K¨

  • pf et. al.,) : iteratively refine equivalence classes (deterministic only)
slide-70
SLIDE 70

Related Work

◮ (K¨

  • pf et. al.,) : iteratively refine equivalence classes (deterministic only)

◮ (Klebanov et. al.,) : program to SMT formula, count outputs

(deterministic, loop free only)

slide-71
SLIDE 71

Related Work

◮ (K¨

  • pf et. al.,) : iteratively refine equivalence classes (deterministic only)

◮ (Klebanov et. al.,) : program to SMT formula, count outputs

(deterministic, loop free only)

◮ (Biondi et. al.,) : forward symbolic execution - performance comparable to

sqifc

slide-72
SLIDE 72

Related Work

◮ (K¨

  • pf et. al.,) : iteratively refine equivalence classes (deterministic only)

◮ (Klebanov et. al.,) : program to SMT formula, count outputs

(deterministic, loop free only)

◮ (Biondi et. al.,) : forward symbolic execution - performance comparable to

sqifc

slide-73
SLIDE 73

Tool demonstration

slide-74
SLIDE 74

Conclusions and Future Work

◮ Symbolic algorithms for measuring information leakage

slide-75
SLIDE 75

Conclusions and Future Work

◮ Symbolic algorithms for measuring information leakage ◮ Interagble in any BDD based reachability analysis tool

slide-76
SLIDE 76

Conclusions and Future Work

◮ Symbolic algorithms for measuring information leakage ◮ Interagble in any BDD based reachability analysis tool ◮ Summary calculation is the overhead - BDD size (algebraic operations)

and variable orderings

slide-77
SLIDE 77

Conclusions and Future Work

◮ Symbolic algorithms for measuring information leakage ◮ Interagble in any BDD based reachability analysis tool ◮ Summary calculation is the overhead - BDD size (algebraic operations)

and variable orderings

◮ Future work:

slide-78
SLIDE 78

Conclusions and Future Work

◮ Symbolic algorithms for measuring information leakage ◮ Interagble in any BDD based reachability analysis tool ◮ Summary calculation is the overhead - BDD size (algebraic operations)

and variable orderings

◮ Future work:

◮ Recursive algorithms

slide-79
SLIDE 79

Conclusions and Future Work

◮ Symbolic algorithms for measuring information leakage ◮ Interagble in any BDD based reachability analysis tool ◮ Summary calculation is the overhead - BDD size (algebraic operations)

and variable orderings

◮ Future work:

◮ Recursive algorithms ◮ Other symbolic model-checking frameworks - CEGAR

slide-80
SLIDE 80

Conclusions and Future Work

◮ Symbolic algorithms for measuring information leakage ◮ Interagble in any BDD based reachability analysis tool ◮ Summary calculation is the overhead - BDD size (algebraic operations)

and variable orderings

◮ Future work:

◮ Recursive algorithms ◮ Other symbolic model-checking frameworks - CEGAR

slide-81
SLIDE 81

Thank You !