SlideShare a Scribd company logo
1 of 1
Download to read offline
Database Query Privacy Using Homomorphic Encryptions
Sudharaka Palamakumbura and Hamid Usefi
{sudharakap, usefi} @ mun.ca
Memorial University of Newfoundland
Database Query Privacy Using Homomorphic Encryptions
Sudharaka Palamakumbura and Hamid Usefi
{sudharakap, usefi} @ mun.ca
Memorial University of Newfoundland
Usefulness of Fully Homomorhpic Encryption
• Suppose Alice wants to give her data to Bob to perform a certain calculation.
• Alice does not trust Bob but has a Fully Homomorphic Encryption scheme with private
key sk and public key pk.
c1 = Encpk
(x1),
c2 = Encpk
(x2),
c3 = Encpk
(x3)
c1 × (c2 + c3)
Decsk
(c1 × (c2 + c3)) = x1 × (x2 + x3)
Alice
Bob
c1 × (c2 + c3)
DGVH Scheme
Let λ be the security parameter and set, N = λ, P = λ2
and Q = λ5
. The scheme is
based on the following algorithms;
• KeyGen(λ): The key generation algorithm which randomly chooses a P-bit integer p
as the secret key.
• Enc(m, p): The bit m ∈ {0, 1} is encrypted by
c ← m + pq
where m = m (mod 2) and q, m are random Q-bit and N-bit numbers respectively.
Gahi’s Method for Query Privacy
• Bob now has a list of sequences.
r Database Records Ir Sr
1 (1, 1, 0, 0, 0) Enc(p, 1) Enc(p, 1)
2 (1, 0, 1, 0, 0) Enc(p, 0) Enc(p, 1)
3 (1, 1, 0, 0, 0) Enc(p, 1) Enc(p, 2)
4 (1, 1, 0, 1, 0) Enc(p, 0) Enc(p, 2)
5 (1, 0, 0, 0, 0) Enc(p, 0) Enc(p, 2)
5
i=1
(1 + vi + ci)
Sr =
i≤r
Ir
Ir,j = Ir
5
i=1
(1 + ji + Sr,i)
(I1) = (Enc(p, 1))
(I2) = (Enc(p, 0), Enc(p, 0))
(I3) = (Enc(p, 0), Enc(p, 1), Enc(p, 0))
(I4) = (Enc(p, 0), Enc(p, 0), Enc(p, 0), Enc(p, 0))
(I5) = (Enc(p, 0), Enc(p, 0), Enc(p, 0), Enc(p, 0), Enc(p, 0))
Generalization of Gahi’s Method
• Recall that in Gahi’s method we used the expression,
5
i=1
(1 + vi + ci)
to calculate the Ir values corresponding to each record.
• We replace this expression by,
Fi =
j=i Enc(h, m − Rj)
k=i Enc(h, Ri − Rk)
where Rj denotes the j-th record in the database, m is the plaintext message and h is
the public key.
• Bob calculates the sequence (Fi,k)5
k=1 corresponding to each record as follows.
Fr,k = Fr
j=k (Sr − Enc(h, j))
Enc(h, j=k(k − j))
for all k ≤ r
• Therefore,
Fr,k =



Enc(h, 1) if Fr = Enc(h, 1) and Sr = Enc(h, k),
Enc(h, 0) Otherwise.
Fully Homomorphic Encryption
• Homomorphic with respect to two operations (ex: Addition and Multiplication).
• The idea was first proposed by Ronald Rivest, Len Adleman and Michael Dertouzos in
1978.
• A scheme E with an efficient algorithm EvaluateE such that, for any valid public key pk,
any circuit C, and any ciphertexts ψi ← EncryptE(pk, πi) outputs
ψ ← EvaluateE(pk, C, ψ1, . . . , ψt)
where ψ is a valid encryption of C(ψ1, . . . , ψt) under pk.
Gahi’s Method for Query Privacy
• By calculating the multiplication,
5
i=1
(1 + vi + ci) =



