This repository has been archived on 2024-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
ComputerSecurity/cw/cw.tex

87 lines
2.1 KiB
TeX
Raw Normal View History

2023-11-03 12:58:44 +00:00
%%% Preamble
\documentclass[11pt, a4paper]{article}
\usepackage[english]{babel} % English language/hyphenation
\usepackage{url}
\usepackage{tabularx}
\usepackage{pdfpages}
\usepackage{float}
\usepackage{graphicx}
\graphicspath{ {../images for report/} }
\usepackage[margin=2cm]{geometry}
\usepackage{hyperref}
\hypersetup{
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=black,
urlcolor=black
}
\usepackage{cleveref}
%%% Custom headers/footers (fancyhdr package)
\usepackage{fancyhdr}
\pagestyle{fancyplain}
\fancyhead{} % No page header
\fancyfoot[L]{} % Empty
\fancyfoot[C]{\thepage} % Pagenumbering
\fancyfoot[R]{} % Empty
\renewcommand{\headrulewidth}{0pt} % Remove header underlines
\renewcommand{\footrulewidth}{0pt} % Remove footer underlines
\setlength{\headheight}{13.6pt}
% numeric
\usepackage[style=ieee,sorting=none,backend=biber]{biblatex}
\addbibresource{../main.bib}
% Write the approved title of your dissertation
\title{Automated image classification with expandable models}
% Write your full name, as in University records
\author{Andre Henriques, 6644818}
\date{}
%%% Begin document
\begin{document}
\section*{5}
\subsection*{5.1}
The hash function is collision resistante for $n=1$, since if the block size is one the hash function is the encryption. Therefore:
if the message is only one block long:
$$H=E$$
$$m\ne m'$$
2023-11-03 13:00:42 +00:00
$$H(m)=E(K, IV \oplus m) = C_1$$
$$H(m')=E(K, IV \oplus m') = C_2$$
2023-11-03 12:58:44 +00:00
And if there the hashing function was not collision resistant that would imply
2023-11-03 13:06:29 +00:00
$$C_1=C_2\Rightarrow D(C_1)=D(C_2) \Rightarrow m=m'$$
2023-11-03 13:24:19 +00:00
and since $m\ne m'$ the hash function is collision resistant, for messages with 1 block.
For if the block size is bigger than one we can say
$$H(m)=E(m)_{\text{Last Block}}$$
$$E(m)=E(K, m)$$
$$\exists a,b,c,d : m = a||b \and m' = c||d$$
where a,b,c,d are the size of one block
$$H(m)=E(b \oplus E(a \oplus IV)) = C_1$$
$$H(m')=E(d \oplus E(c \oplus IV)) = C_2$$
since it's possible to have:
$$b \oplus E(a \oplus IV) = d \oplus E(c \oplus IV)$$
with:
$$a \ne b \ne c \ne d$$
therefore
$$H(m)=H(m') \and m\ne m'$$
2023-11-03 12:58:44 +00:00
\end{document}