vChain: Enabling Verifjable Boolean Range Queries over Blockchain - - PowerPoint PPT Presentation

vchain enabling verifjable boolean range queries over
SMART_READER_LITE
LIVE PREVIEW

vChain: Enabling Verifjable Boolean Range Queries over Blockchain - - PowerPoint PPT Presentation

vChain: Enabling Verifjable Boolean Range Queries over Blockchain Databases Cheng Xu Ce Zhang Jianliang Xu {chengxu, cezhang, xujl}@comp.hkbu.edu.hk July 2, 2019 @ SIGMOD 19 Department of Computer Science Hong Kong Baptist University


slide-1
SLIDE 1

vChain: Enabling Verifjable Boolean Range Queries over Blockchain Databases

Cheng Xu Ce Zhang Jianliang Xu {chengxu, cezhang, xujl}@comp.hkbu.edu.hk July 2, 2019 @ SIGMOD ’19

Department of Computer Science Hong Kong Baptist University

slide-2
SLIDE 2

Background

  • Blockchain: Append-only data structure

collectively maintained by a network of (untrusted) nodes

  • Hash chain
  • Consensus
  • Immutability
  • Decentralization
  • A wide range of applications
  • Digital identities
  • Decentralized notary
  • Distributed storage
  • Smart Contracts
  • Blockchain Structure [Credit: Wikipedia]

1/15

slide-3
SLIDE 3

Background

  • Blockchain: Append-only data structure

collectively maintained by a network of (untrusted) nodes

  • Hash chain
  • Consensus
  • Immutability
  • Decentralization
  • A wide range of applications
  • Digital identities
  • Decentralized notary
  • Distributed storage
  • Smart Contracts
  • · · ·

Blockchain Applications [Credit: FAHM Technology Partners] 1/15

slide-4
SLIDE 4

Blockchain Database Solutions

  • Increasing demand to search the data stored in blockchains
  • Blockchain database solutions to support SQL-like queries

Blockchain Database Solutions

  • Issue: relying on a trusted party who can faithfully answer user queries

2/15

slide-5
SLIDE 5

Blockchain Database Solutions

  • Increasing demand to search the data stored in blockchains
  • Blockchain database solutions to support SQL-like queries

Blockchain Network Trusted Service Provider User Q R fetch data

Workfmow of Existing Solutions

  • Issue: relying on a trusted party who can faithfully answer user queries

2/15

slide-6
SLIDE 6

Secure Blockchain Search

  • The assumption of trusted party may not always hold
  • Basic solution to integrity-assured blockchain search
  • Becoming full node
  • High cost
  • Storage: to store a complete replicate (240 GB for Bitcoin as of June 2019)
  • Computation: to verify the consensus proofs
  • Network: to synchronize with the network
  • Better Solution: becoming light node and outsource computation
  • Low cost: maintaining block headers only (< 50 MB for Bitcoin)

Miner Full Node Light Node Full Node Miner

Q R Q R

  • Challenge: how to maintain query integrity?

3/15

slide-7
SLIDE 7

Secure Blockchain Search

  • The assumption of trusted party may not always hold
  • Basic solution to integrity-assured blockchain search
  • Becoming full node
  • High cost
  • Storage: to store a complete replicate (240 GB for Bitcoin as of June 2019)
  • Computation: to verify the consensus proofs
  • Network: to synchronize with the network
  • Better Solution: becoming light node and outsource computation
  • Low cost: maintaining block headers only (< 50 MB for Bitcoin)

Miner Full Node Light Node Full Node Miner

Q R Q R

  • Challenge: how to maintain query integrity?

3/15

slide-8
SLIDE 8

Secure Blockchain Search

  • The assumption of trusted party may not always hold
  • Basic solution to integrity-assured blockchain search
  • Becoming full node
  • High cost
  • Storage: to store a complete replicate (240 GB for Bitcoin as of June 2019)
  • Computation: to verify the consensus proofs
  • Network: to synchronize with the network
  • Better Solution: becoming light node and outsource computation
  • Low cost: maintaining block headers only (< 50 MB for Bitcoin)

Miner Full Node Light Node Full Node Miner · · ·

Q R Q R

  • Challenge: how to maintain query integrity?

3/15

slide-9
SLIDE 9

Secure Blockchain Search

  • The assumption of trusted party may not always hold
  • Basic solution to integrity-assured blockchain search
  • Becoming full node
  • High cost
  • Storage: to store a complete replicate (240 GB for Bitcoin as of June 2019)
  • Computation: to verify the consensus proofs
  • Network: to synchronize with the network
  • Better Solution: becoming light node and outsource computation
  • Low cost: maintaining block headers only (< 50 MB for Bitcoin)

Miner Full Node Light Node Full Node Miner · · ·

Q R Q R

  • Challenge: how to maintain query integrity?

