SlideShare a Scribd company logo
THE PROBLEM
                  THE APPROACH
                    CONCLUSION




    Symbolic Quantitative Information Flow

Quoc-Sang Phan1     Pasquale Malacaria1             Oksana Tkachuk2
                    Corina S. P˘s˘reanu2
                               aa

                  Queen Mary University of London

                    Nasa Ames Research Center


                     November 12, 2012




                                                                      1 / 17
THE PROBLEM   Non-interference
                 THE APPROACH   Quantitative Information Flow
                   CONCLUSION   State of the art


Attacker model




                                                                2 / 17
THE PROBLEM   Non-interference
                      THE APPROACH   Quantitative Information Flow
                        CONCLUSION   State of the art


Attacker model: an example



  Example: an attacker steals your cash card
      Having no idea about your pin number.
      A priori probability to guess: 0.0001.

  Randomly try a pin number:
      The pin is accepted (with probability 0.0001)
      The pin is rejected (with probability 0.9999)
      What did the attacker learn?




                                                                     3 / 17
THE PROBLEM   Non-interference
                      THE APPROACH   Quantitative Information Flow
                        CONCLUSION   State of the art


Quantitative Information Flow Analysis

  Definition 1
     leakage = secrecy before observing - secrecy after observing

  Given a function F measuring secrecy

                      ∆F (H) = F (H) − F (H|L)

  F is based on Information Theory
      Shannon Entropy: cash machine ∆H = 0.00147
      Min Entropy
      Guessing Entropy


                                                                     4 / 17
THE PROBLEM   Non-interference
                     THE APPROACH   Quantitative Information Flow
                       CONCLUSION   State of the art


State of the art


  Channel Capacity

                        ∆F (H) ≤ log2 (N)

  Existing work:
      Barvinok-based counting (Backes et al, S&P 2009): too
      restrictive and over-complicated.
      Bit patterns counting (Meng and Smith, PLAS 2011): largely
      manual, imprecise when outputs are diverged in the state
      space.




                                                                    5 / 17
THE PROBLEM
                                     Symbolic Quantitative Information Flow
                      THE APPROACH
                                     Preliminary Experiment
                        CONCLUSION


Data Sanitization Example


             base = 8;
             if (H < 16) then
                 O = base + H
             else
                 O = base
             end if
     Output in [8..23]
     Output is represented by a bit vector bvo := bK bK −1 ..b1 .
     For each bit, check whether it’s always 0 or 1 or any




                                                                              6 / 17
THE PROBLEM
                                     Symbolic Quantitative Information Flow
                      THE APPROACH
                                     Preliminary Experiment
                        CONCLUSION


Automation of BitPattern method


     Input symbolic
     Extracting ith bit

             for all element bi in vector bvo do
                 bi = (O >> i) &1
             end for

     Check assert bi == 0
     Automate bit queries by verifying assertions by JPF




                                                                              7 / 17
THE PROBLEM
                                     Symbolic Quantitative Information Flow
                      THE APPROACH
                                     Preliminary Experiment
                        CONCLUSION


Bit Pattern Results for Sanitization Example



      Output in [8..23]
      One-Bit Pattern: 000000000000000000000000000*****
      Two-Bit Pattern: b4 b3 can only be {01,10} → 16 possible
      outputs
      Max leakage = 4 bits
      Translate BitPattern to CNF, count solutions by RelSat




                                                                              8 / 17
THE PROBLEM
                                    Symbolic Quantitative Information Flow
                     THE APPROACH
                                    Preliminary Experiment
                       CONCLUSION


Symbolic Quantitative Information Flow



     Output is represented by a bit vector bvo := bK bK −1 ..b1 .
     Use Symbolic Execution to explore all possible values of bvo
         Add one condition for each bit bi to test it.
         There are K additional conditions in total.
         There are 2K combinations of condition, each one represents a
         distinct possible value.
     Count the distinct concrete values return by Symbolic
     Pathfinder.




                                                                             9 / 17
THE PROBLEM
                                  Symbolic Quantitative Information Flow
                   THE APPROACH
                                  Preliminary Experiment
                     CONCLUSION


Symbolic Counting by Symbolic Execution
           base = 8;
           if (H < 16) then
               O = base + H
           else
               O = base
           end if
           for all element bi in vector bvo do
               bi = (O >> i) &1
           end for
           for all element bi in vector bvo do
               if (bi == 1) then
                   pi = True
               else
                   pi = False
               end if
           end for                                                         10 / 17
THE PROBLEM
                                          Symbolic Quantitative Information Flow
                     THE APPROACH
                                          Preliminary Experiment
                       CONCLUSION


