SlideShare a Scribd company logo
Quantifying Information Leaks using Reliability Analysis
Quoc-Sang Phan∗
Pasquale Malacaria∗
Corina S. P˘as˘areanu†
Marcelo d’Amorim‡
∗
Queen Mary University of London †
Carnegie Mellon Silicon Valley and NASA Ames ‡
Federal University of Pernambuco
Information Flow
Secret Input Public input
Program P
Public Output
Non-interference
Public input
Program P
Secret Input
Information leaked
Public Output
√
?
H HL L
O O
Non-interference is often unachievable
Example: a password checking program:
if(H == L) O = ACCEPT; else O = REJECT;
The program violates non-interference. Is it secure?
Non-interference: Does it leak information?
Quantitative Information Flow: “How much” does it leak?
→ Measure the leaks using information-theoretic metrics.
Quantitative Information Flow
Assuming that the password is a 4-digit PIN, and the attacker has no prior
knowledge: there are 10000 possible values (0 . . . 9999) for H.
There are log2(10000) = 13.29 bits of secret.
The probability to guess the password correctly: 1
10000
The probability to be rejected: 9999
10000
Leakage after one try in Shannon entropy:
pi log2(
1
pi
) =
1
10000
log2(10000)+
9999
10000
log2(
10000
9999
) = 0.00147
Formalisation
Adversary
tries to infer
H from L and O
H
L
O
f
Leaks = Secrecy before observing - Secrecy after observing
Definition:
XH, XL, XO: random variables representing the distributions of H, L, O.
E (entropy): function measuring secrecy.
∆E(XH) = E(XH) − E(XH|XL = l, XO)
Theorem of channel capacity:
∆E(XH) ≤ log2(|O|)
has been proved in the cases E is Shannon entropy and R´enyi’s min-entropy.
holds for any distribution of XH.
is the basis of state-of-the-art techniques for Quantitative Information Flow.
log2(|O|) is the channel capacity of program P, denoted by CC(P).
QILURA
Program
Symbolic
PathFinder
Labeling
Procedure
Z3 Omega
Quantifying
Procedure
Latte
Input
labels
k bits
Symbolic PathFinder
Take symbols as inputs instead of concrete data.
Build path condition pci ≡ ci(α, β) for each symbolic path ρi.
Execute program P with H = α and L = β
O =



f1(α, β) if c1(α, β)
f2(α, β) if c2(α, β)
. . . . . .
fm(α, β) if cm(α, β)