3/15

slide-10
SLIDE 10

Solution #1: Smart Contract

  • A trusted program to execute user-defjned

computation upon the blockchain

  • Smart Contract reads and writes blockchain

data

  • Execution integrity is ensured by the

consensus protocol

  • Ofger trusted storage and computation

capabilities

  • Function as a trusted virtual machine

Traditional Computer Blockchain VM Storage RAM Blockchain Computation CPU Smart Contract

4/15

slide-11
SLIDE 11

Solution #1: Smart Contract

  • Leverage Smart Contract for trusted computation
  • Users submit query parameters to blockchain
  • Miners execute computation and write results into blockchain
  • Users read results from blockchain

[Credit: Oscar W]

  • Drawbacks
  • Long latency: long time for consensus protocol to confjrm a block
  • Poor scalability: transaction rate of the blockchain is limited
  • Privacy concern: query history is permanently and publicly stored in blockchain
  • High cost: executing smart contract in ETH requires paying gas to miners

(INFOCOM 2018 requires 4 201 232 gas 0 18 Ether 24 USD per query)

  • S. Hu, C. Cai, Q. Wang, C. Wang, X. Luo, and K. Ren, “Searching an encrypted cloud meets blockchain: A decentralized, reliable

and fair realization,” in IEEE INFOCOM, Honolulu, HI, USA, 2018, pp. 792–800. 5/15

slide-12
SLIDE 12

Solution #1: Smart Contract

  • Leverage Smart Contract for trusted computation
  • Users submit query parameters to blockchain
  • Miners execute computation and write results into blockchain
  • Users read results from blockchain

[Credit: Oscar W]

  • Drawbacks
  • Long latency: long time for consensus protocol to confjrm a block
  • Poor scalability: transaction rate of the blockchain is limited
  • Privacy concern: query history is permanently and publicly stored in blockchain
  • High cost: executing smart contract in ETH requires paying gas to miners

(INFOCOM 2018 requires 4 201 232 gas = 0.18 Ether = 24 USD per query)

  • S. Hu, C. Cai, Q. Wang, C. Wang, X. Luo, and K. Ren, “Searching an encrypted cloud meets blockchain: A decentralized, reliable

and fair realization,” in IEEE INFOCOM, Honolulu, HI, USA, 2018, pp. 792–800. 5/15

slide-13
SLIDE 13

Solution #2: Verifjable Computation

  • Verifjable Computation (VC)
  • Computation is outsourced to untrusted service provider
  • Service provider returns results with cryptographic proof
  • Users verify integrity of results using the proof
  • Outsource queries to full node and verify the results using VC
  • General VC: Expressive but high overhead
  • Authenticated Data Structure (ADS)-based VC: Effjcient but requiring customized designs

Blockchain Network Full Node User Q R proof synchronize vChain 6/15

slide-14
SLIDE 14

Solution #2: Verifjable Computation

  • Verifjable Computation (VC)
  • Computation is outsourced to untrusted service provider
  • Service provider returns results with cryptographic proof
  • Users verify integrity of results using the proof
  • Outsource queries to full node and verify the results using VC
  • General VC: Expressive but high overhead
  • Authenticated Data Structure (ADS)-based VC: Effjcient but requiring customized designs

Blockchain Network Full Node User Q R, proof synchronize vChain 6/15

slide-15
SLIDE 15

Our Solution: vChain

  • Problem: Integrity-assured Search over Blockchain Data
  • System Model:
  • Users become light nodes
  • Queries are outsourced to full nodes
  • Full node not trusted
  • Program glitches
  • Security vulnerabilities
  • Commercial interest
  • Blockchain Network

Full Node User Q R, proof synchronize

  • Security requirements
  • Soundness: none of the objects returned as results have been tampered with and all of

them satisfy the query conditions

  • Completeness: no valid result is missing regarding the query conditions

7/15

slide-16
SLIDE 16

Our Solution: vChain

  • Problem: Integrity-assured Search over Blockchain Data
  • System Model:
  • Users become light nodes
  • Queries are outsourced to full nodes
  • Full node not trusted
  • Program glitches
  • Security vulnerabilities
  • Commercial interest
  • Blockchain Network

Full Node User Q R, proof synchronize

  • Security requirements
  • Soundness: none of the objects returned as results have been tampered with and all of

them satisfy the query conditions

  • Completeness: no valid result is missing regarding the query conditions

7/15

slide-17
SLIDE 17

Our Solution: vChain

  • Problem: Integrity-assured Search over Blockchain Data
  • System Model:
  • Users become light nodes
  • Queries are outsourced to full nodes
  • Full node not trusted
  • Program glitches
  • Security vulnerabilities
  • Commercial interest
  • · · ·

Blockchain Network Full Node User Q R, proof synchronize

  • Security requirements
  • Soundness: none of the objects returned as results have been tampered with and all of