Enc(1) if c = Enc(v),
Enc(0) Otherwise.
(c1, c2, c3, c4, c5)
“Query”→ (m1, m2, m3, m4, m5)
Alice
Bob
(v1, v2, v3, v4, v5)
(m1, m2, m3, m4, m5)
DGHV
−−−−→ (c1, c2, c3, c4, c5)
Calculates
5
i=1
(1 + vi + ci)
Finally.....
Finally Alice can decrypt the results to get the exact records that she searched for.
(c1, c2, c3, c4, c5)
“Query”→ (1, 1, 0, 0, 0)
Alice
Bob
(1, 1, 0, 0, 0)
DGHV
−−−−→ (c1, c2, c3, c4, c5)
r
Ir
Dec
r
Ir, sk = 2
(Enc(R1), Enc(R3))
Generalization of Gahi’s Method
Bob now has a list of sequences as before.
Sr =
i≤r
Fi
(F1) = (Enc(h, 0))
(F2) = (Enc(h, 0), Enc(h, 0))
(F3) = (Enc(h, 0), Enc(h, 1), Enc(h, 0))
(F4) = (Enc(h, 0), Enc(h, 0), Enc(h, 0), Enc(h, 0))
(F5) = (Enc(h, 0), Enc(p, 0), Enc(h, 0), Enc(h, 0), Enc(h, 0))
Fi =
j=i (Enc(h, m) − Enc(h, Rj))
Enc(h, k=i (Ri − Rk))
Fr,k = Fr
j=k (Sr − Enc(h, j))
Enc(h, j=k(k − j))
r Database Records Fi Sr
1 R1 = m Enc(h, 1) Enc(h, 1)
2 R2 = m Enc(h, 0) Enc(h, 1)
3 R3 = m Enc(h, 1) Enc(h, 2)
4 R4 = m Enc(h, 0) Enc(h, 2)
5 R5 = m Enc(h, 0) Enc(h, 2)
Drawbacks
• Enormous number of operations due to DGHV
schemes inherent bitwise nature.
• Restricted to DGHV scheme and it’s underlying
structure. The protocol cannot be directly used
with any other fully homomorphic encryption
scheme.
• Thereby we propose an alternative method which
improves (or generalizes) Gahi’s method and
could be used with any fully homomorphic en-
cryption scheme.
Advantages and Disadvantages
• Not restricted to DGHV scheme. Can be used with other fully homomorphic encryption schemes.
• Not dependent upon bitwise encryption. Can be used with block based fully homomorphic encryption schemes.
– Zvika Brakerski’s Fully Homomorphic Encryption Scheme based on the Ring LWE problem,
– Jean Coron’s Batch Fully Homomorphic Encryption Scheme over the Integers.
• Our scheme involves homomorphic division which might not be practical.

More Related Content

What's hot

Playing 44CON CTF for fun and profit
Playing 44CON CTF for fun and profitPlaying 44CON CTF for fun and profit
Playing 44CON CTF for fun and profit44CON
 
OREO - Hack.lu CTF 2014
OREO - Hack.lu CTF 2014OREO - Hack.lu CTF 2014
OREO - Hack.lu CTF 2014YOKARO-MON
 
Euro python2011 High Performance Python
Euro python2011 High Performance PythonEuro python2011 High Performance Python
Euro python2011 High Performance PythonIan Ozsvald
 
Python Performance 101
Python Performance 101Python Performance 101
Python Performance 101Ankur Gupta
 
Python for Scientific Computing -- Ricardo Cruz
Python for Scientific Computing -- Ricardo CruzPython for Scientific Computing -- Ricardo Cruz
Python for Scientific Computing -- Ricardo Cruzrpmcruz
 
FEAL - CSAW CTF 2014 Quals Crypto300
FEAL - CSAW CTF 2014 Quals Crypto300FEAL - CSAW CTF 2014 Quals Crypto300
FEAL - CSAW CTF 2014 Quals Crypto300YOKARO-MON
 
