\documentclass[landscape]{slides}
\usepackage{multicol}
\usepackage[all,poly,ps,dvips,color]{xy}
\input{preamble}
  
\input{SLIDES}
  
%\usepackage[dvips]{graphics}
%\usepackage[all,poly,ps,dvips,color]{xy}
%\UseCrayolaColors

%\DeclareMathOperator{\mathin}{in}
%\DeclareMathOperator{\mathout}{out}

\newcommand{\vindex}[2]{\left[ #1 \right] _ #2}
\newcommand{\eigen}{\mathbf a}
\newcommand{\elem}{\mathbf e}
\newcommand{\state}{\mathbf x}
\newcommand{\maxdeg}{\Delta}
\newcommand{\maxdegC}{d_{max}}

\newcommand{\din}{d_{\mathin}}
\newcommand{\dout}{d_{\mathout}}
\newcommand{\dmax}{d_{\max}}


\newcommand{\nlabel}[2]{\ar@{} @(#1,#1) |<<{#2}}
\newcommand{\gnlabel}[2]{[#1(.25)] {#2}}
\newcommand{\node}{{\bullet}}
\newcommand{\bypass}{{\circ}}

\begin{document}

\begin{titlepage}
\title{CS 591, Lecture 19}

\author {Jared Saia \\
{\red University of New Mexico}}

\date{}
\maketitle

\end{titlepage}




\begin{SLIDE}[Class Outline]

Message send under Byzanting fault model
\begin{itemize}
\item Reducing blow up in number of messages sent from $O (\log^{2}n)$
to $O (\log n)$ (Review)
\item Reducing blow up in number of messages sent from $O (\log n)$
to $O (1)$
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[The Problem]
\begin{itemize}
\item Some fraction less than half of the peers suffer Byzantine faults
\item These peers will try to disrupt communication
\item Q: Can we still ensure that communication will proceed as expected?
\item Note: it helps us that we can say that with high probability,
each informer cloud has a majority of good peers in it
\end{itemize}
\end{SLIDE}


\begin{SLIDE}[Review]
Recall from last time:
\begin{itemize}
\item Each peer has a unique digital signature and id that is
verifiable by everyone but forgeable by no one
\item The digital signature is used to ``sign'' an entire message, so
that each message can be verified to be generated by a unique entity
at a given time.
\item There is a function $I$ which maps every id to $k\log n$ random
peers currently in the network
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Review]
Peer Join:
\begin{itemize}
\item Let $G$ be some given network
\item We can assign random id's to each 

For any node $x$ in $G$, let $I (x)$ be the set of informers
that $x$'s will maps to
\item For any underlying network $G$, there is a protocol to create 
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Review]
\begin{itemize}
\item Each peer $x$ has a set $I (x)$ of informers chosen randomly
from all the peers.  $|I (x)| = k*\log (n)$
\item The join algorithm creates a network which mirrors $G_{p}$ (the
network without informers)
\item For each edge $(x,y)$ in $G_{p}$, all peers in $I (x)$ and in $I
(y)$ are connected in a full bipartite graph
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Review]
\begin{itemize}
\item Let $\alpha>0$ be chosen such that we know the fraction of good
peers in the network is always $1/2+\alpha$
\item Last time, we showed that the probability that there is some $x$
such that $I (x)$ does not have a majority of good peers is ``small''.
\item In particular, for any $\alpha >0$ and $k'>0$, we can choose $k$
dependent only on $\alpha$ and $k'$ such that each set has greater
than a $1/2$ fraction of good peers is at least $1-n^{-k}$
\item Note: we can do even better.  We can say that for any value
$\alpha'<\alpha$ and $k'>0$, we can choose $k$ dependent only on
$\alpha '$ and $k'$ such that the probability that every set has
greater than a $1/2+\alpha '$ fraction of good peers is at least
$1-n^{-k'}$
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Majority preserving graph]
\begin{itemize}
\item Let $G= (L,R)$ be bipartite graph with $|L|=|R|$.
\item $G$ is a \emph{($\alpha ,\beta$)-MPG} if it satisfies the
following properties:
\end{itemize}

\begin{itemize}
\item $G$ is regular with degree $d (\alpha ,\beta)$ where $d (\alpha
,\beta)$ is a value depending only on $\alpha$ and $\beta$
\item For every $S\subset L$ such that $|S|\geq (1/2+\alpha)|L|$, at
least $(1-\beta)|R|$ nodes in $R$ have a majority of their neighbors
in $S$
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[MPG Intution]
\begin{itemize}
\item Having the informer clouds connected by such graphs would be
great. Why?
\item 1) Constant number of links between nodes
\item 2) Majority Preserving property ensures secure communication.  Why?
\item What do we want?  We want $\alpha$ and $\beta$ as small as possible
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Creating MPG's]
\begin{itemize}
\item Turns out that a random, regular bipartite graph will be a
``good'' MPG
\item Let $\alpha ,\beta$ be any fixed constants greater than $0$ with
$\alpha >\beta$ and let $l$ be sufficiently large
\item Then there exists a value $d (\alpha ,\beta)$ such that a random
$d (\alpha ,\beta)$-regular bipartite multigraph over $2l$ vertices is
a $(\alpha ,\beta)$-MPG with high probability
\item Specifically, the probability of failure is exponentially small
in $l$
\item (The proof of this is omitted)
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[How does an MPG help?]
\begin{itemize}
\item Assume that the fraction of good peers is $1/2+\alpha '$ where $\alpha' >0$
\item Let the informer clouds be connected using  an $(\alpha ,
\beta)$-MPG where $\alpha$ and $\beta$ are chosen such that $\alpha
'-\beta \geq  \alpha $
\item Let messages be sent in the informer clouds along all the links
of the MPG
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[How does an MPG Help?]
\begin{itemize}
\item Fact: $O (\log n)$ messages are sent in each hop

\item Fact: If $1/2+\alpha$ good peers have the right message in the
sending informer cloud, then at least $1/2+\alpha$ good peers in the
receiving informer cloud will get the right message.

\item Why? Because in worst case, $\beta$ of the good peers in the
receiving informer cloud get the wrong message.  Hence at least
$1/2+\alpha '-\beta$ good peers got the message and $\alpha '-\beta \geq \alpha$.

\item ( Note: We could have the same exact MPG between all informer
clouds, and even if the adversary knows the single MPG topology, it
can do nothing)

\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Can we do better?]
\begin{itemize}
\item So we've gotten done to $O (\log n)$ messages sent for every hop
from informer cloud to informer cloud
\item Can we do any better than that?
\item Key ideas: split the message into pieces, error-correcting
codes and finger-printing
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Encoding the message]
\begin{itemize}
\item Assume we are sending some message $x$ with $|x|$ bits in it and
that there are $m = k*\log n$ peers in every informer cloud
\item Let $e_{1}, e_{2}, \dots ,e_{m}$ be encoded pieces of $x$ which
have the following properties
\item 1) Each $e_{i}$ is of size $O (|x|/m)$
\item 2) $x$ can be reconstructed from \emph{any} subset of $e_{1},
e_{2}, \dots ,e_{m}$ of size at least $m/2$
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Fingerprinting]
\begin{itemize}
\item Let $f_{1},\dots ,f_{m}$ be fingerprints of $e_{1},\dots ,e_{m}$ respectively
\item We assume that the fingerprint $f_{i}$ can be used to determine
if some untrusted message is in fact $e_{i}$
\item Note that if the fingerprint $f_{i}$ is long enough, we can make
it arbitrarily difficult for an adversary to generate a different message which
has the fingerprint $f_{i}$
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[The Setup]
\begin{itemize}
\item Let $\pi$ be a mapping from the integers $\{1,\dots ,m \}$ to
random subsets of size $c$ of the pieces $\{e_{1},\dots ,e_{m} \}$
\item The $i$-th peer in an informer cloud will be ``responsible'' for
the pieces $\pi (i)$
\item At the end of a stage of the algorithm, we will ensure that a
constant fraction of the good peers know all of the pieces they're
``responsible'' for
\end{itemize}
\end{SLIDE}