them satisfy the query conditions

  • Completeness: no valid result is missing regarding the query conditions

7/15

slide-18
SLIDE 18

Our Solution: vChain

  • Problem: Integrity-assured Search over Blockchain Data
  • System Model:
  • Users become light nodes
  • Queries are outsourced to full nodes
  • Full node not trusted
  • Program glitches
  • Security vulnerabilities
  • Commercial interest
  • · · ·

Blockchain Network Full Node User Q R, proof synchronize

  • Security requirements
  • Soundness: none of the objects returned as results have been tampered with and all of

them satisfy the query conditions

  • Completeness: no valid result is missing regarding the query conditions

7/15

slide-19
SLIDE 19

vChain — System Overview

  • Miner: constructs each block with additional

ADS to achieve VC scheme

  • Service Provider: is a full node and computes

the results with the verifjcation object (VO)

  • Query User: is a light node; uses the VO and

block header to verify the results

(Full Node) . . . . . . PreBkHash . . .

  • i

ti Vi Wi

  • 1

t1 1 {a, b}

  • 2

t2 2 {a}

  • 3

t3 3 {c}

  • 4

t4 5 {a, b}

  • 5

t5 1 {c, d} blocki (Light Node) . . . . . . q1 : [ti, ti], [1, 2], b q2 : −, [1, 2], c ∨ d q3 : −, [1, 2], a ∧ d (Miner) Block Headers Block Headers & Data (incl. ADS) Q Service Provider (SP) Query User

{o1}, VO {o5}, VO ∅, VO

Block Header & Data Block Header

System Model of vChain 8/15

slide-20
SLIDE 20

vChain — Data Model & Queries

  • Data Model
  • Each block contains several temporal objects {o1, o2, . . . , on}
  • oi is represented by ti, Vi, Wi

(timestamp, multi-dimensional vector, set valued attribute)

  • Boolean Range Queries
  • Find all Bitcoin transactions happening in certain period

Tx: time, transfer amount, {“send address”, “receive address”} q = [2018-05, 2018-06], [10, +∞], “send:1FFYc” ∧ “receive:2DAAf”

  • Subscribe to car rental messages with certain price and keywords

Tx: time, rental price, {“type”, “model”} q = −, [200, 250], “Sedan” ∧ (“Benz” ∨ “BMW”)

9/15

slide-21
SLIDE 21

Challenges

  • How to construct ADS for unbounded and append-only blockchain data?
  • How to design a one-size-fjts-all ADS scheme that supports dynamic queries over

arbitrary attributes?

  • How to leverage intra/inter-block optimization techniques to improve query effjciency?
  • How to make the system highly scalable to a large number of subscription queries?

10/15

slide-22
SLIDE 22

Cryptographic Building Block

  • Merkle Hash Tree [Mer89]
  • Support effjcient membership/range queries
  • Limitations
  • An MHT supports only the query keys on which the Merkle tree is built
  • MHTs do not work with set-valued attributes
  • MHTs of difgerent blocks cannot be aggregated

N0 = H(N1|N2) N1 = H(N3|N4) N2 = H(N5|N6) N2 = H(N5|N6) N3 = H(o1) N3 = H(o1) N4 = H(o2)

  • 1
  • 2

N5 = H(o3) N6 = H(o4)

  • 3
  • 4

sig(N0) Q

Merkle Hash Tree

  • Cryptographic Multiset Accumulator [PTT11]
  • Map a multiset to an element in cyclic multiplicative group in a collision resistant fashion
  • Utility: prove set disjoint
  • Protcols:
  • KeyGen 1

sk pk : generate keys

  • Setup X pk

acc X : return the accumulative value w.r.t. X

  • ProveDisjoint X1 X2 pk

:

  • n input two multisets X1 and X2, where X1

X2 , output a proof

  • VerifyDisjoint acc X1

acc X2 pk 0 1 :

  • n input the accumulative values acc X1 , acc X2 , and a proof

, output 1 ifg X1 X2

11/15

slide-23
SLIDE 23

Cryptographic Building Block

  • Merkle Hash Tree [Mer89]
  • Support effjcient membership/range queries
  • Limitations
  • An MHT supports only the query keys on which the Merkle tree is built
  • MHTs do not work with set-valued attributes
  • MHTs of difgerent blocks cannot be aggregated

N0 = H(N1|N2) N1 = H(N3|N4) N2 = H(N5|N6) N2 = H(N5|N6) N3 = H(o1) N3 = H(o1) N4 = H(o2)

  • 1
  • 2

N5 = H(o3) N6 = H(o4)

  • 3
  • 4

sig(N0) Q