D vs OWKN Language at LLnagoya
D vs OWKN Language at LLnagoyaD vs OWKN Language at LLnagoya
D vs OWKN Language at LLnagoyaN Masahiro
 
Python profiling
Python profilingPython profiling
Python profilingdreampuf
 
Introduction to cython: example of GCoptimization
Introduction to cython: example of GCoptimizationIntroduction to cython: example of GCoptimization
Introduction to cython: example of GCoptimizationKevin Keraudren
 
Functional Programming inside OOP? It’s possible with Python
Functional Programming inside OOP? It’s possible with PythonFunctional Programming inside OOP? It’s possible with Python
Functional Programming inside OOP? It’s possible with PythonCarlos V.
 
FSB: TreeWalker - SECCON 2015 Online CTF
FSB: TreeWalker - SECCON 2015 Online CTFFSB: TreeWalker - SECCON 2015 Online CTF
FSB: TreeWalker - SECCON 2015 Online CTFYOKARO-MON
 
computer notes - Data Structures - 9
computer notes - Data Structures - 9computer notes - Data Structures - 9
computer notes - Data Structures - 9ecomputernotes
 
ALF 5 - Parser Top-Down (2018)
ALF 5 - Parser Top-Down (2018)ALF 5 - Parser Top-Down (2018)
ALF 5 - Parser Top-Down (2018)Alexandru Radovici
 

What's hot (20)

Playing 44CON CTF for fun and profit
Playing 44CON CTF for fun and profitPlaying 44CON CTF for fun and profit
Playing 44CON CTF for fun and profit
 
OREO - Hack.lu CTF 2014
OREO - Hack.lu CTF 2014OREO - Hack.lu CTF 2014
OREO - Hack.lu CTF 2014
 
Euro python2011 High Performance Python
Euro python2011 High Performance PythonEuro python2011 High Performance Python
Euro python2011 High Performance Python
 
Stack
StackStack
Stack
 
Python Performance 101
Python Performance 101Python Performance 101
Python Performance 101
 
Concurrency in Python4k
Concurrency in Python4kConcurrency in Python4k
Concurrency in Python4k
 
Python for Scientific Computing -- Ricardo Cruz
Python for Scientific Computing -- Ricardo CruzPython for Scientific Computing -- Ricardo Cruz
Python for Scientific Computing -- Ricardo Cruz
 
FEAL - CSAW CTF 2014 Quals Crypto300
FEAL - CSAW CTF 2014 Quals Crypto300FEAL - CSAW CTF 2014 Quals Crypto300
FEAL - CSAW CTF 2014 Quals Crypto300
 
D vs OWKN Language at LLnagoya
D vs OWKN Language at LLnagoyaD vs OWKN Language at LLnagoya
D vs OWKN Language at LLnagoya
 
Compiling fµn language
Compiling fµn languageCompiling fµn language
Compiling fµn language
 
Python profiling
Python profilingPython profiling
Python profiling
 
Lab 6 (1)
Lab 6 (1)Lab 6 (1)
Lab 6 (1)
 
Introduction to cython: example of GCoptimization
Introduction to cython: example of GCoptimizationIntroduction to cython: example of GCoptimization
Introduction to cython: example of GCoptimization
 
Go a crash course
Go   a crash courseGo   a crash course
Go a crash course
 
Introduction to cython
Introduction to cythonIntroduction to cython
Introduction to cython
 
Functional Programming inside OOP? It’s possible with Python
Functional Programming inside OOP? It’s possible with PythonFunctional Programming inside OOP? It’s possible with Python
Functional Programming inside OOP? It’s possible with Python
 
FSB: TreeWalker - SECCON 2015 Online CTF
FSB: TreeWalker - SECCON 2015 Online CTFFSB: TreeWalker - SECCON 2015 Online CTF
FSB: TreeWalker - SECCON 2015 Online CTF
 
Files
FilesFiles
Files
 
computer notes - Data Structures - 9
computer notes - Data Structures - 9computer notes - Data Structures - 9
computer notes - Data Structures - 9
 