\begin{SLIDE}[The Setup]
A peer set $A$ is said to be $\alpha$-\emph{aware} of the message $x$
if the following properties hold:

\begin{itemize}
\item All good peers in $A$ know $f_{1}, f_{2}, \dotsc ,f_{m}$
\item There is some set $S$ of $\alpha m$ good peers in $A$ such that
for all peers $a_{i} \in S$, $a_{i}$ knows the encoded pieces $\pi
(i)$.
\end{itemize}

Note that an $\alpha$-aware peer set can reconstruct the message for
$\alpha$ and $c$ sufficiently large.

\end{SLIDE}


\begin{SLIDE}[The Algorithm (I)]
\begin{itemize}
\item Each peer in $A$ sends all known fingerprints to peers in $B$
according to a certain MPG.

\item The peers in $A$ choose a peer, $r$, uniformly at random from
all peers in $B$ using the distributed algorithm for choosing a random
number (discussed two lectures ago)

\item Each peer $a_{i}$ in $A$ sends the pieces $\pi (i)$ to $r$ (if
possible)
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Algorithm (II)]
\begin{itemize}
\item r reconstructs the encoded pieces as follows:

\begin{enumerate}
\item r removes all the pieces it receives that don't match one of the 
fingerprints that r has
\item r reconstructs a message $x'$ from the remaining pieces
\item r computes encoded pieces, $e'_{1}, \dotsc ,e'_{m}$, for $x'$
\end{enumerate}

\item r sends each peer $b_{i}$ the encoded pieces specified by $\pi
(i)$
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Algorithm (III)]
\begin{itemize}
\item Each peer $b_{i}$ in $B$ sends the message ``Pieces Ok'' to all
peers in $A$ if it received all the pieces in $\pi (i)$ and all of
these pieces have correct fingerprints.

\item If a good peer in $A$ receives the message ``Pieces Ok'' from
less than $(1/2+\gamma ')m$ peers in $B$, it loops back to
the second step of the algorithm.

\item Else the peer sends the message ``Success'' to all peers in $B$.

\end{itemize}
\end{SLIDE}

\begin{SLIDE}[Analysis]
\begin{itemize}
\item Claim: If the informer cloud $A$ is $\alpha$-aware of the message $x$,
then at the end of the procedure, informer cloud $B$ will be
$\alpha$-aware of $x$
\item Why?
\item Q1: What is the total number of bits sent?
\item Q2: What is the total number of messages sent?
\end{itemize}
\end{SLIDE}


\end{document}