Merkle Hash Tree

  • Cryptographic Multiset Accumulator [PTT11]
  • Map a multiset to an element in cyclic multiplicative group in a collision resistant fashion
  • Utility: prove set disjoint
  • Protcols:
  • KeyGen(1λ) → (sk, pk): generate keys
  • Setup(X, pk) → acc(X): return the accumulative value w.r.t. X
  • ProveDisjoint(X1, X2, pk) → π:
  • n input two multisets X1 and X2, where X1 ∩ X2 = ∅, output a proof π
  • VerifyDisjoint(acc(X1), acc(X2), π, pk) → {0, 1}:
  • n input the accumulative values acc(X1), acc(X2), and a proof π, output 1 ifg X1 ∩ X2 = ∅

11/15

slide-24
SLIDE 24

Basic Solution

  • Consider a single object and boolean query
  • Each block stores a single object oi = ti, Wi
  • ADS generation (Miner)
  • Extend the block header with AttDigest
  • AttDigest

acc Wi Setup Wi pk

  • Constant size regardless of number of elements in Wi
  • Support ProveDisjoint

& VerifyDisjoint

PreBkHash TS ConsProof ObjectHash AttDigest

blocki

  • i

Extended Block Structure

  • Verifjable Query
  • Match:

return oi as a result; integrity is ensured by the ObjectHash in the block header

  • Mismatch:

use AttDigest to prove the mismatch of oi

Example of Mismatch

  • Transform query condition to a list of sets: q

“Sedan” “Benz” “BMW” “Sedan” “Benz” “BMW”

  • Consider oi

“Van” “Benz” , we have “Sedan” “Van” “Benz”

  • Apply ProveDisjoint

“Van” “Benz” “Sedan” pk to compute proof

  • User retrieves AttDigest

acc “Van” “Benz” from the block header and uses VerifyDisjoint AttDigest acc “Sedan” pk to verify the mismatch 12/15

slide-25
SLIDE 25

Basic Solution

  • Consider a single object and boolean query
  • Each block stores a single object oi = ti, Wi
  • ADS generation (Miner)
  • Extend the block header with AttDigest
  • AttDigest = acc(Wi) = Setup(Wi, pk)
  • Constant size regardless of number of elements in Wi
  • Support ProveDisjoint(·) & VerifyDisjoint(·)

. . . PreBkHash TS ConsProof ObjectHash AttDigest

blocki

  • i

. . .

Extended Block Structure

  • Verifjable Query
  • Match:

return oi as a result; integrity is ensured by the ObjectHash in the block header

  • Mismatch:

use AttDigest to prove the mismatch of oi

Example of Mismatch

  • Transform query condition to a list of sets: q

“Sedan” “Benz” “BMW” “Sedan” “Benz” “BMW”

  • Consider oi

“Van” “Benz” , we have “Sedan” “Van” “Benz”

  • Apply ProveDisjoint

“Van” “Benz” “Sedan” pk to compute proof

  • User retrieves AttDigest

acc “Van” “Benz” from the block header and uses VerifyDisjoint AttDigest acc “Sedan” pk to verify the mismatch 12/15

slide-26
SLIDE 26

Basic Solution

  • Consider a single object and boolean query
  • Each block stores a single object oi = ti, Wi
  • ADS generation (Miner)
  • Extend the block header with AttDigest
  • AttDigest = acc(Wi) = Setup(Wi, pk)
  • Constant size regardless of number of elements in Wi
  • Support ProveDisjoint(·) & VerifyDisjoint(·)

. . . PreBkHash TS ConsProof ObjectHash AttDigest

blocki

  • i

. . .

Extended Block Structure

  • Verifjable Query
  • Match:

return oi as a result; integrity is ensured by the ObjectHash in the block header

  • Mismatch:

use AttDigest to prove the mismatch of oi

Example of Mismatch

  • Transform query condition to a list of sets: q

“Sedan” “Benz” “BMW” “Sedan” “Benz” “BMW”

  • Consider oi

“Van” “Benz” , we have “Sedan” “Van” “Benz”

  • Apply ProveDisjoint

“Van” “Benz” “Sedan” pk to compute proof

  • User retrieves AttDigest

acc “Van” “Benz” from the block header and uses VerifyDisjoint AttDigest acc “Sedan” pk to verify the mismatch 12/15

slide-27
SLIDE 27

Basic Solution

  • Consider a single object and boolean query
  • Each block stores a single object oi = ti, Wi
  • ADS generation (Miner)
  • Extend the block header with AttDigest
  • AttDigest = acc(Wi) = Setup(Wi, pk)
  • Constant size regardless of number of elements in Wi
  • Support ProveDisjoint(·) & VerifyDisjoint(·)

. . . PreBkHash TS ConsProof ObjectHash AttDigest

blocki

  • i

. . .

Extended Block Structure

  • Verifjable Query
  • Match: return oi as a result; integrity is ensured by the ObjectHash in the block header
  • Mismatch:

