CryptoNet
1
Cryptography
Content Routing
Anca Nitulescu
For Privacy
In
Routing
Content
Content Routing: Storage Network
3
Consumer C Provider P
Common interface for content routing:
Provide: Make content available for other peers in the network
Resolve: Find the peers storing the content in the network.
Fetch: Fetches content from a provider.
Content ID: When you add a file to IPFS, your file is hashed, and given a unique fingerprint called a content identifier (CID). This CID acts as a permanent record of your file as it exists at that point in time.
Routing: When other nodes look up your file, they ask their peer nodes who's storing the content referenced by the file's CID.
Fetch
Content Routing: Setting
4
Consumer C Provider P
Router R
Actors:
- Providers store data D and make it available to Consumers C.
- Providers and consumers find each other through Routers.
- Advertisements or provider records rec include content identifiers CID and propagate them to the Routers.
- Consumers query the routers using CID, getting 0 or corresponding provider records (PIDs).
- Providers and Consumers are “light clients” and Routers do most of the work in the routing system.
Content CID | Provider IDs |
cat.gif | #3, #5, #7 |
photo.jpg | #1, #4, #11 |
offer.pdf | #3, #15, #19 |
slides.pptx | #1, #3, #10 |
book.epub | #4, #5, #21 |
video.mp4 | #6, #13, #18 |
Content Routing: Challenges
5
Consumer C Provider P
Router R
Content Routing in P2P networks
Content CID | Provider IDs |
cat.gif | #3, #5, #7 |
photo.jpg | #1, #4, #11 |
offer.pdf | #3, #15, #19 |
slides.pptx | #1, #3, #10 |
book.epub | #4, #5, #21 |
video.mp4 | #6, #13, #18 |
Content Routing: Privacy
6
Consumer C Provider P
Router R
Writer Privacy: Providers P can provide content to some consumers, without unauthorized consumers, routers, or adversaries learning what the provider has published.
Content CID | Provider IDs |
cat.gif | #3, #5, #7 |
photo.jpg | #1, #4, #11 |
offer.pdf | #3, #15, #19 |
slides.pptx | #1, #3, #10 |
book.epub | #4, #5, #21 |
video.mp4 | #6, #13, #18 |
Content Routing: Privacy
7
Consumer C Provider P
Router R
Reader Privacy: Consumers C can find content (lookup records) without unauthorized providers, routers, or adversaries learning what the consumer has requested.
Content CID | Provider IDs |
cat.gif | #3, #5, #7 |
photo.jpg | #1, #4, #11 |
offer.pdf | #3, #15, #19 |
slides.pptx | #1, #3, #10 |
book.epub | #4, #5, #21 |
video.mp4 | #6, #13, #18 |
Cryptographic Solutions
Privacy-Preserving Search
9
Deterministic Encryption: exact match
Property-Preserving Encryption: approximative match
Order-Preserving Encryption: range queries
Hiding everything implies accessing the entire data
Drawbacks:
Leaks repetitions
Some existing attacks to recover data
Data is encrypted under Consumer’s key…
Searchable
Encryption
2. Fully Homomorphic Encryption
10
Provider encrypts its data.
The search function is evaluated over encrypted data.
Consumer gets the encrypted result.
Avantages:
Privacy from the encryption
No interaction
Drawbacks:
Not efficient
Costly communication
Key management ?
Ciphertext
Fully Homomorphic
Encryption
Encrypted result
Query
Encrypt
Data
3. Multi-Party Computation
11
2-Party
Computation
Provider sends records in clear to Router.
Consumer and Router interact in order to execute the search.
Needs multiple rounds of communication between the two parties.
Avantages:
Perfect Security
Performant�
Drawbacks:
Costly in communication
Requires interaction and synchronisation
4. Private Information Retrieval
12
Consumer queries Router while hiding the content she is after.
Avantages:
Leaks no info on the index
Drawbacks:
May require more than one non-communicating Router with identical copies of the database
Private Information
Retrieval
Query
Data
?
5. Private Set Intersection
13
Consumer queries Router Content id
Router privately computes intersection between the queried content id and its record
Avantages:
Small Communication via FHE
Drawbacks:
Router may need to pre-process DB (expensive, not updatable)
FHE limitations
Private Information
Retrieval
Query S
Data
?
S
S
Index-Based Searchable Encryption
15
Based on keywords and trapdoors
Each query allows for a partial decryption
Searchable
Encryption
Trap door | Encrypted Content | Provider ID |
L | 6UIX ZO9V |
|
P | FCD3 7FBD | |
B | U8S5 GT75 |
|
R | QKI5 98JE |
|
T | 7RTS IH2L |
|
M | AZD2 T9YY |
|
Index-Based Searchable Encryption
16
Based on keywords and trapdoors
Each query allows for a partial decryption
Consumer sends a trapdoor
Router decrypts the index corresponding to the trapdoor
Searchable
Encryption
Trap door | Encrypted Content | Provider ID |
L | 6UIX ZO9V |
|
P | FCD3 7FBD | #1, #4, #8 |
B | U8S5 GT75 |
|
R | QKI5 98JE |
|
T | 7RTS IH2L |
|
M | AZD2 T9YY |
|
Index-Based Searchable Encryption
17
Based on keywords and trapdoors
Each query allows for a partial decryption
Consumer sends a trapdoor
Router decrypts the index corresponding to the trapdoor
Leakage:
Static DB
- reveals search pattern - repetitions
Dynamic DB
- updates leak what record was updated
- deletions leak what record was deleted
Searchable
Encryption
Trap door | Encrypted Content | Provider ID |
L | 6UIX ZO9V |
|
P | FCD3 7FBD | |
B | U8S5 GT75 |
|
R | QKI5 98JE |
|
T | 7RTS IH2L |
|
M | AZD2 T9YY |
|
Solution for Private Content routing?
18
Provider:
- encrypts content id (deterministic/hash)
- encrypts provider id (randomized)
- generates a trapdoor for each content id (decryption key)
Content | Provider ID |
cat.gif | #3, #5, #7 |
photo.jpg | #1, #4, #8, #11 |
offer.pdf | #3, #15, #19 |
slides.pptx | #1, #3, #7, #10 |
book.epub | #4, #5, #21 |
video.mp4 | #6, #13, #18 |
Searchable
Encryption
Provider
Fonctionnement - Index-Based Searchable Encryption
19
Provider:
- encrypts content id (deterministic/hash)
- encrypts provider id (randomized)
- generates a trapdoor for each content id (decryption key)
Router:
- has the encrypted table
Trap door | Encrypted Content ID | Provider ID |
L | 6UIX ZO9V |
|
P | FCD3 7FBD | |
B | U8S5 GT75 |
|
R | QKI5 98JE |
|
T | 7RTS IH2L |
|
M | AZD2 T9YY |
|
Searchable
Encryption
Fonctionnement - Index-Based Searchable Encryption
20
Trap door | Encrypted Content ID | Provider ID |
L | 6UIX ZO9V |
|
P | FCD3 7FBD | |
B | U8S5 GT75 |
|
R | QKI5 98JE | |
T | 7RTS IH2L |
|
M | AZD2 T9YY |
|
Provider:
- encrypts content id (deterministic/hash)
- encrypts provider id (randomized)
- generates a trapdoor for each content id (decryption key)
Router:
- has the encrypted table
Consumer:
- encrypts the content id (hash)
- sends ciphertext and trapdoor
Searchable
Encryption
Fonctionnement - Index-Based Searchable Encryption
21
Trap door | Encrypted Content ID | Provider ID |
L | 6UIX ZO9V |
|
P | FCD3 7FBD | |
B | U8S5 GT75 | #3, #15, #19 |
R | QKI5 98JE | |
T | 7RTS IH2L | #4, #5, #21 |
M | AZD2 T9YY |
|
Provider:
- encrypts content id (deterministic/hash)
- encrypts provider id (randomized)
- generates a trapdoor for each content id (decryption key)
Router:
- has the encrypted table
Consumer:
- encrypts the content id (hash)
- sends ciphertext and trapdoor
Router:
- trapdoor allows to decrypt the provider id for queried cid
Searchable
Encryption
Attacks - Index-Based Searchable Encryption
22
Update the table
Provider
- encrypts the content id (hash)
- adds new indexes
Searchable
Encryption
#22
Content | Provider ID |
cat.gif | #3, #5, #7 |
photo.jpg | #1, #4, #8, #11 |
offer.pdf | #3, #15, #19 |
slides.pptx | #1, #3, #7, #10 |
book.epub | #4, #5, #21 |
video.mp4 | #6, #13, #18 |
Attacks - Index-Based Searchable Encryption
23
Update the table
Provider
- encrypts the content id (hash)
- adds new indexes
Router
- receives new ciphertexts
Searchable
Encryption
#22
Trap door | Encrypted Content ID | Provider ID |
L | 6UIX ZO9V | #22 |
P | FCD3 7FBD | |
B | U8S5 GT75 | #3, #5, #9, #22 |
R | QKI5 98JE | |
T | 7RTS IH2L | #4, #5, #8, #22 |
M | AZD2 T9YY |
|
Attacks - Index-Based Searchable Encryption
24
Update the table
Provider
- encrypts the content id (hash)
- adds new indexes
Router
- receives new ciphertexts
Leakage
- search pattern
- adding new indexes reveals info about Content IDs
Searchable
Encryption
#22
Trap door | Encrypted Content ID | Provider ID |
L | 6UIX ZO9V | #22 |
P | FCD3 7FBD | |
B | U8S5 GT75 | #3, #5, #9, #22 |
R | QKI5 98JE | |
T | 7RTS IH2L | #4, #5, #8, #22 |
M | AZD2 T9YY |
|
Attacks - Index-Based Searchable Encryption
25
Update the table
Provider
- encrypts the content id (hash)
- adds new indexes
Router
- receives new ciphertexts
Leakage
- search pattern
- adding new indexes reveals info about Content IDs
- deleting indexes reveals information about Content IDs
Searchable
Encryption
Trap door | Encrypted Content ID | Provider ID |
L | 6UIX ZO9V | |
P | FCD3 7FBD | |
B | U8S5 GT75 | #3, #5, #9 |
R | QKI5 98JE | |
T | 7RTS IH2L | #4, #5, #8 |
M | AZD2 T9YY |
|
#5
References
26
“Oblivious RAMs” [Ost90,GO96]
– Optimal security (even hides access pattern)
– Poly-logarithmic number of rounds
“Practical techniques for searches on encrypted data” [SWP00]
– First specific construction (PRGs, PRFs, PRPs)
– Limitations: leaks information; inadequate security definition (IND-CPA)
“Secure Indexes” [Goh03]
– IND2-CKA: semantic security against chosen-keyword attacks
– Efficient and IND2-CKA construction (PRFs, Bloom filters)
“Privacy Preserving Keyword Searches on Remote Encrypted Data” [CM05]
– Simulation-based security definition
– Two constructions (PRFs,PRPs)
“Searchable Symmetric Encryption: Improved Definitions and Efficient Constructions,” [CGKO06]
– Proposed four new security definitions
– Two new efficient constructions for SSE IND2-CKA: Indistinguishability against Chosen-Keyword Attacks
2. Fully
Homomorphic
Encryption
FHE
28
Encrypt
Evaluate
Decrypt
Compute on ciphertexts
Ciphertexts
Fully Homomorphic
Encryption
Data
Secret key
Encrypted result
Secret key
Encrypted input
Encrypted result
Public key
FHE
29
Encrypt
Evaluate
Decrypt
⊕
=
7
13c82ea37b844ed03c
2
0dc1946c1158e7a9cd
13c82ea37b844ed03c
0dc1946c1158e7a9cd
6216d5bb3d78a75f24
9
Compute on ciphertexts
Ciphertexts
Fully Homomorphic
Encryption
Data
Secret key
Encrypted result
Secret key
Encrypted input
Encrypted result
Public key
6216d5bb3d78a75f24
Limitations of FHE
What model of computation ? - Boolean Circuits
Is this sufficient ? - Yes: {XOR, AND} is Turing-complete
And in practice ? - need to compile any algorithm in a Boolean Circuit
Privacy-Preserving Search:
Compare two integers A, B (2 bits)
Limitations of FHE
What model of computation ? - Boolean Circuits
Is this sufficient ? - Yes: {XOR, AND} is Turing-complete
And in practice ? - need to compile any algorithm in a Boolean Circuit
Privacy-Preserving Search:
Compare two integers A, B (2 bits)
Limitations of FHE
What model of computation ? - Boolean Circuits
Is this sufficient ? - Yes: {XOR, AND} is Turing-complete
And in practice ? - need to compile any algorithm in a Boolean Circuit
Privacy-Preserving Search:
Compare two integers A, B (2 bits)
A = A0 A1
B = B0 B1
Limitations of FHE
What model of computation ? - Boolean Circuits
Is this sufficient ? - Yes: {XOR, AND} is Turing-complete
And in practice ? - need to compile any algorithm in a Boolean Circuit
Privacy-Preserving Search:
Compare two integers A, B (2 bits)
A = A0 A1
B = B0 B1
Compilation
Better New FHE
TFHE: - allow to evaluate a gate MUX
- fast bit-wise comparison
- fast look-up tables
0 / 1
1
0
r0
r1
r0 / 1
Better New FHE
TFHE: - allow to evaluate a gate MUX
- fast bit-wise comparison
- fast look-up tables
0 / 1
1
0
r0
r1
r0 / 1
I
Comparing two integers A, B (2 bits)
A = a0 a1
B = b0 b1
b1 if a1 ≠ b1 b0 if a0 ≠ b0
r1 = r0 =
1 else r1 else
r0 = (A ≤ B )
Better New FHE
Comparing two integers A, B (2 bits)
A = a0 a1
B = b0 b1
b1 if a1 ≠ b1 b0 if a0 ≠ b0
r1 = r0 =
1 else r1 else
r0 = (A ≤ B )
I
0
0
0
I
TFHE: - allow to evaluate a gate MUX
- fast bit-wise comparison
- fast look-up tables
Better New FHE
CKKS: - Numerical method
- Evaluates polynomials on integers
- approximative comparison based on Taylor series
Better New FHE
CKKS: - Numerical method
- Evaluates polynomials on integers
- approximative comparison based on Taylor series
Comparing two integers or reels a, b
Idea : Write the comparison function using an approximation based on polynomials
→ polynomial degree = precision
→ better precision = bigger cost
→ pays off only by parallelising multiple comparison
→ amortised cost
*variable t decides precision
approximation for square root
with
Wilkes Method (1951)
Fully Homomorphic Encryption Landscape
TFHE
BV
1st generation | 2nd generation | 3rd generation | 4th generation |
→ ad-hoc assumption
→ one bit operation = 30 minutes
→ assumption: Approximate eigenvector
→ fast bootstrapping (< .1 seconde)
→ unpractical
→ circuit of 30,000 gates = 36 hours
→ assumption = RLWE
→ circuit of 30,000 gates = 4 -15 minutes
→ assumption = LWE
→ encryption of one bit = big matrix
→ compute a NAND gate = matrix multiplication
→ asymmetric multiplication C12 = c1 ⊗ c2 and C21 = c2 ⊗ c1
→ C12 = C21 (they both encrypt the product b1b2= b2b1).
→ asymmetric noise - left factor is dominant
Gentry
BHS
BGV
GSW
2009
2011
2012
2015
CKKS
FHE: Performances for Comparison
Bit-wise comparison with selector
TFHE - integers of 32-bits = 3,3 seconds
Integer comparisons with approximation
CKKS - total time for 216 pairs of 32-bits integers = 230 s
- precision 2-14 = most significant 14 bits
- amortisation: 3,5 ms per comparison
0
0
0
Boolean Circuit with no selector
Schemes BV, GHS, BGV
a1 a0 b1 b0
Libraries FHE
Library | Scheme | Language | Boot- strapping | Select gates | API | Support integers | Packing SIMD |
HELib | BGV, CKKS | C /C++ | ✓ | X | hard | X | ✓ |
SEAL | FV, CKKS | C++/C# | not public | X | easy | ✓ | ✓ |
PALISADE | BGV, FV, CKKS, TFHE | C++ | X | X | average | ✓ | X |
Concrete | TFHE | Rust | ✓ | ✓ | easy | ✓ | X |
3. MPC
Interactive Solution
MPC - goals
43
x1 x2
Framework for computation between parties who do not trust each other.
Examples:
Multi-Party
Computation
x3 x4
f(x1, x2, x3, x4) = (y1, y2 ,y3 ,y4 ) = y
MPC - goals
44
x1 x2
Framework for computation between parties who do not trust each other.
Examples:
Goals: preserve the privacy of each player's inputs and guarantee the correctness of the computation.
Multi-Party
Computation
x3 x4
f(x1, x2, x3, x4) = (y1, y2 ,y3 ,y4 ) = y
MPC - goals
45
Trusted party:
All of these tasks can be easily computed by a trusted third party
Security :
Multi-Party
Computation
f(x1, x2, x3, x4) = (y1, y2 ,y3 ,y4 ) = y
x1 x2
x3 x4
MPC - goals
Preprocessing:
Online:
Reconstruction:
Multi-Party
Computation
Preprocessing
Online
Reconstruction
f(x1, x2, x3, x4) = (y1, y2 ,y3 ,y4 ) = y
y = f(x)
correlated
randomness
MPC General View
Multi-Party
Computation
f(x1, x2, x3, x4) = y
Preprocessing
Online
Reconstruction
f(x1, x2, x3, x4) = (y1, y2 ,y3 ,y4 ) = y
y = f(x)
MPC - Example
48
Salary s1 = 5 000 z1= 7 400
Mask m = 2 400
z1 = 2 400 + 5 000
Example : Compute the average salary without revealing the salary of each employee.
Here Bob runs a MPC protocol with his colleagues to learn the average salary.
MPC - Example
49
z2 = 10 400
Salary s1 = 5 000 z1= 7 400 Salary 3 000
Mask m = 2 400
z1 = 2 400 + 5 000 z2 = 7 400 + 3 000
Example : Compute the average salary without revealing the salary of each employee.
Here Bob runs a MPC protocol with his colleagues to learn the average salary.
MPC - Example
50
z2 = 10 400
z4 = 18 400
Salary s1 = 5 000 z1= 7 400 Salary 3 000
Mask m = 2 400
z1 = 2 400 + 5 000 z2 = 7 400 + 3 000
Salary 4 000 Salary 4 000
z3 = 14 400
z4 =14 400 + 4 000 z3 = 10 400 + 4 000
Example : Compute the average salary without revealing the salary of each employee.
Here Bob runs a MPC protocol with his colleagues to learn the average salary.
What computation should Bob make in order to learn the average salary?
MPC - Example
51
Solution : D. Sum of salaries = Masked Sum – Random Mask = z4 – m
z2 = 10 400
z4 = 18 400
Salary s1 = 5 000 z1= 7 400 Salary 3 000
Mask m = 2 400
z1 = 2 400 + 5 000 z2 = 7 400 + 3 000
Salary 4 000 Salary 4 000
z3 = 14 400
z4 =14 400 + 4 000 z3 = 10 400 + 4 000
Example : Compute the average salary without revealing the salary of each employee.
Here Bob runs a MPC protocol with his colleagues to learn the average salary.
What computation should Bob make in order to learn the average salary?
MPC - Security
52
z4 =14 400 + 4 000 z3 = 10 400 + 4 000
z2 = 10 400
z4 = 18 400
z1= 7 400
z1 = 2 400 + 5 000 z2 = 7 400 + 3 000
We need to make sure that an adversary cannot learn the private data of the honest parties.
We assume that communication channels are private and authenticated.
Security Model: The adversary is inside the system and corrupts some of the parties
z3 = 14 400
MPC - Security
53
We need to make sure that an adversary cannot learn the private data of the honest parties.
We assume that communication channels are private and authenticated.
Security Model: The adversary is inside the system and corrupts some of the parties
z2 = 10 400
z4 = 7 000
Salary 4 000 Salary 4 000
z3 = 14 400
z4 = 3 000 + 4 000 z3 = 3 000
Salary s1 = 5 000 z1= 7 400 Salary 3 000
Mask m = 2 400
z1 = 2 400 + 5 000 z2 = 7 400 + 3 000
z3 = 3 000
MPC - Security
54
Security is defined by the types of attacks considered:
Adversary type:
Number of corrupted parties t among n
Security with Output Delivery
/
55
Corrupted parties t
Total parties n
Setting | Adversary | Condition |
Computational
| passive | t < n |
active | t < n/2 | |
Perfect Security* | passive | t < n/2 |
active | t < n/3 |
* Shannon Information Theory
MPC
from
secret
sharing
MPC - Arithmetic Circuits
57
Model of Computation: Represent the function as Arithmetic/Boolean circuit C
Limiting Factor : Number of multiplications
MPC from Secret Sharing
The GMW/BGW* Approach:
● The (public) function being computed is written as a circuit
*[GMW87] Oded Goldreich, Silvio Micali, Avi Wigderson. How to prove all NP- statements in zero-knowledge, and a methodology of cryptographic protocol design.
[BGW88 ] M. Ben-Or, S. Goldwasser, A. Wigderson. Completeness Theorems for Non-Cryptographic Fault-Tolerant Distributed Computation.
f (x,y,z)
x
y
z
MPC from Secret Sharing
59
f (x,y,z)
x
y
z
z = z1 + z2 + z3
x = x1 + x2 + x3
y = y1 + y2 + y3
The GMW/BGW* Approach:
● The (public) function being computed is written as a circuit
● Each participant secret-shares their private input
MPC from Secret Sharing
60
f (x,y,z)
x
y
z
z = z1 + z2 + z3
x = x1 + x2 + x3
y = y1 + y2 + y3
x2
x3
The GMW/BGW* Approach:
● The (public) function being computed is written as a circuit
● Each participant secret-shares their private input
MPC from Secret Sharing
61
f (x,y,z)
x
y
z
z = z1 + z2 + z3
x = x1 + x2 + x3
y = y1 + y2 + y3
x3
x2
y3
y1
The GMW/BGW* Approach:
● The (public) function being computed is written as a circuit
● Each participant secret-shares their private input
MPC from Secret Sharing
62
f (x,y,z)
x
y
z
x3 y3 z3
z = z1 + z2 + z3
x = x1 + x2 + x3
x1 y1
x2 y2
y = y1 + y2 + y3
z1
z2
The GMW/BGW* Approach:
● The (public) function being computed is written as a circuit
● Each participant secret-shares their private input
MPC from Secret Sharing
63
f (x,y,z)
x
y
z
x3 y3 z3
z
x
x1 y1 z1
x2 y2 z2
y
The GMW/BGW* Approach:
● The (public) function being computed is written as a circuit
● Each participant secret-shares their private input
● The circuit is evaluated gate-by-gate on the shares (this requires communication between participants)
MPC from Secret Sharing
64
f (x,y,z)
x
y
z
x3 y3 z3
x1 y1 z1
x2 y2 z2
The GMW/BGW* Approach:
● The (public) function being computed is written as a circuit
● Each participant secret-shares their private input
● The circuit is evaluated gate-by-gate on the shares (this requires communication between participants)
MPC from Secret Sharing
65
f (x,y,z)
x3 y3 z3
S3 = x3+ y3 + z3
S1 = x1+ y1 + z1
x1 y1 z1
x2 y2 z2
S2 = x2+ y2 + z2
x1 + x2 + x3 = x
y1 + y2 + y3 = y
z1 + z2 + z3 = z
The GMW/BGW* Approach:
● The (public) function being computed is written as a circuit
● Each participant secret-shares their private input
● The circuit is evaluated gate-by-gate on the shares (this requires communication between participants)
● Addition is possible without interaction → Si = xi+ yi + zi
MPC from Secret Sharing
66
f (x,y,z)
x3 y3 z3
S3 = x3+ y3 + z3
S1 = x1+ y1 + z1
x1 y1 z1
x2 y2 z2
S2 = x2+ y2 + z2
S1 = x1 + y1 + z1
S2 = x2 + y2 + z2
S3 = x3 + y3 + z3
+
S1+ S2 + S3 = x + y + z
x1 + x2 + x3 = x
y1 + y2 + y3 = y
z1 + z2 + z3 = z
The GMW/BGW* Approach:
● The (public) function being computed is written as a circuit
● Each participant secret-shares their private input
● The circuit is evaluated gate-by-gate on the shares
● Addition is possible without interaction → Si = xi+ yi + zi → S = x + y + z = S1+ S2 + S3
MPC from Secret Sharing
67
f (x,y,z)
x
y
z
x3 y3 z3
x1 y1 z1
x2 y2 z2
a3
a1
a2
The GMW/BGW* Approach:
● The (public) function being computed is written as a circuit
● Each participant secret-shares their private input
● The circuit is evaluated gate-by-gate on the shares (this requires communication between participants)
● Answer is reconstructed from final shares
MPC from Secret Sharing
68
x3 y3 z3
x1 y1 z1
x2 y2 z2
R3 = f (x3, y3, z3)
R2 = f (x2, y2, z2)
R1 = f (x1, y1, z1)
The GMW/BGW* Approach:
● The (public) function being computed is written as a circuit
● Each participant secret-shares their private input
● The circuit is evaluated gate-by-gate on the shares (this requires communication between participants)
● Answer is reconstructed from final shares
MPC from Secret Sharing
69
R = f (x, y , z)
R1
R3 = f (x3, y3, z3)
R2 = f (x2, y2, z2)
R1 = f (x1, y1, z1)
R3
R = R1 + R2 + R3
The GMW/BGW* Approach:
● The (public) function being computed is written as a circuit
● Each participant secret-shares their private input
● The circuit is evaluated gate-by-gate on the shares (this requires communication between participants)
● Answer is reconstructed from final shares
Yao Garbling Circuits
2PC - Boolean Circuits
71
Model of Computation: Represent the function as Arithmetic/Boolean circuit C
Limiting Factor : Circuit Depth
Depth 3
2PC - Yao Garbling Circuit 1982
72
[Yao82] A. Yao, Protocols for secure computations. In Proceedings of FOCS (1982)
2PC - Yao Garbling Circuit
73
step 1 - Truth table for each logic gate
2PC - Yao Garbling Circuit
74
Step 2 - Generate 2 secret keys for each possible input (one for 0 and another one for 1)
Yao Garbling Circuit
75
Step 3 - Rewrite the Truth Table by replacing 0/1 with their corresponding keys
Yao Garbling Circuit
76
Step 4 - Encrypt with both keys the output of each gate
Yao Garbling Circuit
77
Step 5 - Send this version of the circuit to the Evaluator
Yao Garbling Circuit - Evaluation
78
Step 1 - Use the known keys for your inputs to decrypt each gate value
example - inputs (1, 0, 0, 1)
Yao Garbling Circuit - Evaluation
79
Step 2 - Continue the process for following gates
Yao Garbling Circuit - Evaluation
80
Step 2 - Continue the process for following gates
Yao Garbling Circuit - Evaluation
81
Step 2 - Continue the process for following gates
Yao Garbling Circuit - Evaluation
82
Step 2 - Continue the process for following gates
Yao Garbling Circuit - Evaluation
83
Step 4 - Obtain the expected result
Bibliography
[AOR+19] Abdelrahaman Aly, Emmanuela Orsini, Dragos Rotaru, Nigel P. Smart, Tim Wood. Zaphod: Efficiently Combining LSSS and Garbled Circuits in SCALE. In Workshop on Encrypted Computing and Applied Homomorphic Cryptography 2019, 2019.
[BDOZ11] Rikke Bendlin, Ivan Damgaard, Claudio Orlandi, Sarah Zakarias. BDOZ: Semi-homomorphic encryption and multiparty computation. In Advances in Cryptology – EUROCRYPT 2011, 2011, Springer.
[BGW88 ]M. Ben-Or, S. Goldwasser and A. Wigderson. Completeness Theorems for Non-Cryptographic Fault-Tolerant Distributed Computation. In the 20th STOC, pages 1–10, 1988.
[BMR90] Donald Beaver, Silvio Micali, and Phillip Rogaway. The round complexity of secure protocols. In 22nd ACM STOC, 1990.
[DPSZ12] Ivan Damgaard, Valerio Pastro, Nigel P. Smart, Sarah Zakarias. SPDZ: Multiparty computation from somewhat homomorphic encryption. In Advances in Cryptology – CRYPTO 2012, Springer.
[GMW87] Oded Goldreich, Silvio Micali, and Avi Wigderson. How to prove all NP- statements in zero-knowledge, and a methodology of cryptographic protocol design. In CRYPTO’86, volume 263 of LNCS, pages 171–185. Springer.
[KRS18] M. Keller, D. Rotaru, N. Smart, and T. Wood, Reducing Communication Channels in MPC. In Security and Cryptography for Networks 11, pp. 181-199, 2018.
[LPSY19] Y. Lindell, B. Pinkas, N. Smart, A. Yanai. Efficient Constant Round Multi-Party Computation Combining BMR and SPDZ. In Journal of Cryptology 32, 2019.
[NNOB12] Jesper Nielsen, Peter Nordholt, Claudio Orlandi, Sai S. Burra. TinyOT: A new approach to practical active-secure two-party computation. In CRYPTO 2012, Lecture Notes in Computer Science, pages 681–700, 2012, Springer
[RT19] D. Rotaru, T. Wood, MArBled Circuits: Mixing Arithmetic and Boolean Circuits with Active Security. In INDOCRYPT 2019, Lecture Notes in Computer Science, Springer-Verlag, 2019
[Yao82] A. Yao, Protocols for secure computations. In Proceedings of FOCS (1982)
4.Private Information Retrieval
Private Information Retrieval
86
Trivial solution: Download the entire database
�
Can the problem be solved with less communications?
PIR Setting:
Server: - holds n-bit string x
- n is very large
User: - wishes to retrieve value xi
- to keep i private
Private Information
Retrieval
Query i
?
xi
DB | |
1 | x1 |
2 | x2 |
3 | x3 |
4 | x4 |
. . . | . . . |
n | xn |
Private Information Retrieval
87
Information Theoretic
PIR
Computational
PIR
Private Information Retrieval
88
Information Theoretic
PIR
Computational
PIR
Private Information Retrieval
89
Information Theoretic
PIR
Computational
PIR
Private Information Retrieval
90
Information Theoretic
PIR
Computational
PIR
State of the Art
91
This work = EC2022
“Single-Server Private Information Retrieval with Sublinear Amortized Time”
Corrigan-Gibbs,
Henzinger,
Kogan
ia.cr/081
✝ public-key operations: n1/2
*This number of per-client queries assumes that the total number of clients, m, grows sufficently large.
Variations of Private Information Retrieval
92
– what if Alice wants a block of bits (of size m)?
– can we do better than invoking a PIR protocol m times? �
– how to ensure that even t colluding databases cannot figure out in which bit Alice is interested in? �
– the database usually has to do O(n) computations – can this be cut down?
Private Information
Retrieval
Query
Data
?
5. Private Set Intersection
FHE-based
Private Set Intersection
94
Receiver Sender
R = {a, b, c, n} R ∩ S = ? S = {a, b, d, e, f, g, h, i, j, k, l, m}
Problem :
Two parties compute their set intersection keeping their sets private
Private Set Intersection
95
Receiver Sender
R = {a}
Constructs polynomial F
F (a) = 2, F(b)=4, …
2
Encrypts the search a
a
1
1c82e 7b44e |
1c82e 7b44e |
Solution based on FHE :
element | a | b | d | e | f | g | h | i | m |
label | #2 | #4 | #8 | #4 | #1 | #4 | #7 | #3 | #1 |
Private Set Intersection
96
Receiver Sender
R = {a}
Constructs polynomial F of degree |set|
Evaluate F on Enc(a)
1
Encrypts the search a
a
1
1c82e 7b44e |
1c82e 7b44e |
Solution based on FHE :
element | a | b | d | e | f | g | h | i | m |
label | #2 | #4 | #8 | #4 | #1 | #4 | #7 | #3 | #1 |
2
Enc(a)
Private Set Intersection
97
Receiver Sender
R = {a}
Constructs polynomial F of degree |set|
Evaluate F on Enc(a)
F (Enc(a)) = Enc(2)
1
Encrypts the search a
a
1
1c82e 7b44e |
1c82e 7b44e |
Solution based on FHE :
element | a | b | d | e | f | g | h | i | m |
label | #2 | #4 | #8 | #4 | #1 | #4 | #7 | #3 | #1 |
2
Enc(a)
Private Set Intersection
98
Receiver Sender
R = {a}
Constructs polynomial F of degree |set|
Evaluate F on Enc(a)
F (Enc(a)) = Enc(2)
1
Encrypts the search a
Decrypts and learns value
a
1
1c82e 7b44e |
1c82e 7b44e |
Solution based on FHE :
element | a | b | d | e | f | g | h | i | m |
label | #2 | #4 | #8 | #4 | #1 | #4 | #7 | #3 | #1 |
2
Enc(a)
Encrypted label for a
F( ) =
Enc(2) |
4
Enc(2) |
0, 0, t, z
{a, b}
1c82e 7b44e |
Enc(2) |
Private Set Intersection
99
Receiver Sender
R = {a}
Performance:
element | a | b | d | e | f | g | h | i | m |
label | #2 | #4 | #8 | #4 | #1 | #4 | #7 | #3 | #1 |
Private Set Intersection
100
Receiver Sender
R = {a}
Comparison with Key-word PIR:
element | a | b | d | e | f | g | h | i | m |
label | #2 | #4 | #8 | #4 | #1 | #4 | #7 | #3 | #1 |
FHE-PSI:
PIR/MPC:
Cuckoo Hashing
101
Cuckoo Table | |
Index | h1/2/3 |
1 | |
2 |
|
3 | |
4 | |
Cuckoo Table | |||
Index | h1 | h2 | h3 |
1 |
|
|
|
2 |
| a |
|
3 | a |
|
|
4 |
|
| a |
h1(a) = 3, h2(a) = 2, h3(a) = 4,
Receiver Sender
R = {a, b, c, n} S = {a, b, d, e, f, g, h, i, j, k, l, m}
Cuckoo Hashing
102
Cuckoo Table | |
Index | h1/2/3 |
1 | |
2 |
|
3 |
|
4 | |
h1(a) = 3, h2(a) = 2, h3(a) = 4,
h1(b) = 2, h2(b) = 3, h3(b) = 1,
Receiver Sender
R = {a, b, c, n} S = {a, b, d, e, f, g, h, i, j, k, l, m}
Cuckoo Table | |||
Index | h1 | h2 | h3 |
1 |
|
| b |
2 | b | a |
|
3 | a | b |
|
4 |
|
| a |
Cuckoo Hashing
103
Cuckoo Table | |
Index | h1/2/3 |
1 | |
2 | b |
3 | c |
4 | a |
Cuckoo Table | |||
Index | h1 | h2 | h3 |
1 | d,f,l | j,e,l | b,i,k |
2 | b,g,i,j | a,d,k | g,l |
3 | a,k,m | b,f,g | d,e,m |
4 | e,h | h,i,m | a,f,h,j |
h1(a) = 3, h2(a) = 2, h3(a) = 4,
h1(b) = 2, h2(b) = 3, h3(b) = 1,
h1(c) = 4, h2(c) = 3, h3(c) = 2,
Receiver Sender
R = {a, b, c, n} S = {a, b, d, e, f, g, h, i, j, k, l, m}
Cuckoo Hashing
104
Cuckoo Table | |
Index | h1/2/3 |
1 | |
2 | b |
3 | c |
4 | a |
Cuckoo Table | |||
Index | h1 | h2 | h3 |
1 | d,f,l | j,e,l | b,i,k |
2 | b,g,i,j | a,d,k | g,l |
3 | a,k,m | b,f,g | d,e,m |
4 | e,h | h,i,m | a,f,h,j |
h1(a) = 3, h2(a) = 2, h3(a) = 4,
h1(b) = 2, h2(b) = 3, h3(b) = 1,
h1(c) = 4, h2(c) = 3, h3(c) = 2,
h1(n) = 2, h2(n) = 3, h3(n) = 1.
Receiver Sender
R = {a, b, c, n} S = {a, b, d, e, f, g, h, i, j, k, l, m}
Cuckoo Hashing
105
Cuckoo Table | |
Index | h1/2/3 |
1 | b |
2 | n |
3 | c |
4 | a |
Cuckoo Table | |||
Index | h1 | h2 | h3 |
1 | d,f,l | j,e,l | b,i,k |
2 | b,g,i,j | a,d,k | g,l |
3 | a,k,m | b,f,g | d,e,m |
4 | e,h | h,i,m | a,f,h,j |
h1(a) = 3, h2(a) = 2, h3(a) = 4,
h1(b) = 2, h2(b) = 3, h3(b) = 1,
h1(c) = 4, h2(c) = 3, h3(c) = 2,
h1(n) = 2, h2(n) = 3, h3(n) = 1.
Receiver Sender
R = {a, b, c, n} S = {a, b, d, e, f, g, h, i, j, k, l, m}
Cuckoo Hashing
106
Cuckoo Table | |
Index | h1/2/3 |
1 | b |
2 | n |
3 | c |
4 | a |
Cuckoo Table | |||
Index | h1 | h2 | h3 |
1 | d,f,l | j,e,l | b,i,k |
2 | b,g,i,j | a,d,k | g,l |
3 | a,k,m | b,f,g | d,e,m |
4 | e,h | h,i,m | a,f,h,j |
h1(a) = 3, h2(a) = 2, h3(a) = 4,
h1(b) = 2, h2(b) = 3, h3(b) = 1,
h1(c) = 4, h2(c) = 3, h3(c) = 2,
h1(n) = 2, h2(n) = 3, h3(n) = 1,
Receiver Sender
R = {a, b, c, n} S = {a, b, d, e, f, g, h, i, j, k, l, m}
# indexes > | R |
table size = 3 | S |, average line size = 3/#indexes | S |
Private Set Intersection
107
Receiver Sender
R = {a, b, c, n} R ∩ S = ? S = {a, b, d, e, f, g, h, i, j, k, l, m}
The intersection is done for each line in the Cuckoo Table
Optimisations : Batching, Windowing and Splitting
Encode lines as functions
F1, F2, F2, F4
Evaluate
F1 on first ciphertext
F2 on second ciphertext
etc.
Encrypts all
table values
Decrypts and
learns the intersection
Cuckoo Table | |
b | |
n | |
c | |
a |
Cuckoo Table | ||
d,f,l | d,e,l | b,i,k |
b,g,i,j | a,j,k | g,l |
a,k,m | b,f,g | d,e,m |
e,h | h,i,m | a,f,h,j |
1
2
3
4
1c82e 7b44e | 0d96c 11589 | 62165 78a7f | e35y6 c57u8 |
Ciphertexts
Encrypted intersection
Enc(0/r) | Enc(0/s) | Enc(0/t) | Enc(0/z) |
Conclusions
Cryptographic Primitives
109
Fully
Homomorphic
Encryption
Private Information
Retrieval
Multi-Party
Computation
Hash
Function
Searchable Encryption
Symmetric Cryptography Best Performance
Heuristic Security
Public Key Cryptography
Computational expensive
Proved Security
Private Information
Retrieval