--- a/handouts/ho02.tex Wed Sep 03 11:01:14 2014 +0100
+++ b/handouts/ho02.tex Sat Sep 06 15:30:13 2014 +0100
@@ -33,7 +33,7 @@
scale of Turing's halting problem, which is proved that it can
never be solved in general, but it is unsolved with current
technology. This is not just my opinion, but
-from shared by Alex Alderman, who is the world-expert on this
+from shared by Alex Halderman, who is the world-expert on this
subject and from whose course on Securing Digital Democracy
I have most of my information and inspiration. It is also
a controversial topic in many countries:
@@ -119,6 +119,13 @@
Why do I use e-polling in lectures?
+Imagine you have a perfectly secure internet voting system, by
+which I mean nobody can tamper with or steal votes between
+your browser and the central server responsible for vote
+tallying. What can still go wrong with such a perfectly secure
+voting system, which is prevented in traditional elections
+with paper-based ballots?
+
\end{document}
%%% Local Variables:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langs.sty Sat Sep 06 15:30:13 2014 +0100
@@ -0,0 +1,63 @@
+\usepackage{listings}
+\usepackage{etoolbox}
+\setmonofont[Scale=.95]{Consolas}
+\newfontfamily{\consolas}{Consolas}
+
+\definecolor{codered}{rgb}{0.6,0,0} % for strings
+\definecolor{codegreen}{rgb}{0.25,0.5,0.35} % comments
+\definecolor{codepurple}{rgb}{0.5,0,0.35} % keywords
+\definecolor{codedocblue}{rgb}{0.25,0.35,0.75} % doc
+\definecolor{codeblue}{rgb}{0.25,0.35,0.75} % types
+
+\BeforeBeginEnvironment{lstlisting}{\par\noindent\begin{minipage}{\linewidth}}
+\AfterEndEnvironment{lstlisting}{\end{minipage}\par}
+
+\lstdefinelanguage{Scala}{
+ morekeywords={abstract,case,catch,class,def,%
+ do,else,extends,false,final,finally,%
+ for,if,implicit,import,match,mixin,%
+ new,null,object,override,package,%
+ private,protected,requires,return,sealed,%
+ super,this,throw,trait,true,try,%
+ type,val,var,while,with,yield},%
+ otherkeywords={=>,<-,<\%,<:,>:,\#,@},%
+ sensitive=true,%
+ %directives={Int,Char,Rexp,String,Boolean,BigInt,Unit,List,Set},%
+ %moredelim=*[directive]:,%
+ morecomment=[l]{//},%
+ morecomment=[n]{/*}{*/},
+ morestring=[b]",
+ morestring=[b]',
+ morestring=[b]"""
+}[keywords,comments,strings]
+
+\lstdefinelanguage{While}{
+ morekeywords={if,then,else,while,do,true,false,write,upto,for,skip},
+ otherkeywords={=,!=,:=,<,>,;},
+ sensitive=true,
+ morecomment=[n]{/*}{*/},
+}
+
+\lstdefinestyle{mystyle}
+ {basicstyle=\ttfamily,
+ keywordstyle=\color{codepurple}\bfseries,
+ %directivestyle=\color{codeblue}\bfseries,
+ stringstyle=\color{codegreen},
+ commentstyle=\color{codegreen},
+ morecomment=[s][\color{codedocblue}]{/**}{*/},
+ numbers=left,
+ numberstyle=\tiny\color{black},
+ stepnumber=1,
+ numbersep=10pt,
+ tabsize=2,
+ showspaces=false,
+ showstringspaces=false,
+ xleftmargin=8mm,
+ emphstyle=\color{codeblue}\bfseries,
+ keepspaces}
+
+\lstset{language=Scala,
+ style=mystyle}
+
+
+\newcommand{\code}[1]{{\lstinline{#1}}}
Binary file slides/slides01.pdf has changed
--- a/slides/slides01.tex Wed Sep 03 11:01:14 2014 +0100
+++ b/slides/slides01.tex Sat Sep 06 15:30:13 2014 +0100
@@ -2,7 +2,6 @@
\usepackage{beamerthemeplaincu}
\usepackage{fontenc,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text}
-%%\usepackage[latin1]{inputenc}
\usepackage{mathpartir}
\usepackage[absolute,overlay]{textpos}
\usepackage{ifthen}
@@ -10,7 +9,6 @@
\usepackage{pgf}
\usepackage{calc}
\usepackage{ulem}
-%%\usepackage{courier}
\usepackage{listings}
\renewcommand{\uline}[1]{#1}
\usetikzlibrary{arrows}
@@ -23,62 +21,14 @@
\usetikzlibrary{plotmarks}
\usepackage{graphicx}
\usepackage{pgfplots}
-
+\usepackage{../langs}
-\definecolor{javared}{rgb}{0.6,0,0} % for strings
-\definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments
-\definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords
-\definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc
\makeatletter
\lst@CCPutMacro\lst@ProcessOther {"2D}{\lst@ttfamily{-{}}{-{}}}
\@empty\z@\@empty
\makeatother
-\lstset{language=Java,
- basicstyle=\consolas,
- keywordstyle=\color{javapurple}\bfseries,
- stringstyle=\color{javagreen},
- commentstyle=\color{javagreen},
- morecomment=[s][\color{javadocblue}]{/**}{*/},
- numbers=left,
- numberstyle=\tiny\color{black},
- stepnumber=1,
- numbersep=10pt,
- tabsize=2,
- showspaces=false,
- showstringspaces=false}
-
-\lstdefinelanguage{scala}{
- morekeywords={abstract,case,catch,class,def,%
- do,else,extends,false,final,finally,%
- for,if,implicit,import,match,mixin,%
- new,null,object,override,package,%
- private,protected,requires,return,sealed,%
- super,this,throw,trait,true,try,%
- type,val,var,while,with,yield},
- otherkeywords={=>,<-,<\%,<:,>:,\#,@,->},
- sensitive=true,
- morecomment=[l]{//},
- morecomment=[n]{/*}{*/},
- morestring=[b]",
- morestring=[b]',
- morestring=[b]"""
-}
-
-\lstset{language=Scala,
- basicstyle=\consolas,
- keywordstyle=\color{javapurple}\bfseries,
- stringstyle=\color{javagreen},
- commentstyle=\color{javagreen},
- morecomment=[s][\color{javadocblue}]{/**}{*/},
- numbers=left,
- numberstyle=\tiny\color{black},
- stepnumber=1,
- numbersep=10pt,
- tabsize=2,
- showspaces=false,
- showstringspaces=false}
% beamer stuff
\renewcommand{\slidecaption}{APP 01, King's College London, 24.~September 2013}
@@ -87,7 +37,6 @@
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mode<presentation>{
\begin{frame}<1>[t]
\frametitle{%
\begin{tabular}{@ {}c@ {}}
@@ -99,58 +48,50 @@
\includegraphics[scale=1.3]{pics/barrier.jpg}
\end{center}
-
-\normalsize
+ \normalsize
\begin{center}
\begin{tabular}{ll}
Email: & christian.urban at kcl.ac.uk\\
Office: & S1.27 (1st floor Strand Building)\\
- Slides: & KEATS
+ Slides/HOs: & KEATS
\end{tabular}
\end{center}
-
-
-\end{frame}}
+\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mode<presentation>{
\begin{frame}
\begin{center}
\includegraphics[scale=2.1]{pics/barrier.jpg}
\end{center}
-\end{frame}}
+\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\mode<presentation>{
\begin{frame}
-\onslide<-1>{
\begin{center}
\includegraphics[scale=0.1]{pics/snowden.jpg}
-\small{}
-\end{center}}
+\end{center}
-\only<1->{
\begin{textblock}{1}(4.5,7.5)
\begin{tikzpicture}[scale=1.3]
\draw[white] (0,0) node (X) {\includegraphics[scale=0.1]{pics/rman.png}};
- \draw[white] (4,0) node (Y) {\includegraphics[scale=0.1]{pics/gman.png}};
- \draw[red, ->, line width = 2mm] (X) -- (Y);
- \node [inner sep=5pt,label=above:\textcolor{black}{}] at ($ (X)!.5!(Y) $) {};
+ \draw[white] (6,0) node (Y) {\includegraphics[scale=0.1]{pics/gman.png}};
+ \draw[red, ->, line width = 3mm] (X) -- (Y);
+ \node [inner sep=5pt,label=above:\textcolor{black}{communication}] at ($ (X)!.5!(Y) $) {};
\draw[white] (1.3, -1) node (NSA) {\includegraphics[scale=0.05]{pics/nsa.png}};
\draw[white] (2.7, -1) node (GCHQ) {\includegraphics[scale=0.3]{pics/gchq.jpg}};
\draw[black] (2, -2) node (OTHER) {\huge\ldots};
\end{tikzpicture}
-\end{textblock}}
+\end{textblock}
-\end{frame}}
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\end{frame}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\mode<presentation>{