use AttDigest to prove the mismatch of oi

Example of Mismatch

  • Transform query condition to a list of sets: q

“Sedan” “Benz” “BMW” “Sedan” “Benz” “BMW”

  • Consider oi

“Van” “Benz” , we have “Sedan” “Van” “Benz”

  • Apply ProveDisjoint

“Van” “Benz” “Sedan” pk to compute proof

  • User retrieves AttDigest

acc “Van” “Benz” from the block header and uses VerifyDisjoint AttDigest acc “Sedan” pk to verify the mismatch 12/15

slide-28
SLIDE 28

Basic Solution

  • Consider a single object and boolean query
  • Each block stores a single object oi = ti, Wi
  • ADS generation (Miner)
  • Extend the block header with AttDigest
  • AttDigest = acc(Wi) = Setup(Wi, pk)
  • Constant size regardless of number of elements in Wi
  • Support ProveDisjoint(·) & VerifyDisjoint(·)

. . . PreBkHash TS ConsProof ObjectHash AttDigest

blocki

  • i

. . .

Extended Block Structure

  • Verifjable Query
  • Match: return oi as a result; integrity is ensured by the ObjectHash in the block header
  • Mismatch: use AttDigest to prove the mismatch of oi

Example of Mismatch

  • Transform query condition to a list of sets: q

“Sedan” “Benz” “BMW” “Sedan” “Benz” “BMW”

  • Consider oi

“Van” “Benz” , we have “Sedan” “Van” “Benz”

  • Apply ProveDisjoint

“Van” “Benz” “Sedan” pk to compute proof

  • User retrieves AttDigest

acc “Van” “Benz” from the block header and uses VerifyDisjoint AttDigest acc “Sedan” pk to verify the mismatch 12/15

slide-29
SLIDE 29

Basic Solution

  • Consider a single object and boolean query
  • Each block stores a single object oi = ti, Wi
  • ADS generation (Miner)
  • Extend the block header with AttDigest
  • AttDigest = acc(Wi) = Setup(Wi, pk)
  • Constant size regardless of number of elements in Wi
  • Support ProveDisjoint(·) & VerifyDisjoint(·)

. . . PreBkHash TS ConsProof ObjectHash AttDigest

blocki

  • i

. . .

Extended Block Structure

  • Verifjable Query
  • Match: return oi as a result; integrity is ensured by the ObjectHash in the block header
  • Mismatch: use AttDigest to prove the mismatch of oi

Example of Mismatch

  • Transform query condition to a list of sets: q = “Sedan” ∧ (“Benz” ∨ “BMW”) → {“Sedan”}, {“Benz”, “BMW”}
  • Consider oi : {“Van”, “Benz”}, we have {“Sedan”} ∩ {“Van”, “Benz”} = ∅
  • Apply ProveDisjoint({“Van”, “Benz”}, {“Sedan”}, pk) to compute proof π
  • User retrieves AttDigest = acc({“Van”, “Benz”}) from the block header and uses

VerifyDisjoint(AttDigest, acc({“Sedan”}), π, pk) to verify the mismatch 12/15

slide-30
SLIDE 30

Extension to Range Queries

  • Idea: transform numerical attributes into set-valued attributes
  • Numerical value can be transformed into a set of

binary prefjx elements

  • Example: trans 4

1 10 100 * denotes wildcard matching operator

  • Range can be transformed into an equivalent

boolean expression using a binary tree

  • Example: 0 6

10 110 Equivalence set: 10 110

∗ 0∗ 00∗ 000 001 01∗ 010 011 1∗ 10∗ 100 101 11∗ 110 111 q 0 6

Example of Transformation

  • Range queries can be processed in a similar manner as boolean queries
  • Transform vi

trans vi EquiSet

  • Example:
  • 4

0 6 1 10 100 10 110 10

  • 7

0 6 1 11 111 10 110

13/15

slide-31
SLIDE 31

Extension to Range Queries

  • Idea: transform numerical attributes into set-valued attributes
  • Numerical value can be transformed into a set of

binary prefjx elements

  • Example: trans(4) = {1∗, 10∗, 100}

* denotes wildcard matching operator

  • Range can be transformed into an equivalent

boolean expression using a binary tree

  • Example: 0 6

10 110 Equivalence set: 10 110

∗ 0∗ 00∗ 000 001 01∗ 010 011 1∗ 10∗ 100 101 11∗ 110 111 q 0 6

Example of Transformation

  • Range queries can be processed in a similar manner as boolean queries
  • Transform vi

trans vi EquiSet

  • Example:
  • 4

0 6 1 10 100 10 110 10

  • 7

0 6 1 11 111 10 110

13/15

slide-32
SLIDE 32

Extension to Range Queries

  • Idea: transform numerical attributes into set-valued attributes
  • Numerical value can be transformed into a set of

