From d1418ffd92abcf0c0f93143db6941952ebfddbea Mon Sep 17 00:00:00 2001 From: eneller Date: Mon, 9 Feb 2026 18:55:29 +0100 Subject: [PATCH] update --- crypto.bib | 7 ++++++ crypto.tex | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 72 insertions(+), 3 deletions(-) diff --git a/crypto.bib b/crypto.bib index bc05dea..cca115e 100644 --- a/crypto.bib +++ b/crypto.bib @@ -18,3 +18,10 @@ url = "https://en.wikipedia.org/w/index.php?title=Kerckhoffs%27s_principle&oldid=1320402404", note = "[Online; accessed 2-February-2026]" } +@misc{ enwiki:confusion-diffusion, + author = "{Wikipedia contributors}", + title = "Confusion and diffusion --- {Wikipedia}{,} The Free Encyclopedia", + year = "2025", + url = "https://en.wikipedia.org/w/index.php?title=Confusion_and_diffusion&oldid=1307746165", + note = "[Online; accessed 3-February-2026]" +} \ No newline at end of file diff --git a/crypto.tex b/crypto.tex index 8886433..7dcca89 100644 --- a/crypto.tex +++ b/crypto.tex @@ -20,7 +20,7 @@ \makeglossaries \newacronym{DES}{DES}{Data Encryption Standard} \newacronym{AES}{AES}{Advanced Encryption Standard} -\newacronym{RSA}{RSA}{Rivest–Shamir–Adleman Encryption} +\newacronym{RSA}{RSA}{Rivest–Shamir–Adleman} @@ -88,14 +88,76 @@ A similar notion holds true for data retrieval. If it is too easy to find collis there will be an uneven distribution in the target domain and thus little to no efficiency gain. Another desired property, specifically for encryption is what is usually used synonymously with a hash function: a \textit{one-way function}. -Given $h(m)$, there should be no method more efficient than brute force to find a matching $m$. +Given $h(m)$, there should be no method more efficient than brute force to find a matching $m$. \newline +As alluded to earlier, hash functions are readily used for integrity checking. +By generating a fixed-size hash value for a given input, they allow users to verify that data has not been altered, +whether intentionally or accidentally. +For example, when downloading a file, comparing its hash with a published checksum ensures the file's integrity. +They are also often used in combination with public key cryptography, allowing the sender to sign with his private key +to prove not only integrity but authenticity. + + \subsection{Encryption} +Even though the properties of hash functions are similar to encryption, the fact that the input message is reduced to a fixed size hash +also means that inevitably information is lost by every hash function. +Fundamentally, encryption has the goal of only allowing authorized parties to read a message. +This is achieved by encoding the \textit{plaintext} into a \textit{ciphertext} and then transmitting/storing that ciphertext +separately from the necessary key to decrypt it. + +Early encryptions intuitively demonstrate two concepts that can be employed to encode a message: +\textit{substitution} and \textit{transposition}. + +\paragraph{Substitution} is used by +the simple Caesar cipher, often achieved by rotating two disks against each other, each with the alphabet written out on them. +\autoref{tab-caesar} shows a simple caesar cipher where the cipher alphabet is simply shifted by 3 positions from the plaintext alphabet. +In the process of encoding, A is therefore replaced (substituted) with D, B with E, and so on. +Upon reception of the message, the same process is done in reverse. + +\begin{table}[h] +\resizebox{\textwidth}{!}{% +\begin{tabular}{c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c} + A&B&C&D&E&F&G&H&I&J&K&L&M&N&O&P&Q&R&S&T&U&V&W&X&Y&Z \\ + \hline + D&E&F&G&H&I&J&K&L&M&N&O&P&Q&R&S&T&U&V&W&X&Y&Z&A&B&C + +\end{tabular}% +} +\caption{A simple substitution cipher demonstrated by a 3-letter shift.} +\label{tab-caesar} +\end{table} + + +\paragraph{Transposition} + +\paragraph{Confusion and Diffusion} \cite{enwiki:confusion-diffusion} \section{DES} -The \acrfull{DES} is a symmetric cipher developed in the 1970s at IBM +The \acrfull{DES} is a symmetric (or private-key) cipher developed in the 1970s at IBM as an archetypal block cipher. +It takes in a block of 64 bits and transforms it to a ciphertext using a key of equal length. +Despite suspicions of backdoors engineered into the algorithm due to the involvement of the NSA in the development of \acrshort{DES}, +it was approved as a federal standard in the USA in 1976 and only retired due to its short key length, +for which the NSA however was directly responsible as well. \newline +Nevertheless, it sparked public and scientific interest in the research of encryption algorithms, producing a large body of publications. + \section{AES} +The \acrfull{AES} superseded \acrshort{DES} in 2001 after an official selection process. +Unlike its predecessor, it does not use a Feistel network. + \section{RSA} +\acrfull{RSA} is an asymmetric (or public-key) cryptographic algorithm used for encryption and digital signing. +It was named after its eponymous inventors in 1977 after trying to disprove the Diffie-Hellman key exchange. +The algorithm they came up with relies on modular arithmetic, which remains the most popular class of asymmetric cryptography. + +\begin{enumerate} + \item Choose and randomly and stochastically independet primes $p,q$ of similar size so that + $0.1 < | \log_2 p - \log_2 q | < 30 $. + \item Calculate $ N= p \cdot q $ + \item Compute Euler's totient function of $ \varphi (N) = (p-1) \cdot (q-1)$ which is kept secret. + \item Choose an integer $e$ so that $ 1 < e < \varphi (N) $ and $\gcd(e, \varphi(N)) =1$, i.e. $e$ and $\varphi(N)$ + are coprime. The most common choice here is $ e= 2^(16) +1 = 65537 $, as $e$ is released as part of the public key. + \item For the private key, % TODO +\end{enumerate} \clearpage %\printglossary[type=\acronymtype] %\printglossary