slides/slides11.tex
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Thu, 26 Nov 2015 09:10:47 +0000
changeset 435 4603e6bb80c8
parent 381 036a762b02cf
child 436 8bf6704fc991
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
352
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     1
\documentclass[dvipsnames,14pt,t]{beamer}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     2
\usepackage{../slides}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     3
\usepackage{../langs}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     4
\usepackage{../graphics}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     5
\usepackage{../data}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
\usepackage{../grammar}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     7
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     8
% beamer stuff 
381
036a762b02cf updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 352
diff changeset
     9
\renewcommand{\slidecaption}{SEN 11, King's College London}
352
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
\newcommand{\bl}[1]{\textcolor{blue}{#1}}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    12
\begin{document}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    13
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    14
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    15
\begin{frame}[t]
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    16
\frametitle{%
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    17
  \begin{tabular}{@ {}c@ {}}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    18
  \\
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    19
  \LARGE Access Control and \\[-3mm] 
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    20
  \LARGE Privacy Policies (11)\\[-6mm] 
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    21
  \end{tabular}}\bigskip\bigskip\bigskip
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    22
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    23
  \normalsize
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    24
  \begin{center}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    25
  \begin{tabular}{ll}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    26
  Email:  & christian.urban at kcl.ac.uk\\
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    27
  Office: & S1.27 (1st floor Strand Building)\\
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    28
  Slides: & KEATS (also homework is there)\\
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    29
  \end{tabular}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    30
  \end{center}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    31
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    32
\end{frame}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    33
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    34
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    35
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    36
\begin{frame}[c]
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    37
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    38
\begin{itemize}
435
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    39
\item Imagine you have an completely innocent email message,
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    40
      like birthday wishes to your grandmother? Why should you
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    41
      still encrypt this message and your grandmother take the
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    42
      effort to decrypt it?\bigskip 
352
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    43
435
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    44
      \small  
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    45
      (Hint: The answer has nothing to do with preserving the
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    46
      privacy of your grandmother and nothing to do with
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    47
      keeping her birthday wishes super-secret. Also nothing to
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    48
      do with you and grandmother testing the latest
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    49
      encryption technology, nor just for the sake of it.)
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    50
\end{itemize}
352
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    51
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    52
\end{frame}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    53
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    54
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    55
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    56
\begin{frame}[c]
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    57
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    58
\begin{center}
435
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    59
\includegraphics[scale=0.6]{../pics/escher.jpg}
352
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    60
\end{center}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    61
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    62
\end{frame}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    63
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    64
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    65
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    66
\begin{frame}[c]
435
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    67
\frametitle{Interlock Protocol}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    68
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    69
Protocol between a car \bl{$C$} and a key transponder \bl{$T$}:\bigskip 
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    70
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    71
\begin{enumerate}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    72
\item \bl{$C$} generates a random number \bl{$N$}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    73
\item \bl{$C$} calculates \bl{$(F,G) = \{N\}_K$}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    74
\item \bl{$C \to T$}: \bl{$N, F$}\bigskip
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    75
\item \bl{$T$} calculates \bl{$(F',G') = \{N\}_K$}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    76
\item \bl{$T$} checks that \bl{$F = F'$}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    77
\item \bl{$T \to C$}: \bl{$N, G'$}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    78
\item \bl{$C$} checks that \bl{$G = G'$}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    79
\end{enumerate}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    80
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    81
\end{frame}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    82
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    83
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    84
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    85
\begin{frame}[c]
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    86
\frametitle{Zero-Knowledge Proofs}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    87
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    88
Essentially every NP-problem can be used for ZKPs\bigskip
352
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    89
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    90
\begin{itemize}
435
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    91
\item modular logarithms: Alice chooses public \bl{$A$},  \bl{$B$}, \bl{$p$}; and private \bl{$x$}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    92
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    93
\begin{center}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    94
\large\bl{$A^x \equiv B\; mod\; p$}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    95
\end{center} 
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    96
\end{itemize}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    97
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    98
\end{frame}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    99
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   100
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   101
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   102
\begin{frame}[c]
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   103
\frametitle{Modular Arithmetic}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   104
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   105
It is easy to calculate
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   106
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   107
\begin{center}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   108
\large\bl{$\alt<1>{?}{10} \equiv 46\; mod\; 12$}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   109
\end{center}\bigskip\pause 
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   110
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   111
A: \bl{$10$}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   112
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   113
\end{frame}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   114
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   115
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   116
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   117
\begin{frame}[c]
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   118
\frametitle{Modular Logarithm}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   119
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   120
Ordinary, non-modular logarithms: 
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   121
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   122
\begin{center}\large
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   123
\begin{tabular}{ll}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   124
& \bl{$10^? = 17$}\bigskip\\\pause
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   125
$\Rightarrow$ & \bl{$log_{10} 17 = 1.2304489\ldots$}\\\pause
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   126
$\Rightarrow$ & \bl{$10^{1.2304489} = 16.999999$}\\\pause
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   127
\end{tabular}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   128
\end{center}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   129
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   130
Conclusion: \bl{$1.2304489$} is very close to the \emph{true}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   131
solution
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   132
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   133
\end{frame}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   134
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   135
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   136
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   137
\begin{frame}[c]
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   138
\frametitle{Modular Logarithm}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   139
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   140
In contrast, modular logarithms behave much differently:
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   141
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   142
\begin{center}\large
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   143
\bl{$2^? \equiv 88319671\;\; mod\;\; 97330327$}\bigskip\\\pause
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   144
\end{center}\pause
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   145
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   146
Lets say I found \bl{$28305819$}\ldots I try
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   147
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   148
\begin{center}\large
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   149
\bl{$2^{28305819} \equiv 88032151\;\; mod\;\; 97330327$}\bigskip\\\pause
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   150
\end{center}\pause
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   151
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   152
I could be tempted to try \bl{$28305820$}\ldots\pause
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   153
but the real\\
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   154
\mbox{}\hfill answer is \bl{12314}.
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   155
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   156
\end{frame}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   157
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   158
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   159
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   160
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   161
\begin{frame}[c]
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   162
\frametitle{Commitment Stage}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   163
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   164
\begin{enumerate}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   165
\item Alice generates \bl{$z$} random numbers \bl{$r_1$}, ..., \bl{$r_z$}, all less than \bl{$p - 1$}.
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   166
\item Alice sends Bob for all \bl{$1..z$} 
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   167
\begin{center}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   168
\bl{$h_i = A^{r_i} \;mod\; p$}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   169
\end{center}\bigskip
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   170
\item Bob generates random bits   \bl{$b_1$}, ..., \bl{$b_z$} by flipping a coin
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   171
\item For each bit \bl{$b_i$}, Alice sends Bob an \bl{$s_i$} where
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   172
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   173
\begin{center}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   174
\begin{tabular}{ll}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   175
\bl{$b_i = 0$}: & \bl{$s_i = r_i$}\\
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   176
\bl{$b_i = 1$}: & \bl{$s_i = (r_i - r_j) \;mod\; (p -1)$}\\
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   177
\end{tabular}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   178
\end{center}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   179
where \bl{$r_j$} is the lowest \bl{$j$} with \bl{$b_j = 1$}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   180
\end{enumerate}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   181
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   182
\only<2>{
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   183
\begin{textblock}{7}(7.9,3.9)
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   184
\begin{bubble}[5cm]\small
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   185
\begin{center}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   186
  \begin{tabular}{lcccc}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   187
  Alice \bl{$r_i$}:\; & \bl{4} & \bl{9} & \bl{1} & \bl{3}\\ 
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   188
  Bob \bl{$b_i$}:\; & \bl{0} & \bl{1} & \bl{0} & \bl{1}\\
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   189
  & & \bl{$\uparrow$} \\
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   190
  & & \bl{$j$}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   191
  \end{tabular}             
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   192
  \end{center}    
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   193
\end{bubble}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   194
\end{textblock}}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   195
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   196
\end{frame}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   197
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   198
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   199
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   200
\begin{frame}[c]
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   201
\frametitle{Confirmation Stage}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   202
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   203
\begin{enumerate}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   204
\item For each \bl{$b_i$} Bob checks whether \bl{$s_i$} conforms to the protocol
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   205
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   206
\begin{center}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   207
\begin{tabular}{ll}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   208
\bl{$b_i = 0$}: & \bl{$A^{s_i} \equiv h_i\;mod\;p$}\\
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   209
\bl{$b_i = 1$}: & \bl{$A^{s_i}  \equiv h_i * h_j^{-1}  \;mod\; p$}\\
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   210
\end{tabular}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   211
\end{center}\bigskip
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   212
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   213
Bob was sent
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   214
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   215
\begin{center}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   216
\begin{tabular}{l}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   217
\bl{$h_1, \ldots, h_z$},\\
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   218
\bl{$r_1 - r_j$},  \bl{$r_2 - r_j$}, \ldots, \bl{$r_z - r_j \;\;mod \;p - 1$} 
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   219
\end{tabular}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   220
\end{center}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   221
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   222
where the corresponding bits were 
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   223
\bl{$1$}; Bob does not know \bl{$r_j$}, he does not know any \bl{$r_i$} where the bit was \bl{$1$}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   224
\end{enumerate}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   225
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   226
\only<2>{
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   227
\begin{textblock}{7}(7.9,1)
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   228
\begin{bubble}[5cm]\small
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   229
\begin{center}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   230
\bl{\begin{tabular}{r@{\hspace{1mm}}c@{\hspace{1mm}}l}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   231
$A^{s_i}$ & $=$ & $A^{r_i - r_j}$\\ 
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   232
          & $=$ & $A^{r_i} * A^{-r_j}$\\
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   233
          & $=$ & $h_{r_i} * h_{r_j}^{-1}\;mod\;p$   
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   234
\end{tabular}}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   235
\end{center}    
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   236
\end{bubble}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   237
\end{textblock}}
352
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   238
435
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   239
\end{frame}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   240
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   241
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   242
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   243
\begin{frame}[c]
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   244
\frametitle{Proving Stage}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   245
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   246
\begin{enumerate}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   247
\item Alice proves she knows \bl{$x$}, the discrete log of \bl{$B$}\\
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   248
she sends
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   249
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   250
\begin{center}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   251
\bl{$s_{z+1} = (x - r_j)$}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   252
\end{center}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   253
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   254
\item Bob confirms
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   255
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   256
\begin{center}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   257
\bl{$A^{s_{z+1}} \equiv B * h_j^{-1} \;mod \; p$}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   258
\end{center}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   259
\end{enumerate}\bigskip\pause
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   260
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   261
In order to cheat, Alice has to guess all bits in advance. She
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   262
has only \bl{$\frac{1}{2}^z$} chance of doing so.\bigskip\\
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   263
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   264
\end{frame}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   265
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   266
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   267
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   268
\tikzset{alt/.code args={<#1>#2#3#4}{%
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   269
  \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   270
}}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   271
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   272
\begin{frame}[t]
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   273
\frametitle{Buffer Overflow Attacks}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   274
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   275
\begin{itemize}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   276
\item the problem arises from the way C/C++ organises its function calls\\[-8mm]\mbox{}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   277
\end{itemize}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   278
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   279
\begin{center}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   280
\begin{tikzpicture}[scale=1]
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   281
%\draw[black!10,step=2mm] (0,0) grid (9,4);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   282
%\draw[black!10,thick,step=10mm] (0,0) grid (9,4);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   283
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   284
\node at (0.5,4.5) {\small\begin{tabular}{l}main\\[-2mm] prog.\end{tabular}};
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   285
\draw[line width=0mm, white, alt=<2->{fill=red}{fill=blue}] (0,2.5) rectangle (1,3.8);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   286
\draw[line width=0mm, white, alt=<9->{fill=red}{fill=blue}] (0,0.2) rectangle (1,0.5);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   287
\draw[line width=1mm, alt=<3->{fill=yellow}{fill=blue}] (0,2.0) rectangle (1,2.5);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   288
\draw[line width=1mm, alt=<6->{fill=red}{fill=blue}] (0,1.0) rectangle (1,2.0);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   289
\draw[line width=1mm, alt=<7->{fill=yellow}{fill=blue}] (0,0.5) rectangle (1,1.0);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   290
\draw[line width=1mm] (0,0) -- (0,4);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   291
\draw[line width=1mm] (1,0) -- (1,4);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   292
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   293
\node at (3.5,3.5) {\small\begin{tabular}{l}fact(n)\end{tabular}};
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   294
\draw[line width=1mm, alt=<{4-5,8}>{fill=red}{fill=blue}] (3,1.0) rectangle (4,3.0);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   295
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   296
\onslide<3-4>{\draw[->, line width=1mm,red] (1,2.3) to node [above,sloped,midway] {n=4} (3,3);}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   297
\onslide<5>{\draw[<-, line width=1mm,red] (1,2.3) to node [above,sloped,midway] {res=24} (3,1);}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   298
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   299
\onslide<7-8>{\draw[->, line width=1mm,red] (1,0.8) to node [above,sloped,midway] {n=3} (3,3);}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   300
\onslide<9>{\draw[<-, line width=1mm,red] (1,0.8) to node [above,sloped,midway] {res=6} (3,1);}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   301
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   302
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   303
\node at (7.75,3.9) {\small\begin{tabular}{l}stack\end{tabular}};
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   304
\draw[line width=1mm] (7,3.5) -- (7,0.5) -- (8.5,0.5) -- (8.5,3.5);
352
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   305
435
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   306
\onslide<3,4,7,8>{
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   307
\node at (7.75, 1.4) {ret};
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   308
\draw[line width=1mm] (7,1.1) -- (8.5,1.1);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   309
\node at (7.75, 2.0) {sp};
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   310
\draw[line width=1mm] (7,2.3) -- (8.5,2.3);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   311
}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   312
\onslide<3,4>{
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   313
\node at (7.75, 0.8) {4};
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   314
\draw[line width=1mm] (7,1.7) -- (8.5,1.7);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   315
}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   316
\onslide<7,8>{
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   317
\node at (7.75, 0.8) {3};
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   318
\draw[line width=1mm] (7,1.7) -- (8.5,1.7);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   319
}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   320
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   321
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   322
\end{tikzpicture}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   323
\end{center}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   324
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   325
\end{frame}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   326
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   327
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   328
\begin{frame}[t]
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   329
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   330
\begin{center}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   331
\begin{tikzpicture}[scale=1]
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   332
%\draw[black!10,step=2mm] (0,0) grid (9,4);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   333
%\draw[black!10,thick,step=10mm] (0,0) grid (9,4);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   334
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   335
\node at (0.5,4.5) {\small\begin{tabular}{l}main\\[-2mm] prog.\end{tabular}};
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   336
\draw[line width=0mm, white, alt=<2->{fill=red}{fill=blue}] (0,2.5) rectangle (1,3.8);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   337
\draw[line width=1mm, white, fill=blue] (0,1.0) rectangle (1,2.0);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   338
\draw[line width=1mm, alt=<3->{fill=yellow}{fill=blue}] (0,2.0) rectangle (1,2.5);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   339
\draw[line width=1mm] (0,0) -- (0,4);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   340
\draw[line width=1mm] (1,0) -- (1,4);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   341
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   342
\node at (3.5,3.5) {\small\begin{tabular}{l}fact(n)\end{tabular}};
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   343
\draw[line width=0mm, alt=<{4-}>{red, fill=red}{blue, fill=blue}] (3,2.8) rectangle (4,3.0);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   344
\draw[line width=0mm, alt=<{5-}>{red, fill=red}{blue, fill=blue}] (3,2.8) rectangle (4,2.0);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   345
\draw[line width=0mm, alt=<{7-}>{red, fill=red}{blue, fill=blue}] (3,2.0) rectangle (4,1.0);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   346
\draw[line width=1mm] (3,1.0) rectangle (4,3.0);
352
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   347
435
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   348
\onslide<3->{\draw[->, line width=1mm,red] (1,2.3) to node [above,sloped,midway] {n=4} (3,3);}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   349
\onslide<5->{\draw[<-, line width=2mm,red] (4,2) to node [above,sloped,midway] 
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   350
{\begin{tabular}{l}user\\[-1mm] input\end{tabular}} (6,2);}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   351
\onslide<8->{\draw[<-, line width=1mm,red] (1,-2) to (3,1);}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   352
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   353
\node at (7.75,3.9) {\small\begin{tabular}{l}stack\end{tabular}};
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   354
\draw[line width=1mm] (7,3.5) -- (7,-0.1) -- (8.5,-0.1) -- (8.5,3.5);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   355
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   356
\onslide<3->{
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   357
\node at (7.75, 0.2) {4};
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   358
\draw[line width=1mm,alt=<6->{fill=red}{fill=white}] (7,0.5) rectangle (8.5,1.1);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   359
\node at (7.75, 0.8) {\alt<6->{@a\#}{ret}};
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   360
\draw[line width=1mm,alt=<6->{fill=red}{fill=white}] (7,1.1) rectangle (8.5,1.7);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   361
\node at (7.75, 1.4) {\alt<6->{!?w;}sp};
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   362
}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   363
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   364
\onslide<4->{
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   365
\draw[line width=1mm,fill=red] (7,1.7) rectangle (8.5,3.0);
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   366
\node[white] at (7.75, 2.4) {buffer};
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   367
}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   368
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   369
\end{tikzpicture}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   370
\end{center}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   371
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   372
\end{frame}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   373
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   374
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   375
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   376
\begin{frame}[c]
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   377
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   378
\begin{itemize}
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   379
\item Imagine you have an completely innocent email message,
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   380
      like birthday wishes to your grandmother? Why should you
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   381
      still encrypt this message and your grandmother take the
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   382
      effort to decrypt it?\bigskip 
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   383
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   384
      \small  
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   385
      (Hint: The answer has nothing to do with preserving the
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   386
      privacy of your grandmother and nothing to do with
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   387
      keeping her birthday wishes super-secret. Also nothing to
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   388
      do with you and grandmother testing the latest
4603e6bb80c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   389
      encryption technology, nor just for the sake of it.)
352
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   390
\end{itemize}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   391
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   392
\end{frame}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   393
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   394
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   395
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   396
\end{document}
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   397
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   398
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   399
%%% Local Variables:  
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   400
%%% mode: latex
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   401
%%% TeX-master: t
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   402
%%% End: 
da5713bcdbb0 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   403