binary prefjx elements

  • Example: trans(4) = {1∗, 10∗, 100}

* denotes wildcard matching operator

  • Range can be transformed into an equivalent

boolean expression using a binary tree

  • Example: [0, 6] → 0∗ ∨ 10∗ ∨ 110

Equivalence set: {0∗, 10∗, 110}

∗ 0∗ 00∗ 000 001 01∗ 010 011 1∗ 10∗ 100 101 11∗ 110 111 q = [0, 6]

Example of Transformation

  • Range queries can be processed in a similar manner as boolean queries
  • Transform vi

trans vi EquiSet

  • Example:
  • 4

0 6 1 10 100 10 110 10

  • 7

0 6 1 11 111 10 110

13/15

slide-33
SLIDE 33

Extension to Range Queries

  • Idea: transform numerical attributes into set-valued attributes
  • Numerical value can be transformed into a set of

binary prefjx elements

  • Example: trans(4) = {1∗, 10∗, 100}

* denotes wildcard matching operator

  • Range can be transformed into an equivalent

boolean expression using a binary tree

  • Example: [0, 6] → 0∗ ∨ 10∗ ∨ 110

Equivalence set: {0∗, 10∗, 110}

∗ 0∗ 00∗ 000 001 01∗ 010 011 1∗ 10∗ 100 101 11∗ 110 111 q = [0, 6]

Example of Transformation

  • Range queries can be processed in a similar manner as boolean queries
  • Transform vi ∈ [α, β] → trans(vi) ∩ EquiSet([α, β]) = ∅
  • Example:
  • 4 ∈ [0, 6] → {1∗, 10∗, 100} ∩ {0∗, 10∗, 110} = {10∗} = ∅
  • 7

0 6 1 11 111 10 110

13/15

slide-34
SLIDE 34

Extension to Range Queries

  • Idea: transform numerical attributes into set-valued attributes
  • Numerical value can be transformed into a set of

binary prefjx elements

  • Example: trans(4) = {1∗, 10∗, 100}

* denotes wildcard matching operator

  • Range can be transformed into an equivalent

boolean expression using a binary tree

  • Example: [0, 6] → 0∗ ∨ 10∗ ∨ 110

Equivalence set: {0∗, 10∗, 110}

∗ 0∗ 00∗ 000 001 01∗ 010 011 1∗ 10∗ 100 101 11∗ 110 111 q = [0, 6]

Example of Transformation

  • Range queries can be processed in a similar manner as boolean queries
  • Transform vi ∈ [α, β] → trans(vi) ∩ EquiSet([α, β]) = ∅
  • Example:
  • 4 ∈ [0, 6] → {1∗, 10∗, 100} ∩ {0∗, 10∗, 110} = {10∗} = ∅
  • 7 /

∈ [0, 6] → {1∗, 11∗, 111} ∩ {0∗, 10∗, 110} = ∅

13/15

slide-35
SLIDE 35

Batch Verifjcation & Subscription Queries

  • Observation: objects may share common attributes that mismatch query condition
  • Idea: we can aggregate them to speed up query processing
  • Intra-Block Index: aggregate objects inside same block using MHT
  • Inter-Block Index: aggregate objects across blocks using skip list
  • Inverted Prefjx Tree: aggregate similar subscription queries from users

PreBkHash TS ConsProof MerkleRoot Nr N5 N1 N2 N6 N3 N4 hashr Wr AttDigestr hash1 W1 AttDigest1

  • 1

blocki

Node Object Set Attributes N1

  • 1

W1 “Sedan” “Benz” N2

  • 2

W2 “Sedan” “Audi” N3

  • 3

W3 “Van” “Benz” N4

  • 4

W4 “Van” “BMW”

Intra-Block Index

PreBkHash MerkleRoot SkipListRoot L2 L4

PreSkippedHashL2 WL2 AttDigestL2 PreSkippedHashL4 WL4 AttDigestL4

blocki

PreBkHash

blocki

2

PreBkHash

blocki

4

Inter-Block Index

q1 q2 q3 q4 N1 N2 N3 N4 x y 1 2 3 1 2 3 N0 N1 N5 N6 N7 N8 N2 N3 N4

  • i

ti 0 2 “Van” “Benz” ti 001 102 “Van” “Benz” Query Range Boolean Condition q1 0 2 1 3 “Van” “Benz” q2 0 0 1 3 “Van” “BMW” q3 0 2 0 2 “Sedan” “Audi” q4 2 0 3 3 “Sedan” “Benz” Grid Cell 0 2 1 3 0 1 1 2 RCIF: Query Cover Type q1 full q2 full q3 partial Query Condition Set Queries “Van” q1 q2 “Benz” q1 “BMW” q2 BCIF:

Inverted Prefjx Tree 14/15