ALF 5 - Parser Top-Down (2018)
ALF 5 - Parser Top-Down (2018)ALF 5 - Parser Top-Down (2018)
ALF 5 - Parser Top-Down (2018)
 

Viewers also liked

9913c19855973df8ccf5652d2140e38b
9913c19855973df8ccf5652d2140e38b9913c19855973df8ccf5652d2140e38b
9913c19855973df8ccf5652d2140e38bAlbert Yefimov
 
Conclusões Norte
Conclusões NorteConclusões Norte
Conclusões NortePortal NE10
 
行銷策略-991125 高雄進階班-詹翔霖教授
行銷策略-991125 高雄進階班-詹翔霖教授行銷策略-991125 高雄進階班-詹翔霖教授
行銷策略-991125 高雄進階班-詹翔霖教授文化大學
 
Health promotion project
Health promotion projectHealth promotion project
Health promotion projectJSAH
 
紅葉行 雨天香嵐溪楓紅991122
紅葉行 雨天香嵐溪楓紅991122紅葉行 雨天香嵐溪楓紅991122
紅葉行 雨天香嵐溪楓紅991122Jaing Lai
 
Please help with this annuity problem?
Please help with this annuity problem?Please help with this annuity problem?
Please help with this annuity problem?hedvigeyxv3811
 
CCole_Sam Seaborn_4_Final Campaign_Unit 4
CCole_Sam Seaborn_4_Final Campaign_Unit 4CCole_Sam Seaborn_4_Final Campaign_Unit 4
CCole_Sam Seaborn_4_Final Campaign_Unit 4Christopher Cole
 
9654953105, Red mall ghaziabad 11% Assured Return
9654953105, Red mall ghaziabad 11% Assured Return9654953105, Red mall ghaziabad 11% Assured Return
9654953105, Red mall ghaziabad 11% Assured Returnashokjai
 

Viewers also liked (15)

99 names of allah 4
99 names of allah 499 names of allah 4
99 names of allah 4
 
Nsg-312_F09-1
Nsg-312_F09-1Nsg-312_F09-1
Nsg-312_F09-1
 
Războiul
RăzboiulRăzboiul
Războiul
 
9913c19855973df8ccf5652d2140e38b
9913c19855973df8ccf5652d2140e38b9913c19855973df8ccf5652d2140e38b
9913c19855973df8ccf5652d2140e38b
 
4CEquipo15
4CEquipo154CEquipo15
4CEquipo15
 
Conclusões Norte
Conclusões NorteConclusões Norte
Conclusões Norte
 
行銷策略-991125 高雄進階班-詹翔霖教授
行銷策略-991125 高雄進階班-詹翔霖教授行銷策略-991125 高雄進階班-詹翔霖教授
行銷策略-991125 高雄進階班-詹翔霖教授
 
Health promotion project
Health promotion projectHealth promotion project
Health promotion project
 
Acesso rio mar
Acesso rio marAcesso rio mar
Acesso rio mar
 
KL Presentation
KL PresentationKL Presentation
KL Presentation
 
紅葉行 雨天香嵐溪楓紅991122
紅葉行 雨天香嵐溪楓紅991122紅葉行 雨天香嵐溪楓紅991122
紅葉行 雨天香嵐溪楓紅991122
 
Please help with this annuity problem?
Please help with this annuity problem?Please help with this annuity problem?
Please help with this annuity problem?
 
9694 l
9694 l9694 l
9694 l
 
CCole_Sam Seaborn_4_Final Campaign_Unit 4
CCole_Sam Seaborn_4_Final Campaign_Unit 4CCole_Sam Seaborn_4_Final Campaign_Unit 4
CCole_Sam Seaborn_4_Final Campaign_Unit 4
 
9654953105, Red mall ghaziabad 11% Assured Return
9654953105, Red mall ghaziabad 11% Assured Return9654953105, Red mall ghaziabad 11% Assured Return
9654953105, Red mall ghaziabad 11% Assured Return
 

Similar to cwit-poster_logo

Compilation of COSMO for GPU using LLVM
Compilation of COSMO for GPU using LLVMCompilation of COSMO for GPU using LLVM
Compilation of COSMO for GPU using LLVMLinaro
 
Declarative Datalog Debugging for Mere Mortals
Declarative Datalog Debugging for Mere MortalsDeclarative Datalog Debugging for Mere Mortals
Declarative Datalog Debugging for Mere MortalsBertram Ludäscher
 
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014PyData
 
Otter 2016-11-28-01-ss
Otter 2016-11-28-01-ssOtter 2016-11-28-01-ss
Otter 2016-11-28-01-ssRuo Ando
 
snarks <3 hash functions
snarks <3 hash functionssnarks <3 hash functions
snarks <3 hash functionsRebekah Mercer
 
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...Alex Pruden
 
C Code and the Art of Obfuscation
C Code and the Art of ObfuscationC Code and the Art of Obfuscation
C Code and the Art of Obfuscationguest9006ab
 
Class 28: Entropy
Class 28: EntropyClass 28: Entropy
Class 28: EntropyDavid Evans
 
Design and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesDesign and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesSreedhar Chowdam
 
How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016
How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016
How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016Codemotion
 
Threshold and Proactive Pseudo-Random Permutations
Threshold and Proactive Pseudo-Random PermutationsThreshold and Proactive Pseudo-Random Permutations
Threshold and Proactive Pseudo-Random PermutationsAleksandr Yampolskiy
 
Digital Electronics Basics by Er. Swapnil Kaware
Digital Electronics Basics by Er. Swapnil KawareDigital Electronics Basics by Er. Swapnil Kaware
Digital Electronics Basics by Er. Swapnil KawareProf. Swapnil V. Kaware
 
Flink Forward Berlin 2017: Max Kiessling, Martin Junghanns - Cypher-based Gra...
Flink Forward Berlin 2017: Max Kiessling, Martin Junghanns - Cypher-based Gra...Flink Forward Berlin 2017: Max Kiessling, Martin Junghanns - Cypher-based Gra...
Flink Forward Berlin 2017: Max Kiessling, Martin Junghanns - Cypher-based Gra...Flink Forward
 
Gate Computer Science Solved Paper 2007
Gate Computer Science Solved Paper 2007 Gate Computer Science Solved Paper 2007
Gate Computer Science Solved Paper 2007 Rohit Garg
 
Yoyak ScalaDays 2015
Yoyak ScalaDays 2015Yoyak ScalaDays 2015
Yoyak ScalaDays 2015ihji
 
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataAnne Nicolas
 

Similar to cwit-poster_logo (20)

Compilation of COSMO for GPU using LLVM
Compilation of COSMO for GPU using LLVMCompilation of COSMO for GPU using LLVM
Compilation of COSMO for GPU using LLVM
 
keeloq-final
keeloq-finalkeeloq-final
keeloq-final
 
Declarative Datalog Debugging for Mere Mortals
Declarative Datalog Debugging for Mere MortalsDeclarative Datalog Debugging for Mere Mortals
Declarative Datalog Debugging for Mere Mortals
 
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014
Pythran: Static compiler for high performance by Mehdi Amini PyData SV 2014
 
Otter 2016-11-28-01-ss
Otter 2016-11-28-01-ssOtter 2016-11-28-01-ss
Otter 2016-11-28-01-ss
 
snarks <3 hash functions
snarks <3 hash functionssnarks <3 hash functions
snarks <3 hash functions
 
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
 
4th Semester Electronic and Communication Engineering (June/July-2015) Questi...
4th Semester Electronic and Communication Engineering (June/July-2015) Questi...4th Semester Electronic and Communication Engineering (June/July-2015) Questi...
4th Semester Electronic and Communication Engineering (June/July-2015) Questi...
 
C Code and the Art of Obfuscation
C Code and the Art of ObfuscationC Code and the Art of Obfuscation
C Code and the Art of Obfuscation
 
Class 28: Entropy
Class 28: EntropyClass 28: Entropy
Class 28: Entropy
 
