diff --git a/applied-hash/commitments/.gitignore b/applied-hash/commitments/.gitignore new file mode 100644 index 0000000..31a3e79 --- /dev/null +++ b/applied-hash/commitments/.gitignore @@ -0,0 +1,6 @@ +ltxobj/ +notes.pdf +slides.pdf +bibsp.sty +crypto.bib + diff --git a/applied-hash/commitments/Makefile b/applied-hash/commitments/Makefile new file mode 100644 index 0000000..3c1f14b --- /dev/null +++ b/applied-hash/commitments/Makefile @@ -0,0 +1,37 @@ +.PHONY: all +all: notes.pdf slides.pdf + +LATEXFLAGS+= -shell-escape + +SRC+= preamble.tex +SRC+= abstract.tex contents.tex + +DEPENDS+= bibsp.sty +DEPENDS+= crypto.bib + +FIGS+= + +notes.pdf: notes.tex +notes.pdf: ${SRC} ${DEPENDS} $(addprefix fig/,${FIGS}) + +slides.pdf: slides.tex +slides.pdf: ${SRC} ${DEPENDS} $(addprefix fig/,${FIGS}) + + +$(addprefix fig/, ${FIGS}): + ${MAKE} -C $(dir $@) $(notdir $@) + + +.PHONY: clean +clean: + ${RM} notes.pdf slides.pdf + +.PHONY: distclean +distclean: + ${MAKE} -C fig clean + + +INCLUDE_MAKEFILES=../../makefiles +include ${INCLUDE_MAKEFILES}/tex.mk +INCLUDE_BIBSP=../../bibsp +include ${INCLUDE_BIBSP}/bibsp.mk diff --git a/applied-hash/commitments/abstract.tex b/applied-hash/commitments/abstract.tex new file mode 100644 index 0000000..4012d9d --- /dev/null +++ b/applied-hash/commitments/abstract.tex @@ -0,0 +1,22 @@ +% What's the problem? +% Why is it a problem? Research gap left by other approaches? +% Why is it important? Why care? +% What's the approach? How to solve the problem? +% What's the findings? How was it evaluated, what are the results, limitations, +% what remains to be done? + +% XXX Summary +\emph{Summary:} +\dots + +% XXX Motivation and intended learning outcomes +\emph{Intended learning outcomes:} +\dots + +% XXX Prerequisites +\emph{Prerequisites:} +\dots + +% XXX Reading material +\emph{Reading:} +\dots diff --git a/applied-hash/commitments/contents.tex b/applied-hash/commitments/contents.tex new file mode 100644 index 0000000..9107498 --- /dev/null +++ b/applied-hash/commitments/contents.tex @@ -0,0 +1,49 @@ +\mode* + +\section[Hash functions]{What was a hash function now again?} + +\begin{frame} + \begin{definition}[One-way function\footfullcite{GoldreichFOC-1}] + \begin{itemize} + \item Let \(h\colon \{0,1\}^*\to \{0,1\}^*\). + \item \(h\) is \emph{one-way} if + \begin{enumerate} + \item there exists an efficient algorithm \(A\) such that \(A(x) + = h(x)\); + \item for every efficient algorithm \(A^\prime\), every positive + polynomial \(p(\cdot)\) and all sufficiently large \(n\)'s + \[\Prob{A^\prime(h(x), 1^n) \in h^{-1}(h(x))} < \frac{1}{p(n)}\] + \end{enumerate} + \end{itemize} + \end{definition} +\end{frame} + +\begin{frame} + \begin{definition}[Preimage resistance (one way)] + \begin{description} + \item[Input] hash function~\(H\), value~\(y\). + \item[Output] Any \(x\) such that \(H(x) = y\). + \end{description} + \end{definition} + + \begin{definition}[Second preimage resistance (weak collision resistance)] + \begin{description} + \item[Input] hash function~\(H\), value \(x\). + \item[Output] Any value \(x'\) such that \(H(x) = H(x')\). + \end{description} + \end{definition} + + \begin{definition}[Collision resistance (strong collision resistance)] + \begin{description} + \item[Input] hash function~\(H\). + \item[Output] Any two \(x, x'\) such that \(H(x) = H(x')\). + \end{description} + \end{definition} +\end{frame} + + +\section{Commitments} + + +\section{Keyed hash functions} + diff --git a/applied-hash/commitments/fig/Makefile b/applied-hash/commitments/fig/Makefile new file mode 100644 index 0000000..d2d980e --- /dev/null +++ b/applied-hash/commitments/fig/Makefile @@ -0,0 +1,11 @@ +.PHONY: all +all: + + +.PHONY: clean +clean: + true + + +INCLUDE_MAKEFILES=../../../makefiles +include ${INCLUDE_MAKEFILES}/doc.mk diff --git a/applied-hash/commitments/notes.tex b/applied-hash/commitments/notes.tex new file mode 100644 index 0000000..75ad7a9 --- /dev/null +++ b/applied-hash/commitments/notes.tex @@ -0,0 +1,45 @@ +\documentclass{article} + +\usepackage[hyphens]{url} +\usepackage[hidelinks]{hyperref} + +\input{preamble.tex} + +\usepackage[noamsthm,notheorems]{beamerarticle} +\setjobnamebeamerversion{slides} + +%\usepackage{authblk} +%\let\institute\affil + +\declaretheorem[numbered=unless unique,style=theorem]{theorem} +\declaretheorem[numbered=unless unique,style=definition]{definition} +\declaretheorem[numbered=unless unique,style=definition]{assumption} +\declaretheorem[numbered=unless unique,style=definition]{protocol} +\declaretheorem[numbered=unless unique,style=example]{example} +%\declaretheorem[style=definition,numbered=unless unique, +% name=Example,refname={example,examples}]{example} +\declaretheorem[numbered=unless unique,style=remark]{remark} +\declaretheorem[numbered=unless unique,style=remark]{idea} +\declaretheorem[numbered=unless unique,style=exercise]{exercise} +\declaretheorem[numbered=unless unique,style=exercise]{question} +\declaretheorem[numbered=unless unique,style=solution]{solution} + +\begin{document} +\title{% + Applied Hash Functions: Commitments +} +\author{Daniel Bosk} +\institute{% + KTH EECS +} + +\maketitle + +\begin{abstract} + \input{abstract.tex} +\end{abstract} + +\input{contents.tex} + +\printbibliography +\end{document} diff --git a/applied-hash/commitments/preamble.tex b/applied-hash/commitments/preamble.tex new file mode 100644 index 0000000..ec61d2a --- /dev/null +++ b/applied-hash/commitments/preamble.tex @@ -0,0 +1,39 @@ +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[british]{babel} +\usepackage{booktabs} + +\usepackage[all]{foreign} +\renewcommand{\foreignfullfont}{} +\renewcommand{\foreignabbrfont}{} + +\usepackage{newclude} +\usepackage{import} + +\usepackage[strict]{csquotes} +\usepackage[single]{acro} + +\usepackage[natbib,style=alphabetic,maxbibnames=99]{biblatex} +\addbibresource{crypto.bib} + +\usepackage{subcaption} + +\usepackage[noend]{algpseudocode} +\usepackage{xparse} + +\let\email\texttt + +\usepackage[outputdir=ltxobj]{minted} +\setminted{autogobble,fontsize=\footnotesize} + +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{mathtools} +\usepackage{amsthm} +\usepackage{thmtools} +\usepackage[unq]{unique} +\DeclareMathOperator{\powerset}{\mathcal{P}} + +\usepackage[binary-units]{siunitx} + +\usepackage{bibsp} diff --git a/applied-hash/commitments/slides.tex b/applied-hash/commitments/slides.tex new file mode 100644 index 0000000..47713ec --- /dev/null +++ b/applied-hash/commitments/slides.tex @@ -0,0 +1,118 @@ +\documentclass[ignoreframetext]{beamer} +\input{preamble.tex} + +\usetheme{Berlin} +\setbeamertemplate{footline}%{miniframes theme} +{% + \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot} + \end{beamercolorbox} + \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,% + leftskip=.3cm,rightskip=.3cm plus1fil]{author in head/foot}% + \leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor}% + \hfill% + {\usebeamerfont{institute in head/foot}\usebeamercolor[fg]{institute in head/foot}\insertshortinstitute}% + \end{beamercolorbox}% + \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,% + leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}% + {\usebeamerfont{title in head/foot}\insertshorttitle} \hfill \insertframenumber% + \end{beamercolorbox}% + \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot} + \end{beamercolorbox} +} +\setbeamercovered{transparent} +\setbeamertemplate{bibliography item}[text] + +\AtBeginSection[]{% + \begin{frame} + \tableofcontents[currentsection] + \end{frame} +} + +\ProvideDocumentEnvironment{assumption}{o}{% + \IfValueTF{#1}{% + \begin{block}{Assumption: #1} + }{% + \begin{block}{Assumption} + } +}{% + \end{block} +} + +\ProvideDocumentEnvironment{protocol}{o}{% + \IfValueTF{#1}{% + \begin{block}{Protocol: #1} + }{% + \begin{block}{Protocol} + } +}{% + \end{block} +} + +\ProvideDocumentEnvironment{remark}{o}{% + \IfValueTF{#1}{% + \begin{alertblock}{Note: #1} + }{% + \begin{alertblock}{Note} + } +}{% + \end{alertblock} +} + +\ProvideDocumentEnvironment{idea}{o}{% + \IfValueTF{#1}{% + \begin{block}{Idea: #1} + }{% + \begin{block}{Idea} + } +}{% + \end{block} +} + +\ProvideDocumentEnvironment{question}{o}{% + \setbeamercolor{block body}{bg=orange!15,fg=black} + \setbeamercolor{block title}{bg=orange,fg=white} + \setbeamercolor{local structure}{fg=orange} + \IfValueTF{#1}{% + \begin{block}{Question: #1} + }{% + \begin{block}{Question} + } +}{% + \end{block} +} + +\ProvideDocumentEnvironment{exercise}{o}{% + \setbeamercolor{block body}{bg=yellow!10,fg=black} + \setbeamercolor{block title}{bg=yellow,fg=black} + \setbeamercolor{local structure}{fg=yellow} + \IfValueTF{#1}{% + \begin{block}{Exercise: #1} + }{% + \begin{block}{Exercise} + } +}{% + \end{block} +} + + +\begin{document} +\title{% + Applied Hash Functions: Commitments +} +\author{Daniel Bosk} +\institute{% + KTH EECS +} + +\begin{frame} + \maketitle +\end{frame} + +\mode +\input{contents.tex} +\mode* + +\begin{frame}[allowframebreaks] + \printbibliography +\end{frame} +\end{document}