slide-36
SLIDE 36

Batch Verifjcation & Subscription Queries

  • Observation: objects may share common attributes that mismatch query condition
  • Idea: we can aggregate them to speed up query processing
  • Intra-Block Index: aggregate objects inside same block using MHT
  • Inter-Block Index: aggregate objects across blocks using skip list
  • Inverted Prefjx Tree: aggregate similar subscription queries from users

PreBkHash TS ConsProof MerkleRoot Nr N5 N1 N2 N6 N3 N4 hashr Wr AttDigestr hash1 W1 AttDigest1

  • 1

blocki

. . . . . . Node Object Set Attributes N1

  • 1

W1 = {“Sedan”, “Benz”} N2

  • 2

W2 = {“Sedan”, “Audi”} N3

  • 3

W3 = {“Van”, “Benz”} N4

  • 4

W4 = {“Van”, “BMW”}

Intra-Block Index

PreBkHash MerkleRoot SkipListRoot L2 L4

PreSkippedHashL2 WL2 AttDigestL2 PreSkippedHashL4 WL4 AttDigestL4

blocki

PreBkHash

blocki

2

PreBkHash

blocki

4

Inter-Block Index

q1 q2 q3 q4 N1 N2 N3 N4 x y 1 2 3 1 2 3 N0 N1 N5 N6 N7 N8 N2 N3 N4

  • i

ti 0 2 “Van” “Benz” ti 001 102 “Van” “Benz” Query Range Boolean Condition q1 0 2 1 3 “Van” “Benz” q2 0 0 1 3 “Van” “BMW” q3 0 2 0 2 “Sedan” “Audi” q4 2 0 3 3 “Sedan” “Benz” Grid Cell 0 2 1 3 0 1 1 2 RCIF: Query Cover Type q1 full q2 full q3 partial Query Condition Set Queries “Van” q1 q2 “Benz” q1 “BMW” q2 BCIF:

Inverted Prefjx Tree 14/15

slide-37
SLIDE 37

Batch Verifjcation & Subscription Queries

  • Observation: objects may share common attributes that mismatch query condition
  • Idea: we can aggregate them to speed up query processing
  • Intra-Block Index: aggregate objects inside same block using MHT
  • Inter-Block Index: aggregate objects across blocks using skip list
  • Inverted Prefjx Tree: aggregate similar subscription queries from users

PreBkHash TS ConsProof MerkleRoot Nr N5 N1 N2 N6 N3 N4 hashr Wr AttDigestr hash1 W1 AttDigest1

  • 1

blocki

. . . . . . Node Object Set Attributes N1

  • 1

W1 = {“Sedan”, “Benz”} N2

  • 2

W2 = {“Sedan”, “Audi”} N3

  • 3

W3 = {“Van”, “Benz”} N4

  • 4

W4 = {“Van”, “BMW”}

Intra-Block Index

PreBkHash MerkleRoot SkipListRoot L2 L4 . . .

PreSkippedHashL2 WL2 AttDigestL2 PreSkippedHashL4 WL4 AttDigestL4 . . .

blocki

. . . PreBkHash . . . . . . . . .

blocki−2

. . . PreBkHash . . . . . . . . .

blocki−4

. . . . . .

Inter-Block Index

q1 q2 q3 q4 N1 N2 N3 N4 x y 1 2 3 1 2 3 N0 N1 N5 N6 N7 N8 N2 N3 N4

  • i

ti 0 2 “Van” “Benz” ti 001 102 “Van” “Benz” Query Range Boolean Condition q1 0 2 1 3 “Van” “Benz” q2 0 0 1 3 “Van” “BMW” q3 0 2 0 2 “Sedan” “Audi” q4 2 0 3 3 “Sedan” “Benz” Grid Cell 0 2 1 3 0 1 1 2 RCIF: Query Cover Type q1 full q2 full q3 partial Query Condition Set Queries “Van” q1 q2 “Benz” q1 “BMW” q2 BCIF:

Inverted Prefjx Tree 14/15

slide-38
SLIDE 38

Batch Verifjcation & Subscription Queries

  • Observation: objects may share common attributes that mismatch query condition
  • Idea: we can aggregate them to speed up query processing
  • Intra-Block Index: aggregate objects inside same block using MHT
  • Inter-Block Index: aggregate objects across blocks using skip list
  • Inverted Prefjx Tree: aggregate similar subscription queries from users

PreBkHash TS ConsProof MerkleRoot Nr N5 N1 N2 N6 N3 N4 hashr Wr AttDigestr hash1 W1 AttDigest1

  • 1

blocki

. . . . . . Node Object Set Attributes N1

  • 1

W1 = {“Sedan”, “Benz”} N2

  • 2

W2 = {“Sedan”, “Audi”} N3

  • 3