Design and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture NotesDesign and Analysis of Algorithms Lecture Notes
Design and Analysis of Algorithms Lecture Notes
 
Crypto lecture PDF
Crypto lecture PDFCrypto lecture PDF
Crypto lecture PDF
 
How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016
How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016
How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016
 
Threshold and Proactive Pseudo-Random Permutations
Threshold and Proactive Pseudo-Random PermutationsThreshold and Proactive Pseudo-Random Permutations
Threshold and Proactive Pseudo-Random Permutations
 
Digital Electronics Basics by Er. Swapnil Kaware
Digital Electronics Basics by Er. Swapnil KawareDigital Electronics Basics by Er. Swapnil Kaware
Digital Electronics Basics by Er. Swapnil Kaware
 
Ecc2
Ecc2Ecc2
Ecc2
 
Flink Forward Berlin 2017: Max Kiessling, Martin Junghanns - Cypher-based Gra...
Flink Forward Berlin 2017: Max Kiessling, Martin Junghanns - Cypher-based Gra...Flink Forward Berlin 2017: Max Kiessling, Martin Junghanns - Cypher-based Gra...
Flink Forward Berlin 2017: Max Kiessling, Martin Junghanns - Cypher-based Gra...
 
Gate Computer Science Solved Paper 2007
Gate Computer Science Solved Paper 2007 Gate Computer Science Solved Paper 2007
Gate Computer Science Solved Paper 2007
 
Yoyak ScalaDays 2015
Yoyak ScalaDays 2015Yoyak ScalaDays 2015
Yoyak ScalaDays 2015
 
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
 

