1 / 104

Oblivious Search Trees

Oblivious Search Trees. The Art of Remembering The-Right-Thing ™. Move To Front. a linked list of keys Search( x ) Scans the list for x Move x to the front Example: Search(“the onion”). slashdot. dilbert. the onion. …. citeseer. the onion. slashdot. dilbert. …. citeseer.

Télécharger la présentation

Oblivious Search Trees

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Oblivious Search Trees The Art of RememberingThe-Right-Thing™

  2. Move To Front • a linked list of keys • Search(x) • Scans the list for x • Move x to the front • Example: Search(“the onion”) slashdot dilbert the onion … citeseer the onion slashdot dilbert … citeseer

  3. The-Right-Thing? If this is how my browser stores my web-site cookies… slashdot dilbert the onion … citeseer /. Is not Research… Plus, that’s not crypto!!!

  4. Concept HistoryDependence

  5. Dictionary • Represents a set of keys • Supports a very typical interface • Create() • Insert(x) • Search(x) • Delete(x)

  6. Move To Front, Again • Link list maintained by the MTF rule is an implementation of Dictionary • But would the interface allow you to infer that I visit /. VERY often? slashdot dilbert the onion … citeseer

  7. Ideally If some information is not available through the “legitimate” interface, then it should not be available even with full access to the system.

  8. Oblivious Informal definition • A data structure is said to be oblivious if it does not give out any knowledge about the sequence of update operations that have been applied to it other than the final result of the operations.

  9. Sounds Cool... But then, how should we represent a Dictionary in an oblivious way?

  10. Sorted List Canonical form ) Obliviousness • But it’s not efficient!

  11. Search Trees Can be viewed as sorted list K C S A F P X

  12. 1 6 7 4 2 5 3 Splay Trees By design exploithistory…

  13. 2-3 Trees As Sorted Lists Mark Brown and Robert Tarjan • Design and Analysis of A Data Structure for Representing Sorted Lists@ SIAM JC 1980

  14. 3-node 2-node Example 2-3 Sorted List What are the keys in nodes? (Yes, “G” is missing. :P) H B, D J A C E, F I K, L leaf A B C D E F H I J K L M

  15. Structure • Internal nodes store “glue” keys;External leaves store “actual” keys • Each node • Has d 2{2, 3} children (degree) • Contains keys of the rightmost leaves from the first (d-1) sub-trees

  16. Example 2-3 Sorted List Insert(“G”) • Locate target H G B, D J G A C E, F I K, L A B C D E F H I J K L M G

  17. Example 2-3 Sorted List Insert(“G”) • Insert as leaf H B, D J A C E, F, G I K, L A B C D E F G H I J K L M

  18. F Example 2-3 Sorted List Insert(“G”) • Overflow H B, D J A C E, F, G I K, L A B C D E F G H I J K L M

  19. Example 2-3 Sorted List Insert(“G”) • Node splitting H B, D, F J A C E G I K, L A B C D E F G H I J K L M

  20. D Example 2-3 Sorted List Insert(“G”) • Overflow H B, D, F J A C E G I K, L A B C D E F G H I J K L M

  21. Example 2-3 Sorted List Insert(“G”) • Node splitting D, H B F J A C E G I K, L A B C D E F G H I J K L M

  22. Curious? Why do we want the leaves? D, H B F J A C E G I K, L A B C D E F G H I J K L M

  23. Finger Search Accessing a key ranked d away take O(log d) time D, H B F J A C E G I K, L A B C D E F G H I J K L M

  24. Initial Insert(“D”) Initial Insert(“B”) B C A C A D A B C E A C D E B C A C,D A,B D A B C D E A B C D E Oblivious?

  25. Truth • Any other known deterministic search trees are history dependent • AVL trees • 2-3 trees (actually, all a-b trees) • Red-Black trees • Splay trees • Why???

  26. Lower Bound Arne Andersson, Thomas Ottmann • New Tight Bounds On Uniquely Represented Dictionaries@ FOCS 1991 • Either Search or Update must require W(n1/3) time

  27. Concept GotRandom?

  28. Oblivious 2-3 Tree Daniele Micciancio(then MIT, now UCSD) • Oblivious Data Structures: Applications to Cryptography@ STOC 1997

  29. Issue At Hand How do 2-3 trees “leak”? • Degree of node gives out too much information

  30. Solution Randomize the degree! • Degrees should split uniformly between 2 and 3

  31. Definition Let M be a set of operations, and S be a set of algorithms implementing them. We say S is oblivious if: • for any two sequences of operations p1, p2, …, pn and q1, q2, …, qm that leads to the same set of values,the execution of these sequences have identical output probability distributions.

  32. Oblivious 2-3 Tree b doesn’t needto have order • Create(L) • Create a tree based on sorted list L • Insert(i, b, T) • Insert b as the i-th key into T • For this talk, i is an input to Insert • Delete(i, T) • Delete the i-th key in T

  33. Structure • Internal nodes store size of span;External leaves store keys • Degree of nodes is either 2 or 3 • Except on right spine, where it can be 1 5 2 1 2 A B C D E

  34. Slight Modification • To make the (later) proof easier, I added level-links on internal nodes. • Usage: can now find the next node on the same level in O(1) time. 5 To make figurescleaner, level linkswill be implicit. 2 1 2 A B C D E

  35. Disclaimer Paper contains no correctness proof. Plus, now that I made some changes. • All mistakes are mine

  36. Create L is sorted Create(L) • Start with L at bottom level • Build nodes in level j by traversing nodes in level (j+1) • Pick d from {2, 3} u.a.r. • Assign next davailable nodes at level (j+1) to new node at level j • Span is sum of the spans of the d sub-trees • Continue collapsing until root

  37. 12 7 5 2 2 3 2 2 1 A B C D E F H I J K L M Create Example L = {“A”, …, “F”, “H”, …, “M”}         

  38. Coin Flips Required Worst case when n = 2k+1 and all coins give 2 2k-1 + 1 + k = 2k + k = n – 1 + b log(n) c 1 2k-1 k

  39. 12  7 5   2 2 3 2 2 1       A B C D E F H I J K L M Checkpoint Make sure you can dry-run Create.

  40. Insert - Requirement What do we want from Insert(i, b, T)? • “Preserve randomness” • Insert(i, b, Create(L)) ~ Create(L’)where L’ = { L[1…i-1], b, L[i…n] }and n = |L| A ~ BA and B have the same distribution

  41. Insert - Easy Algorithm • Extract L from the tree • Modify L to get L’ • Run Create(L’) • Surely we have Insert(i, b, Create(L)) ~ Create(L’)

  42. Insert - High Level Idea First 3 steps • Locate the old i-th leaf • Mark the root to leaf path • Insert the new leaf to parent node • If not on right spine, “delete” all nodes to the right.Otherwise, “special treatment”.

  43. Insert Example Range on brownpath may need tobe changed later Insert(7, “G”, T) First, locate the 7-th leaf 12 7 5 2 2 3 2 2 1 A B C D E F H I J K L M G

  44. Insert Example “H” is now an excess… 12 7 5 2 2 3 2 2 1 A B C D E F G H I J K L M

  45. Insert Example Imagine all the nodes to the right are gone. In reality, don’t do anything!!! 12 7 5 2 2 3 2 2 1 A B C D E F G H I J K L M

  46. Insert - High Level Idea (continue) • Flip coins and group leaves as in Create(L’) • If the outcomes ever synchronize, update span on root path and stop.Otherwise, continue at the above level.

  47. Insert Example Notice the brownpath changed: can exploit level-links Coin gives either 2 or 3. Let’s say it’s 3. 12 7 5 2 2 3 3 2 2 1  A B C D E F G H I J K L M

  48. Insert Example The structures synchronize. Update span on root path and stop. 13 7 6 2 2 3 3 2 1 A B C D E F G H I J K L M

  49. Why can we stop? Really Important All possible futures are the same in Create(L) and Create(L’). 12 7 5 2 2 3 3 2 2 1  A B C D E F G H I J K L M

  50. Structural Agreement Lemma In a level, Create(L) and Create(L’) agree structurally, then all possible futures coincide. 12 7 5 2 2 3 3 2 2 1  A B C D E F G H I J K L M

More Related