W3 = {“Van”, “Benz”} N4

  • 4

W4 = {“Van”, “BMW”}

Intra-Block Index

PreBkHash MerkleRoot SkipListRoot L2 L4 . . .

PreSkippedHashL2 WL2 AttDigestL2 PreSkippedHashL4 WL4 AttDigestL4 . . .

blocki

. . . PreBkHash . . . . . . . . .

blocki−2

. . . PreBkHash . . . . . . . . .

blocki−4

. . . . . .

Inter-Block Index

q1 q2 q3 q4 N1 N2 N3 N4 x y 1 2 3 1 2 3 N0 N1 N5 N6 N7 N8 N2 N3 N4

  • i = ti, (0, 2), {“Van”, “Benz”}

= ti, {001, 102, “Van”, “Benz”} Query Range Boolean Condition q1 [(0, 2), (1, 3)] {“Van” ∧ “Benz”} q2 [(0, 0), (1, 3)] {“Van” ∧ “BMW”} q3 [(0, 2), (0, 2)] {“Sedan” ∧ “Audi”} q4 [(2, 0), (3, 3)] {“Sedan” ∧ “Benz”} Grid Cell : [(0, 2), (1, 3)] → {0∗1 ∧ 1∗2} RCIF: Query Cover Type q1 full q2 full q3 partial Query Condition Set Υ Queries {“Van”} q1, q2 {“Benz”} q1 {“BMW”} q2 BCIF:

Inverted Prefjx Tree 14/15

slide-39
SLIDE 39

Performance Evaluation

  • Evaluation metrics
  • Query processing cost in

terms of SP CPU time

  • Query verifjcation cost in

terms of user CPU time

  • Size of the VO transmitted

from the SP to the user

  • Numerical range selectivity
  • 10% for 4SQ
  • 50% for ETH
  • Disjunctive Boolean function

size

  • 3 for 4SQ
  • 9 for ETH

4SQ

100 200 300 400 2 (240) 4 (480) 6 (720) 8 (960) 10 (1200) SP CPU Time (s) Time Window (Hour)/(Blocks) nil-acc1 nil-acc2 intra-acc1 intra-acc2 both-acc1 both-acc2 0.01 0.1 1 10 100 2 (240) 4 (480) 6 (720) 8 (960) 10 (1200) User CPU Time (s) Time Window (Hour)/(Blocks) nil-acc1 nil-acc2 intra-acc1 intra-acc2 both-acc1 both-acc2 1 10 102 103 104 2 (240) 4 (480) 6 (720) 8 (960) 10 (1200) VO Size (KB) Time Window (Hour)/(Blocks) nil-acc1 nil-acc2 intra-acc1 intra-acc2 both-acc1 both-acc2

ETH

50 100 150 2 (480) 4 (960) 6 (1440) 8 (1920) 10 (2400) SP CPU Time (s) Time Window (Hour)/(Blocks) nil-acc1 nil-acc2 intra-acc1 intra-acc2 both-acc1 both-acc2 0.01 0.1 1 10 100 2 (480) 4 (960) 6 (1440) 8 (1920) 10 (2400) User CPU Time (s) Time Window (Hour)/(Blocks) nil-acc1 nil-acc2 intra-acc1 intra-acc2 both-acc1 both-acc2 1 10 102 103 104 2 (480) 4 (960) 6 (1440) 8 (1920) 10 (2400) VO Size (KB) Time Window (Hour)/(Blocks) nil-acc1 nil-acc2 intra-acc1 intra-acc2 both-acc1 both-acc2

Time-Window Query Performance 15/15

slide-40
SLIDE 40

Thanks Questions?

15/15

slide-41
SLIDE 41

References

[HCW+18]

  • S. Hu, C. Cai, Q. Wang, C. Wang, X. Luo, and K. Ren, “Searching an encrypted cloud meets blockchain: A

decentralized, reliable and fair realization,” in IEEE INFOCOM, Honolulu, HI, USA, 2018, pp. 792–800. [ICDE19]

  • C. Zhang, C. Xu, J. Xu, Y. Tang, and B. Choi, “GEM2-Tree: A gas-effjcient structure for authenticated range

queries in blockchain,” in IEEE ICDE, Macau SAR, China, 2019. [Mer89]

  • R. C. Merkle, “A certifjed digital signature,” in CRYPTO, 1989, pp. 218–238.

[PTT11]

  • C. Papamanthou, R. Tamassia, and N. Triandopoulos, “Optimal verifjcation of operations on dynamic sets,” in

CRYPTO, Santa Barbara, CA, USA, 2011, pp. 91–110. [SIGMOD19]

  • C. Xu, C. Zhang, and J. Xu, “vChain: Enabling verifjable boolean range queries over blockchain databases,” in

ACM SIGMOD, Amsterdam, Netherlands, 2019.