For the symbolic path ρi with final state σi ∈ F: O|σi
= fi(α, β).
Define a function: path(ρi) = ci(α, β).
Labelling Procedure
Self-composition
P : copy of P with all variable renamed: H, L, O → H , L , O
The following Hoare triple guarantees non-interference
{L = L }P; P {O = O }
Suppose we run Symbolic Execution on P; P with
H = α; H = α1; L = L = β
The symbolic semantics of P and P is R and R
Fine-grained Self-composition by Symbolic Execution
∀ρ ∈ R, ρ ∈ R .path(ρ) ∧ path(ρ ) → O|fin(ρ) = O |fin(ρ )
Quantifying Procedure
CC(P) ≤ log2(Σ#out(ρc) + Σ#out(ρi) + Σ#out(ρd))
Σ#out(ρc) = 1.
Σ#out(ρi) is the number of indirect paths ρi.
Σ#out(ρd):
#out(ρd) ≤ #in(ρd), consequently Σ#out(ρd) ≤ Σ#in(ρd).
Compute #in(ρd) using Reliability Analysis engine.
Preliminary Evaluation
Case Study
jpf-qif QILURA BitPattern
Capacity Time Upper Bound Time Upper Bound Time
No Flow 0 2.304 0 0.790 - -
Sanity check 1 4 45.324 4.09 1.066 4 0.036
Sanity check 2 4 35.346 4.09 1.049 4.59 0.203
Implicit Flow 2.81 0.897 3 0.796 3 0.011
Electronic Purse 2 1.169 2.32 0.854 2 0.157
Ten random outputs 3.32 1.050 3.32 0.814 18.645 0.224
Conclusions
QILURA: a fully automated tool to quantify leaks in Java bytecode.
Two-steps analysis:
Fine-grained self-composition to label paths.
Reliability Analysis engine to quantify inputs in each path.
Download:
https://github.com/qif/jpf-qilura
http://www.eecs.qmul.ac.uk/∼qsp30/ q.phan@qmul.ac.uk

More Related Content

What's hot

88 c-programs
88 c-programs88 c-programs
88 c-programs
Leandro Schenone
 
MapReduce for Parallel Trace Validation of LTL Properties
MapReduce for Parallel Trace Validation of LTL PropertiesMapReduce for Parallel Trace Validation of LTL Properties
MapReduce for Parallel Trace Validation of LTL Properties
Sylvain Hallé
 
C program to check leap year
C program to check leap year C program to check leap year
C program to check leap year
mohdshanu
 
Add digits of number in c
Add digits of number in c Add digits of number in c
Add digits of number in c
mohdshanu
 
An introduction to lattice-based cryptography
An introduction to lattice-based cryptographyAn introduction to lattice-based cryptography
An introduction to lattice-based cryptography
Thijs Laarhoven
 
Csci101 lect06 advanced_looping
Csci101 lect06 advanced_loopingCsci101 lect06 advanced_looping
Csci101 lect06 advanced_looping
Elsayed Hemayed
 
Runtime Monitoring of Stream Logic Formulae (Talk @ FPS 2015)
Runtime Monitoring of Stream Logic Formulae (Talk @ FPS 2015)Runtime Monitoring of Stream Logic Formulae (Talk @ FPS 2015)
Runtime Monitoring of Stream Logic Formulae (Talk @ FPS 2015)
Sylvain Hallé
 
MATLAB CODE OF Shifting sequence
MATLAB  CODE  OF Shifting sequenceMATLAB  CODE  OF Shifting sequence
MATLAB CODE OF Shifting sequence
Rakesh kumar jha
 
matlab code of shifting and folding of two sequences
matlab code of shifting and folding of two sequencesmatlab code of shifting and folding of two sequences
matlab code of shifting and folding of two sequences
Rakesh kumar jha
 
Carry save adder Type 2
Carry save adder Type 2Carry save adder Type 2
Carry save adder Type 2
Atchyuth Sonti
 
I am trying to figure out why my code won't work. It keeps telling me that my...
I am trying to figure out why my code won't work. It keeps telling me that my...I am trying to figure out why my code won't work. It keeps telling me that my...
I am trying to figure out why my code won't work. It keeps telling me that my...
hwbloom460000
 
Palindrome number program in c
Palindrome number program in cPalindrome number program in c
Palindrome number program in c
mohdshanu
 
Looping
LoopingLooping
Lec14-CS110 Computational Engineering
Lec14-CS110 Computational EngineeringLec14-CS110 Computational Engineering
Lec14-CS110 Computational Engineering
Sri Harsha Pamu
 
Tech Talks @NSU: DLang: возможности языка и его применение
Tech Talks @NSU: DLang: возможности языка и его применениеTech Talks @NSU: DLang: возможности языка и его применение
Tech Talks @NSU: DLang: возможности языка и его применение
Tech Talks @NSU
 
Sigma Protocols and Zero Knowledge
Sigma Protocols and Zero KnowledgeSigma Protocols and Zero Knowledge
Sigma Protocols and Zero Knowledge
Alex Chepurnoy
 

What's hot (20)

88 c-programs
88 c-programs88 c-programs
88 c-programs
 
Fibonnaci
FibonnaciFibonnaci
Fibonnaci
 
MapReduce for Parallel Trace Validation of LTL Properties
MapReduce for Parallel Trace Validation of LTL PropertiesMapReduce for Parallel Trace Validation of LTL Properties
MapReduce for Parallel Trace Validation of LTL Properties
 
C program to check leap year
C program to check leap year C program to check leap year
C program to check leap year
 
Add digits of number in c
Add digits of number in c Add digits of number in c
Add digits of number in c
 
An introduction to lattice-based cryptography
An introduction to lattice-based cryptographyAn introduction to lattice-based cryptography
An introduction to lattice-based cryptography
 
Csci101 lect06 advanced_looping
Csci101 lect06 advanced_loopingCsci101 lect06 advanced_looping
Csci101 lect06 advanced_looping
 
Runtime Monitoring of Stream Logic Formulae (Talk @ FPS 2015)
Runtime Monitoring of Stream Logic Formulae (Talk @ FPS 2015)Runtime Monitoring of Stream Logic Formulae (Talk @ FPS 2015)
Runtime Monitoring of Stream Logic Formulae (Talk @ FPS 2015)
 
MATLAB CODE OF Shifting sequence
MATLAB  CODE  OF Shifting sequenceMATLAB  CODE  OF Shifting sequence
MATLAB CODE OF Shifting sequence
 
matlab code of shifting and folding of two sequences
matlab code of shifting and folding of two sequencesmatlab code of shifting and folding of two sequences
matlab code of shifting and folding of two sequences
 
Progr2
Progr2Progr2
Progr2
 
Carry save adder Type 2
Carry save adder Type 2Carry save adder Type 2
Carry save adder Type 2
 
I am trying to figure out why my code won't work. It keeps telling me that my...
I am trying to figure out why my code won't work. It keeps telling me that my...I am trying to figure out why my code won't work. It keeps telling me that my...
I am trying to figure out why my code won't work. It keeps telling me that my...
 
Palindrome number program in c
Palindrome number program in cPalindrome number program in c
Palindrome number program in c
 
Carry save adder vhdl
Carry save adder vhdlCarry save adder vhdl
Carry save adder vhdl
 
Looping
LoopingLooping
Looping
 
Lec14-CS110 Computational Engineering
Lec14-CS110 Computational EngineeringLec14-CS110 Computational Engineering
Lec14-CS110 Computational Engineering
 
Tech Talks @NSU: DLang: возможности языка и его применение
Tech Talks @NSU: DLang: возможности языка и его применениеTech Talks @NSU: DLang: возможности языка и его применение
Tech Talks @NSU: DLang: возможности языка и его применение
 
C programming
C programmingC programming
C programming
 
Sigma Protocols and Zero Knowledge
Sigma Protocols and Zero KnowledgeSigma Protocols and Zero Knowledge
Sigma Protocols and Zero Knowledge
 

More from Quoc-Sang Phan

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
Quoc-Sang Phan
 
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...
Quoc-Sang Phan
 
Concurrent Bounded Model Checking
Concurrent Bounded Model CheckingConcurrent Bounded Model Checking
Concurrent Bounded Model CheckingQuoc-Sang Phan
 
Symbolic Execution as DPLL Modulo Theories
Symbolic Execution as DPLL Modulo TheoriesSymbolic Execution as DPLL Modulo Theories
Symbolic Execution as DPLL Modulo Theories
Quoc-Sang Phan
 
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
Quoc-Sang Phan
 
Self-composition by Symbolic Execution
Self-composition by Symbolic ExecutionSelf-composition by Symbolic Execution
Self-composition by Symbolic Execution
Quoc-Sang Phan
 
Symbolic Quantitative Information Flow
Symbolic Quantitative Information FlowSymbolic Quantitative Information Flow
Symbolic Quantitative Information Flow
Quoc-Sang Phan
 

More from Quoc-Sang Phan (7)

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
 
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...
 
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
 
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
 
Self-composition by Symbolic Execution
Self-composition by Symbolic ExecutionSelf-composition by Symbolic Execution
Self-composition by Symbolic Execution
 
Symbolic Quantitative Information Flow
Symbolic Quantitative Information FlowSymbolic Quantitative Information Flow
Symbolic Quantitative Information Flow
 

Recently uploaded

Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
NathanBaughman3
 
platelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptxplatelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptx
muralinath2
 
Lateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensiveLateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensive
silvermistyshot
 
Comparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebratesComparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebrates
sachin783648
 
Multi-source connectivity as the driver of solar wind variability in the heli...
Multi-source connectivity as the driver of solar wind variability in the heli...Multi-source connectivity as the driver of solar wind variability in the heli...
Multi-source connectivity as the driver of solar wind variability in the heli...
Sérgio Sacani
 
Comparing Evolved Extractive Text Summary Scores of Bidirectional Encoder Rep...
Comparing Evolved Extractive Text Summary Scores of Bidirectional Encoder Rep...Comparing Evolved Extractive Text Summary Scores of Bidirectional Encoder Rep...
Comparing Evolved Extractive Text Summary Scores of Bidirectional Encoder Rep...
University of Maribor
 
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Ana Luísa Pinho
 
ESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptxESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptx
muralinath2
 
Mammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also FunctionsMammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also Functions
YOGESH DOGRA
 
Nutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technologyNutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technology
Lokesh Patil
 
Cancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate PathwayCancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate Pathway
AADYARAJPANDEY1
 
extra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdfextra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdf
DiyaBiswas10
 
In silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptxIn silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptx
AlaminAfendy1
 
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
muralinath2
 
Hemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptxHemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptx
muralinath2
 
EY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptxEY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptx
AlguinaldoKong
 
Lab report on liquid viscosity of glycerin
Lab report on liquid viscosity of glycerinLab report on liquid viscosity of glycerin
Lab report on liquid viscosity of glycerin
ossaicprecious19
 
Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.
Nistarini College, Purulia (W.B) India
 
Richard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlandsRichard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlands
Richard Gill
 
insect taxonomy importance systematics and classification
insect taxonomy importance systematics and classificationinsect taxonomy importance systematics and classification
insect taxonomy importance systematics and classification
anitaento25
 

Recently uploaded (20)

Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
 
platelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptxplatelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptx
 
Lateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensiveLateral Ventricles.pdf very easy good diagrams comprehensive
Lateral Ventricles.pdf very easy good diagrams comprehensive
 
Comparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebratesComparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebrates
 
Multi-source connectivity as the driver of solar wind variability in the heli...
Multi-source connectivity as the driver of solar wind variability in the heli...Multi-source connectivity as the driver of solar wind variability in the heli...
Multi-source connectivity as the driver of solar wind variability in the heli...
 
Comparing Evolved Extractive Text Summary Scores of Bidirectional Encoder Rep...
Comparing Evolved Extractive Text Summary Scores of Bidirectional Encoder Rep...Comparing Evolved Extractive Text Summary Scores of Bidirectional Encoder Rep...
Comparing Evolved Extractive Text Summary Scores of Bidirectional Encoder Rep...
 
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
Deep Behavioral Phenotyping in Systems Neuroscience for Functional Atlasing a...
 
ESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptxESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptx
 
Mammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also FunctionsMammalian Pineal Body Structure and Also Functions
Mammalian Pineal Body Structure and Also Functions
 
Nutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technologyNutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technology
 
Cancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate PathwayCancer cell metabolism: special Reference to Lactate Pathway
Cancer cell metabolism: special Reference to Lactate Pathway
 
extra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdfextra-chromosomal-inheritance[1].pptx.pdfpdf
extra-chromosomal-inheritance[1].pptx.pdfpdf
 
In silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptxIn silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptx
 
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
 
Hemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptxHemostasis_importance& clinical significance.pptx
Hemostasis_importance& clinical significance.pptx
 
EY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptxEY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptx
 
Lab report on liquid viscosity of glycerin
Lab report on liquid viscosity of glycerinLab report on liquid viscosity of glycerin
Lab report on liquid viscosity of glycerin
 
Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.Nucleic Acid-its structural and functional complexity.
Nucleic Acid-its structural and functional complexity.
 
Richard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlandsRichard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlands
 
insect taxonomy importance systematics and classification
insect taxonomy importance systematics and classificationinsect taxonomy importance systematics and classification
insect taxonomy importance systematics and classification
 

Quantifying Information Leaks using Reliability Analysis

  • 1. Quantifying Information Leaks using Reliability Analysis Quoc-Sang Phan∗ Pasquale Malacaria∗ Corina S. P˘as˘areanu† Marcelo d’Amorim‡ ∗ Queen Mary University of London † Carnegie Mellon Silicon Valley and NASA Ames ‡ Federal University of Pernambuco Information Flow Secret Input Public input Program P Public Output Non-interference Public input Program P Secret Input Information leaked Public Output √ ? H HL L O O Non-interference is often unachievable Example: a password checking program: if(H == L) O = ACCEPT; else O = REJECT; The program violates non-interference. Is it secure? Non-interference: Does it leak information? Quantitative Information Flow: “How much” does it leak? → Measure the leaks using information-theoretic metrics. Quantitative Information Flow Assuming that the password is a 4-digit PIN, and the attacker has no prior knowledge: there are 10000 possible values (0 . . . 9999) for H. There are log2(10000) = 13.29 bits of secret. The probability to guess the password correctly: 1 10000 The probability to be rejected: 9999 10000 Leakage after one try in Shannon entropy: pi log2( 1 pi ) = 1 10000 log2(10000)+ 9999 10000 log2( 10000 9999 ) = 0.00147 Formalisation Adversary tries to infer H from L and O H L O f Leaks = Secrecy before observing - Secrecy after observing Definition: XH, XL, XO: random variables representing the distributions of H, L, O. E (entropy): function measuring secrecy. ∆E(XH) = E(XH) − E(XH|XL = l, XO) Theorem of channel capacity: ∆E(XH) ≤ log2(|O|) has been proved in the cases E is Shannon entropy and R´enyi’s min-entropy. holds for any distribution of XH. is the basis of state-of-the-art techniques for Quantitative Information Flow. log2(|O|) is the channel capacity of program P, denoted by CC(P). QILURA Program Symbolic PathFinder Labeling Procedure Z3 Omega Quantifying Procedure Latte Input labels k bits Symbolic PathFinder Take symbols as inputs instead of concrete data. Build path condition pci ≡ ci(α, β) for each symbolic path ρi. Execute program P with H = α and L = β O =    f1(α, β) if c1(α, β) f2(α, β) if c2(α, β) . . . . . . fm(α, β) if cm(α, β)    For the symbolic path ρi with final state σi ∈ F: O|σi = fi(α, β). Define a function: path(ρi) = ci(α, β). Labelling Procedure Self-composition P : copy of P with all variable renamed: H, L, O → H , L , O The following Hoare triple guarantees non-interference {L = L }P; P {O = O } Suppose we run Symbolic Execution on P; P with H = α; H = α1; L = L = β The symbolic semantics of P and P is R and R Fine-grained Self-composition by Symbolic Execution ∀ρ ∈ R, ρ ∈ R .path(ρ) ∧ path(ρ ) → O|fin(ρ) = O |fin(ρ ) Quantifying Procedure CC(P) ≤ log2(Σ#out(ρc) + Σ#out(ρi) + Σ#out(ρd)) Σ#out(ρc) = 1. Σ#out(ρi) is the number of indirect paths ρi. Σ#out(ρd): #out(ρd) ≤ #in(ρd), consequently Σ#out(ρd) ≤ Σ#in(ρd). Compute #in(ρd) using Reliability Analysis engine. Preliminary Evaluation Case Study jpf-qif QILURA BitPattern Capacity Time Upper Bound Time Upper Bound Time No Flow 0 2.304 0 0.790 - - Sanity check 1 4 45.324 4.09 1.066 4 0.036 Sanity check 2 4 35.346 4.09 1.049 4.59 0.203 Implicit Flow 2.81 0.897 3 0.796 3 0.011 Electronic Purse 2 1.169 2.32 0.854 2 0.157 Ten random outputs 3.32 1.050 3.32 0.814 18.645 0.224 Conclusions QILURA: a fully automated tool to quantify leaks in Java bytecode. Two-steps analysis: Fine-grained self-composition to label paths. Reliability Analysis engine to quantify inputs in each path. Download: https://github.com/qif/jpf-qilura http://www.eecs.qmul.ac.uk/∼qsp30/ q.phan@qmul.ac.uk