Download presentation
Presentation is loading. Please wait.
1
2D Coordinates π₯ π , π¦ π , π₯ π , π¦ π represent coordinates of two locations Each coordinate is an π-bit unsigned number π₯ π = π₯ ππ β¦ π₯ π2 π₯ π1 π¦ π = π¦ ππ β¦ π¦ π2 π¦ π1 π₯ π = π₯ ππ β¦ π₯ π2 π₯ π1 π¦ π = π¦ ππ β¦ π¦ π2 π¦ π1 πππβππ‘π‘ππ π·ππ π‘ππππ = π₯ π β π₯ π + π¦ π β π¦ π
2
Calculating Absolute Difference
π₯ ππ π₯ ππ π₯ π2 π₯π2 π₯ π1 π₯π1 SUB block is composed of π 1-bit subtractors [Kolesnikov β09] Each 1-bit subtractor is composed of 4 XOR gates, 1 AND gate Note: π₯ π+1 equals complement of carryout bit from π π‘β 1-bit subtractor INV block is composed of π XOR gates π₯ π β¦ π₯ 2 π₯ 1 = π₯ π β π₯ π β π₯ π+1 πππ΅ π₯ π+1 π₯ π π₯ 2 π₯ 1 πΌππ π₯ π π₯ 2 π₯ 1
3
Calculating Absolute Difference
π₯ ππ π₯ ππ π₯ π2 π₯π2 π₯ π1 π₯π1 π¦ ππ π¦ ππ π¦ π2 π¦π2 π¦ π1 π¦π1 πππ΅ πππ΅ π₯ π+1 π₯ π π₯ 2 π₯ 1 π¦ π+1 π¦ π π¦ 2 π¦ 1 πΌππ πΌππ π₯ π π₯ 2 π₯ 1 π¦ π π¦ 2 π¦ 1 π₯ π β¦ π₯ 2 π₯ 1 = π₯ π β π₯ π β π₯ π+1 π¦ π β¦ π¦ 2 π¦ 1 = π¦ π β π¦ π β π¦ π+1
4
Calculating Manhattan Distance
π₯ π π¦π π₯ 2 π¦2 π₯ 1 π¦1 ADD block is composed of π 1-bit adders [Kolesnikov β09] Each 1-bit adder is composed of 4 XOR gates, 1 AND gate INC block is composed of π half adder (HA) blocks, and 1 XOR gate Each HA is composed of 1 XOR gate, 1 AND gate π΄π·π· π₯ π+1 π π+1 π π π 2 π 1 πΌππΆ π»π΄ π»π΄ π»π΄ π¦ π+1 π π+1 π π π 2 π 1 πππβππ‘π‘ππ π·ππ π‘ππππ= π π+1 π π β¦ π 2 π 1
5
Manhattan Distance Calculation
Circuit Size Manhattan Distance Manhattan Distance Calculation Block #XOR gates #AND gates πππ΅ 4π π πΌππ π΄π·π· πΌππΆ π+1 Total 15π+1 Example: Coordinates are π=16-bit numbers. Manhattan distance calculation circuit has 241 XOR, 64 AND gates.
6
Minimum Value and Minimum Index [Kolesnikov β09]
π’ π£ π π’ ππ£ Need to find minimum of two numbers π’,π£ π π’ , π π£ denote indices for π’,π£ CMP block is composed of π 1-bit comparators, where π= π’ = π£ Each 1-bit comparator is composed of 3 XOR gates, 1 AND gate MUX block is composed of 2π XOR gates, π AND gates, where π denotes the length of operands π=π for MUX on left π=| π π’ |= π π£ for MUX on right πΆππ πππ πππ ππΌπ πππ π’,π£ π πππ π’,π£
7
Minimum Value and Minimum Index [Kolesnikov β09]
π· 1 π· 2 π π· 1 π π· 2 π· 3 π· 4 π π· 3 π π· 4 ππΌπ ππΌπ πππ π· 1 , π· 2 π πππ π· 1 , π· 2 πππ π· 3 , π· 4 π πππ π· 3 , π· 4 ππΌπ πππ π· 1 , π· 2 , π· 3 , π· 4 π πππ π· 1 , π· 2 , π· 3 , π· 4 Tree of MIN blocks can find both minimum value, minimum index
8
1 Minimum Value/Index Block
Circuit Size 1 Min Value/Index Block Mobile client needs to determine closest location among πΏ different locations πΏ Locations may be indexed using πΏ πππ bits. For example, πΏ πππ = πππ 2 πΏ bits (assume that πΏ is a power of 2). πππβππ‘π‘ππ π·ππ π‘ππππ = π+1 bits 1 Minimum Value/Index Block Block #XOR gates #AND gates πΆππ 3(π+1) (π+1) ππ π πππ 2(π+1) ππ π πππππ₯ 2 πΏ πππ πΏ πππ Total 5 π+1 +2 πΏ πππ 2 π+1 + πΏ πππ
9
Tree of Minimum Value/Index Blocks Manhattan Distance to L locations
Circuit Size Tree of Min Blocks and Manhattan Distance to L locations There are (πΏβ1) Min blocks in the tree. Tree of Minimum Value/Index Blocks #XOR gates #AND gates 5 π+1 +2 πΏ πππ Γ πΏβ1 2 π+1 + πΏ πππ Γ πΏβ1 Manhattan Distance to L locations #XOR gates #AND gates 15π+1 ΓπΏ 4πΓπΏ
10
Closest Location and its Manhattan Distance
Complete Circuit Size Closest Location and its Manhattan Distance Closest Location and its Manhattan Distance #XOR gates #AND gates 5 π+1 +2 πΏ πππ Γ πΏβ1 + 15π+1 ΓπΏ 2 π+1 + πΏ πππ Γ πΏβ1 + 4πΓπΏ Example: Length of each coordinate, π=16-bits Number of locations, πΏ=8 Index length, πΏ πππ = log 2 πΏ=3 -bits Complete circuit has 2565 XOR gates, 771 AND gates.
11
Privacy Preserving Application: Closest Bank/ATM Location
Example: Compute the location of closest Chase or Wells Fargo ATM in Salt Lake City in a privacy preserving manner Mobile clientβs private input: Coordinates representing intersection of two streets (e.g., 800 East 100 South) Question: What remains secret in our privacy preserving application? Mobile client's location The computed ATM location closest to the client The computed distance to the closest ATM The secret is revealed only if evaluator colludes with all servers
12
ATM Locations Consider the area of Salt Lake City, UT that lies between: Main street (represents 0 East street) 1300 East street South Temple street (represents 0 South street) 800 South Street ATM Locations Bank Location Chase 201 South 0 East 185 South 100 East 376 East 400 South 531 East 400 South Wells Fargo 299 South 0 East 381 East 300 South 79 South 0 East 778 South 0 East 570 South 700 East 235 South 1300 East Area contains 13 * 8 = 104 blocks Area contains 4 Chase bank ATM, 6 Wells Fargo bank ATM locations. Thus πΏ=4+6=10 π=maxβ‘( log , log )=11 bits sufficient to represent any East or South coordinate Any ATM location may be identified using πΏ πππ =2π=22 bits A Tree of (πΏβ1)=9 Min blocks can find the ATM location closest to mobile client Source:
13
Closest Bank ATM Location, Distance
Circuit Size for Closest ATM & Distance Closest Bank ATM Location, Distance #XOR gates #AND gates 5 π+1 +4π Γ πΏβ1 + 15π+1 ΓπΏ =2596 2 π+1 +2π Γ πΏβ1 + 4πΓπΏ =854
14
Server-Side Cost to Construct Garbled Circuit for Closest ATM
To compute the closest ATM and distance, servers exchange 126 GB of information, when π=4, for example, while constructing the garbled circuit Demonstrates feasibility of real-world privacy preserving computations!
15
Client-Side Cost to determine
the Closest ATM client-side cost grows much slowly with number of parties, in comparison to server-side cost! Client sends seed values, and the coordinates of an intersection to the cloud servers Public ATM locations are assumed to be hard-coded in the garbled circuit. i.e., client does not transmit ATM locations to the servers To preserve location privacy, client exchanges very small amount of information with servers; less than 60 kilo bits, with π=4 servers, for example
16
Alternative/Direct Method to Calculate Manhattan Distance
Backup Slides Alternative/Direct Method to Calculate Manhattan Distance
17
Minimum and Maximum Value Block
Maximum and Minimum Value [Huangβ12] π’ π£ Need to find both maximum and minimum of two numbers π’,π£ Let π= π’ = π£ CMP block is composed of π 1-bit comparators Each 1-bit comparator is composed of 3 XOR gates, 1 AND gate ππ΄π_ππΌπ πΆππ πΆπππ·_πππ΄π πππ₯ π’,π£ πππ π’,π£ COND_SWAP block is composed of 3π XOR gates, π AND gates Minimum and Maximum Value Block Block #XOR gates #AND gates πΆππ 3π π πΆπππ·_πππ΄π Total 6π 2π
18
Manhattan Distance using ππ΄π_ππΌπ block
π₯ π π₯ π π¦ π π¦ π Manhattan Distance Block #XOR gates #AND gates ππ΄π_ππΌπ 6π 2π πππ΅ 4π π π΄π·π· Total 24π 7π ππ΄π_ππΌπ ππ΄π_ππΌπ π₯ π π₯ π π¦ π π¦ π πππ΅ πππ΅ π₯ π β π₯ π π¦ π β π¦ π π΄π·π· π₯ π β π₯ π + π¦ π β π¦ π Note: π₯ π β₯ π₯ π ; π¦ π β₯ π¦ π Calculation of Manhattan distance using ππ΄π_ππΌπ block requires 24π πππ
, 7π π΄ππ· πππ‘ππ Note: calculation shown in slide# 5 that uses 2 INV blocks & 1 INC block is more optimal, since it only requires (15π+1) πππ
, 4π π΄ππ· πππ‘ππ
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.