cwit-poster_logo

  • 1. Database Query Privacy Using Homomorphic Encryptions Sudharaka Palamakumbura and Hamid Usefi {sudharakap, usefi} @ mun.ca Memorial University of Newfoundland Database Query Privacy Using Homomorphic Encryptions Sudharaka Palamakumbura and Hamid Usefi {sudharakap, usefi} @ mun.ca Memorial University of Newfoundland Usefulness of Fully Homomorhpic Encryption • Suppose Alice wants to give her data to Bob to perform a certain calculation. • Alice does not trust Bob but has a Fully Homomorphic Encryption scheme with private key sk and public key pk. c1 = Encpk (x1), c2 = Encpk (x2), c3 = Encpk (x3) c1 × (c2 + c3) Decsk (c1 × (c2 + c3)) = x1 × (x2 + x3) Alice Bob c1 × (c2 + c3) DGVH Scheme Let λ be the security parameter and set, N = λ, P = λ2 and Q = λ5 . The scheme is based on the following algorithms; • KeyGen(λ): The key generation algorithm which randomly chooses a P-bit integer p as the secret key. • Enc(m, p): The bit m ∈ {0, 1} is encrypted by c ← m + pq where m = m (mod 2) and q, m are random Q-bit and N-bit numbers respectively. Gahi’s Method for Query Privacy • Bob now has a list of sequences. r Database Records Ir Sr 1 (1, 1, 0, 0, 0) Enc(p, 1) Enc(p, 1) 2 (1, 0, 1, 0, 0) Enc(p, 0) Enc(p, 1) 3 (1, 1, 0, 0, 0) Enc(p, 1) Enc(p, 2) 4 (1, 1, 0, 1, 0) Enc(p, 0) Enc(p, 2) 5 (1, 0, 0, 0, 0) Enc(p, 0) Enc(p, 2) 5 i=1 (1 + vi + ci) Sr = i≤r Ir Ir,j = Ir 5 i=1 (1 + ji + Sr,i) (I1) = (Enc(p, 1)) (I2) = (Enc(p, 0), Enc(p, 0)) (I3) = (Enc(p, 0), Enc(p, 1), Enc(p, 0)) (I4) = (Enc(p, 0), Enc(p, 0), Enc(p, 0), Enc(p, 0)) (I5) = (Enc(p, 0), Enc(p, 0), Enc(p, 0), Enc(p, 0), Enc(p, 0)) Generalization of Gahi’s Method • Recall that in Gahi’s method we used the expression, 5 i=1 (1 + vi + ci) to calculate the Ir values corresponding to each record. • We replace this expression by, Fi = j=i Enc(h, m − Rj) k=i Enc(h, Ri − Rk) where Rj denotes the j-th record in the database, m is the plaintext message and h is the public key. • Bob calculates the sequence (Fi,k)5 k=1 corresponding to each record as follows. Fr,k = Fr j=k (Sr − Enc(h, j)) Enc(h, j=k(k − j)) for all k ≤ r • Therefore, Fr,k =    Enc(h, 1) if Fr = Enc(h, 1) and Sr = Enc(h, k), Enc(h, 0) Otherwise. Fully Homomorphic Encryption • Homomorphic with respect to two operations (ex: Addition and Multiplication). • The idea was first proposed by Ronald Rivest, Len Adleman and Michael Dertouzos in 1978. • A scheme E with an efficient algorithm EvaluateE such that, for any valid public key pk, any circuit C, and any ciphertexts ψi ← EncryptE(pk, πi) outputs ψ ← EvaluateE(pk, C, ψ1, . . . , ψt) where ψ is a valid encryption of C(ψ1, . . . , ψt) under pk. Gahi’s Method for Query Privacy • By calculating the multiplication, 5 i=1 (1 + vi + ci) =    Enc(1) if c = Enc(v), Enc(0) Otherwise. (c1, c2, c3, c4, c5) “Query”→ (m1, m2, m3, m4, m5) Alice Bob (v1, v2, v3, v4, v5) (m1, m2, m3, m4, m5) DGHV −−−−→ (c1, c2, c3, c4, c5) Calculates 5 i=1 (1 + vi + ci) Finally..... Finally Alice can decrypt the results to get the exact records that she searched for. (c1, c2, c3, c4, c5) “Query”→ (1, 1, 0, 0, 0) Alice Bob (1, 1, 0, 0, 0) DGHV −−−−→ (c1, c2, c3, c4, c5) r Ir Dec r Ir, sk = 2 (Enc(R1), Enc(R3)) Generalization of Gahi’s Method Bob now has a list of sequences as before. Sr = i≤r Fi (F1) = (Enc(h, 0)) (F2) = (Enc(h, 0), Enc(h, 0)) (F3) = (Enc(h, 0), Enc(h, 1), Enc(h, 0)) (F4) = (Enc(h, 0), Enc(h, 0), Enc(h, 0), Enc(h, 0)) (F5) = (Enc(h, 0), Enc(p, 0), Enc(h, 0), Enc(h, 0), Enc(h, 0)) Fi = j=i (Enc(h, m) − Enc(h, Rj)) Enc(h, k=i (Ri − Rk)) Fr,k = Fr j=k (Sr − Enc(h, j)) Enc(h, j=k(k − j)) r Database Records Fi Sr 1 R1 = m Enc(h, 1) Enc(h, 1) 2 R2 = m Enc(h, 0) Enc(h, 1) 3 R3 = m Enc(h, 1) Enc(h, 2) 4 R4 = m Enc(h, 0) Enc(h, 2) 5 R5 = m Enc(h, 0) Enc(h, 2) Drawbacks • Enormous number of operations due to DGHV schemes inherent bitwise nature. • Restricted to DGHV scheme and it’s underlying structure. The protocol cannot be directly used with any other fully homomorphic encryption scheme. • Thereby we propose an alternative method which improves (or generalizes) Gahi’s method and could be used with any fully homomorphic en- cryption scheme. Advantages and Disadvantages • Not restricted to DGHV scheme. Can be used with other fully homomorphic encryption schemes. • Not dependent upon bitwise encryption. Can be used with block based fully homomorphic encryption schemes. – Zvika Brakerski’s Fully Homomorphic Encryption Scheme based on the Ring LWE problem, – Jean Coron’s Batch Fully Homomorphic Encryption Scheme over the Integers. • Our scheme involves homomorphic division which might not be practical.