Symbolic Counting by Symbolic Execution

                                     s1

                H < 16                                       H ≥ 16

                          s2                            s3
         InitializeP C                                       InitializeP C
         pc := (H < 16)                                      pc := (H ≥ 16)
                          p1                            p1
                               pc ∧ p1                           pc ∧ p1

                                p2                                p2

             pc ∧ p1 ∧ ¬p2                            pc ∧ p1 ∧ p2


     (H ≥ 16) and (H < 16): program conditions.
     p1 , p2 , ..: additional conditions.
                                                                                   11 / 17
THE PROBLEM
                                                 Symbolic Quantitative Information Flow
                         THE APPROACH
                                                 Preliminary Experiment
                           CONCLUSION


Path Exploration with Addtional Constraints

          p1
               pc ∧ p1


                 p2
                          pc ∧ p1 ∧ p2


                            p3
                                    pc ∧ p1 ∧ p2 ∧ p3


                                         p4
                                                 pc ∧ p1 ∧ p2 ∧ p3 ∧ p4


                                                     p5
                  pc ∧ p1 ∧ p2 ∧ p3 ∧ p4 ∧ ¬p5              pc ∧ p1 ∧ p2 ∧ p3 ∧ p4 ∧ p5


                                                             UNSAT



      assert p1 is SAT
      assert p1 && p2 && p3 && p4 && p5 is UNSAT                                          12 / 17
THE PROBLEM
               Symbolic Quantitative Information Flow
THE APPROACH
               Preliminary Experiment
  CONCLUSION




          DEMO




                                                        13 / 17
THE PROBLEM
                                    Symbolic Quantitative Information Flow
                     THE APPROACH
                                    Preliminary Experiment
                       CONCLUSION


Implicit Flow

                      O = 0;
                      if (H == 0) O = 0;
                      else if (H == 1) O = 1;
                      else if (H == 2) O = 2;
                      else if (H == 3) O = 3;
                      else if (H == 4) O = 4;
                      else if (H == 5) O = 5;
                      else if (H == 6) O = 6;
                      else O = 0;
                        Figure: Implicit Flow

      BitPattern: 45ms, channel capacity: 3 bits
      SQIF-SE: 717ms, channel capacity: 2.81 bits

                                                                             14 / 17
THE PROBLEM
                                    Symbolic Quantitative Information Flow
                     THE APPROACH
                                    Preliminary Experiment
                       CONCLUSION


Ten random outputs


                  if (H == r1) O = r1;
                  else if (H == r2) O = r2;
                  else if (H == r3) O = r3;
                  ...
                  else if (H == r9) O = r9;
                  else O = r10;
                    Figure: Ten random outputs

     BitPattern: 5 seconds, channel capacity: 18.645.
     SQIF-SE: less than 1 second, channel capacity: 3.322 bits.



                                                                             15 / 17
THE PROBLEM
                     THE APPROACH
                       CONCLUSION


Conclusions



     A novel method for precise QIF.
         Compare to Barvinok-based counting: simpler, less restrictive,
         more applicable.
         Compare to BitPattern : always more precise, faster when
         possible outputs are diverged in state-space.
     Automation of BitPattern method.
     jpf-qif: the first tool to support information-theoretic QIF
     analysis.




                                                                          16 / 17
THE PROBLEM
     THE APPROACH
       CONCLUSION




THANK YOU FOR YOUR ATTENTION!




                                17 / 17

More Related Content

What's hot

Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
Abhiraj Bohra
 

What's hot (19)

Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
 
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set
8085 Paper Presentation slides,ppt,microprocessor 8085 ,guide, instruction set
 
Math cl ccw_siemens_rev01_fa16
Math cl ccw_siemens_rev01_fa16Math cl ccw_siemens_rev01_fa16
Math cl ccw_siemens_rev01_fa16
 
Chapter 7 8051 programming in c
Chapter 7  8051 programming in cChapter 7  8051 programming in c
Chapter 7 8051 programming in c
 
assembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YUassembly language programming and organization of IBM PC" by YTHA YU
assembly language programming and organization of IBM PC" by YTHA YU
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 7 (Logic, Shift,...
 
04 sequentialbasics 1
04 sequentialbasics 104 sequentialbasics 1
04 sequentialbasics 1
 
N_Asm Assembly arithmetic instructions (sol)
N_Asm Assembly arithmetic instructions (sol)N_Asm Assembly arithmetic instructions (sol)
N_Asm Assembly arithmetic instructions (sol)
 
chapter 7 Logic, shift and rotate instructions
chapter 7 Logic, shift and rotate instructionschapter 7 Logic, shift and rotate instructions
chapter 7 Logic, shift and rotate instructions
 
Liszt los alamos national laboratory Aug 2011
Liszt los alamos national laboratory Aug 2011Liszt los alamos national laboratory Aug 2011
Liszt los alamos national laboratory Aug 2011
 
Mpmc lab
Mpmc labMpmc lab
Mpmc lab
 
Daa chapter10
Daa chapter10Daa chapter10
Daa chapter10
 
Intel 8051 Programming in C
Intel 8051 Programming in CIntel 8051 Programming in C
Intel 8051 Programming in C
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
 
8051 programming in c
8051 programming in c8051 programming in c
8051 programming in c
 
15-bit NOVEL Hamming Codec using HSPICE 22nm CMOS Technology based on GDI Tec...
15-bit NOVEL Hamming Codec using HSPICE 22nm CMOS Technology based on GDI Tec...15-bit NOVEL Hamming Codec using HSPICE 22nm CMOS Technology based on GDI Tec...
15-bit NOVEL Hamming Codec using HSPICE 22nm CMOS Technology based on GDI Tec...
 
MeCC: Memory Comparison-based Code Clone Detector
MeCC: Memory Comparison-based Code Clone DetectorMeCC: Memory Comparison-based Code Clone Detector
MeCC: Memory Comparison-based Code Clone Detector
 
Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...
Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...
Chap 8 The stack and introduction to procedures & Chapter 9 multiplication an...
 
Fpga 05-verilog-programming
Fpga 05-verilog-programmingFpga 05-verilog-programming
Fpga 05-verilog-programming
 

Similar to Symbolic Quantitative Information Flow

第四次课程 Chap8
第四次课程 Chap8第四次课程 Chap8
第四次课程 Chap8
Emma2013
 
D I G I T A L C O M M U N I C A T I O N S J N T U M O D E L P A P E R{Www
D I G I T A L  C O M M U N I C A T I O N S  J N T U  M O D E L  P A P E R{WwwD I G I T A L  C O M M U N I C A T I O N S  J N T U  M O D E L  P A P E R{Www
D I G I T A L C O M M U N I C A T I O N S J N T U M O D E L P A P E R{Www
guest3f9c6b
 

Similar to Symbolic Quantitative Information Flow (17)

Quantifying Information Leaks via Model Counting Modulo Theories
Quantifying Information Leaks via Model Counting Modulo TheoriesQuantifying Information Leaks via Model Counting Modulo Theories
Quantifying Information Leaks via Model Counting Modulo Theories
 
cp467_12_lecture14_image compression1.pdf
cp467_12_lecture14_image compression1.pdfcp467_12_lecture14_image compression1.pdf
cp467_12_lecture14_image compression1.pdf
 
第四次课程 Chap8
第四次课程 Chap8第四次课程 Chap8
第四次课程 Chap8
 
Towards an SMT-based approach for Quantitative Information Flow
Towards an SMT-based approach for Quantitative Information FlowTowards an SMT-based approach for Quantitative Information Flow
Towards an SMT-based approach for Quantitative Information Flow
 
Channel coding
Channel codingChannel coding
Channel coding
 
DC Lecture Slides 1 - Information Theory.ppt
DC Lecture Slides 1 - Information Theory.pptDC Lecture Slides 1 - Information Theory.ppt
DC Lecture Slides 1 - Information Theory.ppt
 
D I G I T A L C O M M U N I C A T I O N S J N T U M O D E L P A P E R{Www
D I G I T A L  C O M M U N I C A T I O N S  J N T U  M O D E L  P A P E R{WwwD I G I T A L  C O M M U N I C A T I O N S  J N T U  M O D E L  P A P E R{Www
D I G I T A L C O M M U N I C A T I O N S J N T U M O D E L P A P E R{Www
 
Digital Communications Jntu Model Paper{Www.Studentyogi.Com}
Digital Communications Jntu Model Paper{Www.Studentyogi.Com}Digital Communications Jntu Model Paper{Www.Studentyogi.Com}
Digital Communications Jntu Model Paper{Www.Studentyogi.Com}
 
All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...
All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...
All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...
 
Digital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationDigital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentation
 
Unit I DIGITAL COMMUNICATION-INFORMATION THEORY.pdf
Unit I DIGITAL COMMUNICATION-INFORMATION THEORY.pdfUnit I DIGITAL COMMUNICATION-INFORMATION THEORY.pdf
Unit I DIGITAL COMMUNICATION-INFORMATION THEORY.pdf
 
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
 
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
PREDICTING THE TIME OF OBLIVIOUS PROGRAMS. Euromicro 2001
 
Robust watermarking technique sppt
Robust watermarking technique spptRobust watermarking technique sppt
Robust watermarking technique sppt
 
zkStudyClub - Improving performance of non-native arithmetic in SNARKs (Ivo K...
zkStudyClub - Improving performance of non-native arithmetic in SNARKs (Ivo K...zkStudyClub - Improving performance of non-native arithmetic in SNARKs (Ivo K...
zkStudyClub - Improving performance of non-native arithmetic in SNARKs (Ivo K...
 
AI Lesson 29
AI Lesson 29AI Lesson 29
AI Lesson 29
 
Lesson 29
Lesson 29Lesson 29
Lesson 29
 

More from Quoc-Sang Phan (6)

Model-counting Approaches For Nonlinear Numerical Constraints
Model-counting Approaches For Nonlinear Numerical ConstraintsModel-counting Approaches For Nonlinear Numerical Constraints
Model-counting Approaches For Nonlinear Numerical Constraints
 
Concurrent Bounded Model Checking
Concurrent Bounded Model CheckingConcurrent Bounded Model Checking
Concurrent Bounded Model Checking
 
Symbolic Execution as DPLL Modulo Theories
Symbolic Execution as DPLL Modulo TheoriesSymbolic Execution as DPLL Modulo Theories
Symbolic Execution as DPLL Modulo Theories
 
Quantifying Information Leaks using Reliability Analysis
Quantifying Information Leaks using Reliability AnalysisQuantifying Information Leaks using Reliability Analysis
Quantifying Information Leaks using Reliability Analysis
 
Quantifying Information Leaks using Reliability Analysis
Quantifying Information Leaks using Reliability AnalysisQuantifying Information Leaks using Reliability Analysis
Quantifying Information Leaks using Reliability Analysis
 
Self-composition by Symbolic Execution
Self-composition by Symbolic ExecutionSelf-composition by Symbolic Execution
Self-composition by Symbolic Execution
 

Recently uploaded

Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
Avinash Rai
 

Recently uploaded (20)

Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
The Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational ResourcesThe Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational Resources
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resources
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. Henry
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17
 
The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceutics
 
Morse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptxMorse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptx
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx
 

Symbolic Quantitative Information Flow

  • 1. THE PROBLEM THE APPROACH CONCLUSION Symbolic Quantitative Information Flow Quoc-Sang Phan1 Pasquale Malacaria1 Oksana Tkachuk2 Corina S. P˘s˘reanu2 aa Queen Mary University of London Nasa Ames Research Center November 12, 2012 1 / 17
  • 2. THE PROBLEM Non-interference THE APPROACH Quantitative Information Flow CONCLUSION State of the art Attacker model 2 / 17
  • 3. THE PROBLEM Non-interference THE APPROACH Quantitative Information Flow CONCLUSION State of the art Attacker model: an example Example: an attacker steals your cash card Having no idea about your pin number. A priori probability to guess: 0.0001. Randomly try a pin number: The pin is accepted (with probability 0.0001) The pin is rejected (with probability 0.9999) What did the attacker learn? 3 / 17
  • 4. THE PROBLEM Non-interference THE APPROACH Quantitative Information Flow CONCLUSION State of the art Quantitative Information Flow Analysis Definition 1 leakage = secrecy before observing - secrecy after observing Given a function F measuring secrecy ∆F (H) = F (H) − F (H|L) F is based on Information Theory Shannon Entropy: cash machine ∆H = 0.00147 Min Entropy Guessing Entropy 4 / 17
  • 5. THE PROBLEM Non-interference THE APPROACH Quantitative Information Flow CONCLUSION State of the art State of the art Channel Capacity ∆F (H) ≤ log2 (N) Existing work: Barvinok-based counting (Backes et al, S&P 2009): too restrictive and over-complicated. Bit patterns counting (Meng and Smith, PLAS 2011): largely manual, imprecise when outputs are diverged in the state space. 5 / 17
  • 6. THE PROBLEM Symbolic Quantitative Information Flow THE APPROACH Preliminary Experiment CONCLUSION Data Sanitization Example base = 8; if (H < 16) then O = base + H else O = base end if Output in [8..23] Output is represented by a bit vector bvo := bK bK −1 ..b1 . For each bit, check whether it’s always 0 or 1 or any 6 / 17
  • 7. THE PROBLEM Symbolic Quantitative Information Flow THE APPROACH Preliminary Experiment CONCLUSION Automation of BitPattern method Input symbolic Extracting ith bit for all element bi in vector bvo do bi = (O >> i) &1 end for Check assert bi == 0 Automate bit queries by verifying assertions by JPF 7 / 17
  • 8. THE PROBLEM Symbolic Quantitative Information Flow THE APPROACH Preliminary Experiment CONCLUSION Bit Pattern Results for Sanitization Example Output in [8..23] One-Bit Pattern: 000000000000000000000000000***** Two-Bit Pattern: b4 b3 can only be {01,10} → 16 possible outputs Max leakage = 4 bits Translate BitPattern to CNF, count solutions by RelSat 8 / 17
  • 9. THE PROBLEM Symbolic Quantitative Information Flow THE APPROACH Preliminary Experiment CONCLUSION Symbolic Quantitative Information Flow Output is represented by a bit vector bvo := bK bK −1 ..b1 . Use Symbolic Execution to explore all possible values of bvo Add one condition for each bit bi to test it. There are K additional conditions in total. There are 2K combinations of condition, each one represents a distinct possible value. Count the distinct concrete values return by Symbolic Pathfinder. 9 / 17
  • 10. THE PROBLEM Symbolic Quantitative Information Flow THE APPROACH Preliminary Experiment CONCLUSION Symbolic Counting by Symbolic Execution base = 8; if (H < 16) then O = base + H else O = base end if for all element bi in vector bvo do bi = (O >> i) &1 end for for all element bi in vector bvo do if (bi == 1) then pi = True else pi = False end if end for 10 / 17
  • 11. THE PROBLEM Symbolic Quantitative Information Flow THE APPROACH Preliminary Experiment CONCLUSION Symbolic Counting by Symbolic Execution s1 H < 16 H ≥ 16 s2 s3 InitializeP C InitializeP C pc := (H < 16) pc := (H ≥ 16) p1 p1 pc ∧ p1 pc ∧ p1 p2 p2 pc ∧ p1 ∧ ¬p2 pc ∧ p1 ∧ p2 (H ≥ 16) and (H < 16): program conditions. p1 , p2 , ..: additional conditions. 11 / 17
  • 12. THE PROBLEM Symbolic Quantitative Information Flow THE APPROACH Preliminary Experiment CONCLUSION Path Exploration with Addtional Constraints p1 pc ∧ p1 p2 pc ∧ p1 ∧ p2 p3 pc ∧ p1 ∧ p2 ∧ p3 p4 pc ∧ p1 ∧ p2 ∧ p3 ∧ p4 p5 pc ∧ p1 ∧ p2 ∧ p3 ∧ p4 ∧ ¬p5 pc ∧ p1 ∧ p2 ∧ p3 ∧ p4 ∧ p5 UNSAT assert p1 is SAT assert p1 && p2 && p3 && p4 && p5 is UNSAT 12 / 17
  • 13. THE PROBLEM Symbolic Quantitative Information Flow THE APPROACH Preliminary Experiment CONCLUSION DEMO 13 / 17
  • 14. THE PROBLEM Symbolic Quantitative Information Flow THE APPROACH Preliminary Experiment CONCLUSION Implicit Flow O = 0; if (H == 0) O = 0; else if (H == 1) O = 1; else if (H == 2) O = 2; else if (H == 3) O = 3; else if (H == 4) O = 4; else if (H == 5) O = 5; else if (H == 6) O = 6; else O = 0; Figure: Implicit Flow BitPattern: 45ms, channel capacity: 3 bits SQIF-SE: 717ms, channel capacity: 2.81 bits 14 / 17
  • 15. THE PROBLEM Symbolic Quantitative Information Flow THE APPROACH Preliminary Experiment CONCLUSION Ten random outputs if (H == r1) O = r1; else if (H == r2) O = r2; else if (H == r3) O = r3; ... else if (H == r9) O = r9; else O = r10; Figure: Ten random outputs BitPattern: 5 seconds, channel capacity: 18.645. SQIF-SE: less than 1 second, channel capacity: 3.322 bits. 15 / 17
  • 16. THE PROBLEM THE APPROACH CONCLUSION Conclusions A novel method for precise QIF. Compare to Barvinok-based counting: simpler, less restrictive, more applicable. Compare to BitPattern : always more precise, faster when possible outputs are diverged in state-space. Automation of BitPattern method. jpf-qif: the first tool to support information-theoretic QIF analysis. 16 / 17
  • 17. THE PROBLEM THE APPROACH CONCLUSION THANK YOU FOR YOUR ATTENTION! 17 / 17