From 8a8c266aaef14fa79f1520cca60827741e8b232c Mon Sep 17 00:00:00 2001 From: Daniel Bosk Date: Tue, 26 Jan 2021 09:01:43 +0100 Subject: [PATCH 1/2] Adds WIP stub for applied-hashes commitments --- applied-hash/commitments/.gitignore | 5 ++ applied-hash/commitments/Makefile | 36 ++++++++ applied-hash/commitments/abstract.tex | 22 +++++ applied-hash/commitments/contents.tex | 49 +++++++++++ applied-hash/commitments/fig/Makefile | 11 +++ applied-hash/commitments/notes.tex | 45 ++++++++++ applied-hash/commitments/preamble.tex | 39 +++++++++ applied-hash/commitments/slides.tex | 118 ++++++++++++++++++++++++++ 8 files changed, 325 insertions(+) create mode 100644 applied-hash/commitments/.gitignore create mode 100644 applied-hash/commitments/Makefile create mode 100644 applied-hash/commitments/abstract.tex create mode 100644 applied-hash/commitments/contents.tex create mode 100644 applied-hash/commitments/fig/Makefile create mode 100644 applied-hash/commitments/notes.tex create mode 100644 applied-hash/commitments/preamble.tex create mode 100644 applied-hash/commitments/slides.tex diff --git a/applied-hash/commitments/.gitignore b/applied-hash/commitments/.gitignore new file mode 100644 index 0000000..5795ec5 --- /dev/null +++ b/applied-hash/commitments/.gitignore @@ -0,0 +1,5 @@ +bibsp.sty +ltxobj/ +notes.pdf +slides.pdf + diff --git a/applied-hash/commitments/Makefile b/applied-hash/commitments/Makefile new file mode 100644 index 0000000..074abbc --- /dev/null +++ b/applied-hash/commitments/Makefile @@ -0,0 +1,36 @@ +.PHONY: all +all: notes.pdf slides.pdf + +LATEXFLAGS+= -shell-escape + +SRC+= preamble.tex +SRC+= abstract.tex contents.tex + +DEPENDS+= bibsp.sty + +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..4143818 --- /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{applied-hash.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} From 99915bf8d4334c4549ead729be03bc97595cfc50 Mon Sep 17 00:00:00 2001 From: Daniel Bosk Date: Tue, 26 Jan 2021 09:13:55 +0100 Subject: [PATCH 2/2] Fixes ref commitments --- applied-hash/commitments/.gitignore | 3 ++- applied-hash/commitments/Makefile | 1 + applied-hash/commitments/preamble.tex | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/applied-hash/commitments/.gitignore b/applied-hash/commitments/.gitignore index 5795ec5..31a3e79 100644 --- a/applied-hash/commitments/.gitignore +++ b/applied-hash/commitments/.gitignore @@ -1,5 +1,6 @@ -bibsp.sty ltxobj/ notes.pdf slides.pdf +bibsp.sty +crypto.bib diff --git a/applied-hash/commitments/Makefile b/applied-hash/commitments/Makefile index 074abbc..3c1f14b 100644 --- a/applied-hash/commitments/Makefile +++ b/applied-hash/commitments/Makefile @@ -7,6 +7,7 @@ SRC+= preamble.tex SRC+= abstract.tex contents.tex DEPENDS+= bibsp.sty +DEPENDS+= crypto.bib FIGS+= diff --git a/applied-hash/commitments/preamble.tex b/applied-hash/commitments/preamble.tex index 4143818..ec61d2a 100644 --- a/applied-hash/commitments/preamble.tex +++ b/applied-hash/commitments/preamble.tex @@ -14,7 +14,7 @@ \usepackage[single]{acro} \usepackage[natbib,style=alphabetic,maxbibnames=99]{biblatex} -\addbibresource{applied-hash.bib} +\addbibresource{crypto.bib} \usepackage{subcaption}