Skip to content
Snippets Groups Projects
Verified Commit 106106d0 authored by Dmytro Bogatov's avatar Dmytro Bogatov :two_hearts:
Browse files

Add example section.

parent a62339e9
Branches
No related tags found
No related merge requests found
\DeclareDocumentCommand
{\oramNode}
{ O{$\varnothing$} O{$\varnothing$} O{$\varnothing$} }
{#1, #2, #3}
\newif\ifselected
\newif\ifpathread
\newif\ifnodeonenew
\newif\ifnodetwonew
\newif\ifnodethreenew
\newif\ifnodefournew
\begin{tabular}{ l | *{9}{c} } % chktex 44
Block ID & 1 & 2 & 3 & 4 & \textcolor{red}{$5$} & 6 & $\ldots$ & 37 \\
\midrule%
Leaf ID & 6 & 5 & 5 & 1 & \textcolor{red}{$3$} & 5 & $\ldots$ & 7 \\
\end{tabular}
\newcommand
{\blockFive}
{
\ifselected
\textcolor{red}{$5$}
\else
$5$
\fi
}
\newcommand
{\leafSix}
{
\ifselected
\textcolor{red}{$6$}
\else
$6$
\fi
}
\ifpathread
\newcommand{\selectedNode}{blue}
\else
\newcommand{\selectedNode}{black}
\fi
\begin{tikzpicture}[scale=0.8]
\Tree
[.\node[rounded corners, draw/.expand once=\selectedNode]{\oramNode};
[.\node[rounded corners, draw]{\oramNode[$4$]};
[.\node[rounded corners, draw]{\oramNode[$12$][$17$]};
[.\node[rounded corners, draw]{\oramNode[$22$][$23$]};
1
]
[.\node[rounded corners, draw]{\oramNode[$26$][$28$][$30$]};
2
]
]
[.\node[rounded corners, draw]{\oramNode[$24$][$29$][$33$]};
[.\node[rounded corners, draw]{\oramNode[$27$][$31$][$35$]};
3
]
[.\node[rounded corners, draw]{\oramNode[$34$][$32$][$21$]};
4
]
]
]
[.\node[rounded corners, draw/.expand once=\selectedNode]{\oramNode[$10$][$1$]};
[.\node[rounded corners, draw/.expand once=\selectedNode]{\oramNode[$2$][\blockFive][$8$]};
[.\node[rounded corners, draw]{\oramNode[$3$][$6$][$11$]};
5
]
[.\node[rounded corners, draw/.expand once=\selectedNode]{\oramNode[$7$][$13$][$15$]};
\node[]{\leafSix};
]
]
[.\node[rounded corners, draw]{\oramNode[$9$][$13$]};
[.\node[rounded corners, draw]{\oramNode[$20$][$14$][$16$]};
7
]
[.\node[rounded corners, draw]{\oramNode[$25$][$18$][$19$]};
8
]
]
]
]
\end{tikzpicture}
\newcommand
{\blockFive}
{
\ifselected
\textcolor{red}{$5$}
\else
$5$
\fi
}
\newcommand
{\leafSix}
{
\ifselected
\textcolor{red}{$6$}
\else
$6$
\fi
}
\begin{tabular}{ l | *{9}{c} } % chktex 44
Block ID & 1 & 2 & 3 & 4 & \blockFive & 6 & $\ldots$ & 37 \\
\midrule%
Leaf ID & 6 & 5 & 5 & 1 & \leafSix & 5 & $\ldots$ & 7 \\
\end{tabular}
\newcommand
{\blockFive}
{
\ifselected
\textcolor{red}{$5$}
\else
$5$
\fi
}
\newcommand
{\leafSix}
{
\ifselected
\textcolor{red}{$6$}
\else
$6$
\fi
}
\ifpathread
\newcommand{\selectedNode}{blue}
\else
\newcommand{\selectedNode}{black}
\fi
\newcommand
{\nodeLevelOne}
{
\ifnodeonenew
\oramNode[\textcolor{blue}{$8$}][\textcolor{blue}{$7$}][\textcolor{blue}{$1$}]
\else
\oramNode[$7$][$13$][$15$]
\fi
}
\newcommand
{\nodeLevelTwo}
{
\ifnodetwonew
\oramNode[\textcolor{blue}{$2$}][\textcolor{blue}{$10$}][\textcolor{blue}{$15$}]
\else
\oramNode[$2$][\blockFive][$8$]
\fi
}
\newcommand
{\nodeLevelThree}
{
\ifnodethreenew
\oramNode[\textcolor{blue}{$13$}]
\else
\oramNode[$10$][$1$]
\fi
}
\newcommand
{\nodeLevelFour}
{
\ifnodefournew
\oramNode[\textcolor{blue}{$5^\prime$}]
\else
\oramNode
\fi
}
\begin{tikzpicture}[scale=0.8]
\Tree
[.\node[rounded corners, draw/.expand once=\selectedNode]{\nodeLevelFour};
[.\node[rounded corners, draw]{\oramNode[$4$]};
[.\node[rounded corners, draw]{\oramNode[$12$][$17$][$36$]};
[.\node[rounded corners, draw]{\oramNode[$22$][$23$]};
1
]
[.\node[rounded corners, draw]{\oramNode[$26$][$28$][$30$]};
2
]
]
[.\node[rounded corners, draw]{\oramNode[$24$][$29$][$33$]};
[.\node[rounded corners, draw]{\oramNode[$27$][$31$][$35$]};
3
]
[.\node[rounded corners, draw]{\oramNode[$34$][$32$][$21$]};
4
]
]
]
[.\node[rounded corners, draw/.expand once=\selectedNode]{\nodeLevelThree};
[.\node[rounded corners, draw/.expand once=\selectedNode]{\nodeLevelTwo};
[.\node[rounded corners, draw]{\oramNode[$3$][$6$][$11$]};
5
]
[.\node[rounded corners, draw/.expand once=\selectedNode]{\nodeLevelOne};
\node[]{\leafSix};
]
]
[.\node[rounded corners, draw]{\oramNode[$9$][$13$][$37$]};
[.\node[rounded corners, draw]{\oramNode[$20$][$14$][$16$]};
7
]
[.\node[rounded corners, draw]{\oramNode[$25$][$18$][$19$]};
8
]
]
]
]
\end{tikzpicture}
......@@ -41,6 +41,7 @@
\input{sections/overview-of-other-orams}
\input{sections/problem-definition}
\input{sections/path-oram-protocol}
\input{sections/example}
\input{sections/recursion-and-parametrization}
\input{sections/bounds-on-stash-usage}
\input{sections/evaluation}
......
......@@ -13,6 +13,9 @@
\usepackage{hyperref}
\usepackage{hyperxmp}
\usepackage{multirow}
\usepackage{tikz-qtree}
\usepackage{xparse}
\usepackage{caption}
\usepackage[
backend=biber,
......
\input{example/definitions}
\section{Example}
\begin{frame}{Initial state}
\begin{figure}
\centering
\input{example/tree}
\caption{Initial underlying tree}
\end{figure}
\vspace{-12pt}
\begin{figure}
\centering
\input{example/initial-map}
\caption{Initial position map}
\end{figure}
\end{frame}
\begin{frame}{\textsc{Access}$(5)$}
\selectedtrue
\begin{figure}
\centering
\input{example/tree}
\caption{Select block with ID 5}
\end{figure}
\vspace{-12pt}
\begin{figure}
\centering
\input{example/initial-map}
\caption{Find leaf for block with ID 5}
\end{figure}
\end{frame}
\begin{frame}{Read path}
\selectedtrue
\pathreadtrue
\begin{figure}
\centering
\input{example/tree}
\caption{Select path $\mathcal{P}(6)$}
\end{figure}
\vspace{-12pt}
\begin{figure}
\centering
\input{example/initial-map}
\caption{Find leaf for block with ID 5}
\end{figure}
\end{frame}
\begin{frame}{Remap block}
\begin{block}{Stash}
\begin{gather*}
S = \{ 10, 1, 2, \textcolor{red}{5}, 8, 7, 13, 15 \} \\
data = \textsc{DecryptBlock}(\textcolor{red}{5}) \\
\textcolor{blue}{5^\prime} \gets \textsc{EncryptData}(data^{\mbox{*}}) \\
S = \{ 10, 1, 2, \textcolor{blue}{5^\prime}, 8, 7, 13, 15 \}
\end{gather*}
\end{block}
\begin{block}{Remap}
Assign random leaf
\[
\text{position}[5] := 3
\]
\end{block}
\end{frame}
\begin{frame}{Write path back}
\selectedtrue
\pathreadtrue
\nodeonenewtrue
\begin{figure}
\centering
\input{example/tree}
\caption{Write bucket on level $L = 3$}
\end{figure}
\vspace{-12pt}
\begin{block}{Stash}
\begin{gather*}
S^\prime = \{ 8, 7, 1 \} \\
S = \{ 10, 2, \textcolor{blue}{5}, 13, 15 \}
\end{gather*}
\end{block}
\end{frame}
\begin{frame}{Write path back}
\selectedtrue
\pathreadtrue
\nodeonenewtrue
\nodetwonewtrue
\begin{figure}
\centering
\input{example/tree}
\caption{Write bucket on level $L - 1 = 2$}
\end{figure}
\vspace{-12pt}
\begin{block}{Stash}
\begin{gather*}
S^\prime = \{ 2, 10, 15 \} \\
S = \{ \textcolor{blue}{5}, 13 \}
\end{gather*}
\end{block}
\end{frame}
\begin{frame}{Write path back}
\selectedtrue
\pathreadtrue
\nodeonenewtrue
\nodetwonewtrue
\nodethreenewtrue
\begin{figure}
\centering
\input{example/tree}
\caption{Write bucket on level $L - 2 = 1$}
\end{figure}
\vspace{-12pt}
\begin{block}{Stash}
\begin{gather*}
S^\prime = \{ 13 \} \\
S = \{ \textcolor{blue}{5} \}
\end{gather*}
\end{block}
\end{frame}
\begin{frame}{Write path back}
\selectedtrue
\pathreadtrue
\nodeonenewtrue
\nodetwonewtrue
\nodethreenewtrue
\nodefournewtrue
\begin{figure}
\centering
\input{example/tree}
\caption{Write bucket on level $0$}
\end{figure}
\vspace{-12pt}
\begin{block}{Stash}
\begin{gather*}
S^\prime = \{ \textcolor{blue}{5} \} \\
S = \varnothing
\end{gather*}
\end{block}
\end{frame}
\begin{frame}{Final state}
\selectedtrue
\pathreadtrue
\nodeonenewtrue
\nodetwonewtrue
\nodethreenewtrue
\nodefournewtrue
\begin{figure}
\centering
\input{example/tree}
\caption{Tree after the execution}
\end{figure}
\vspace{-12pt}
\begin{figure}
\centering
\input{example/final-map}
\caption{Position map after the execution}
\end{figure}
\end{frame}
......@@ -68,3 +68,5 @@
pdfmenubar=false,
pdfpagelayout=SinglePage
}
\captionsetup[figure]{labelformat=empty}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment