refactor: rework newline

This commit is contained in:
lohhiiccc 2026-05-11 18:46:40 +02:00
parent 0c62539e8f
commit d89e7a37d6
8 changed files with 22 additions and 15 deletions

View file

@ -49,5 +49,3 @@ compressed output is combined with the previous state to produce the new state
--- this chaining ensures that the final digest depends on every bit of the
input. The exact combination operation is algorithm-specific: MD5 and SHA-256
use an additive feedforward, while Whirlpool uses the Miyaguchi-Preneel scheme.
\newpage

View file

@ -15,5 +15,3 @@ The library currently implements the following algorithms:
These functions are commonly used for data integrity verification, digital
signatures, and \textbf{M}essage \textbf{A}uthentication \textbf{C}ode\textbf{s} (MACs).
\newpage

View file

@ -22,10 +22,17 @@
\newpage
\input{preliminaries}
\newpage
\input{introduction}
\newpage
\input{generic_interface}
\newpage
\input{md5}
\newpage
\input{sha256}
\newpage
\input{whirlpool}
\newpage
\input{ressource}
\end{document}

View file

@ -98,5 +98,3 @@ the state before compression:
\noindent where $A_0$, $B_0$, $C_0$, $D_0$ denote the state at the beginning
of the block. After all blocks have been processed, the four state words are
serialized in little-endian order to produce the 128-bit digest.
\newpage

View file

@ -46,7 +46,6 @@ one block of data, and produces a new state.
The \textbf{Miyaguchi-Preneel} construction is a way to build a compression
function from a block cipher $E$. Given a current state $H$ and a message
block $M$, it produces a new state as:
\begin{align*}
H \leftarrow E(H,\ M) \oplus M \oplus H
\end{align*}
@ -62,5 +61,3 @@ internal state is wider than the final digest. This makes collision attacks
harder: an attacker targeting the output must first find a collision in the
larger internal state, which requires significantly more work than attacking
the digest directly.
\newpage

6
doc/ressource.tex Normal file
View file

@ -0,0 +1,6 @@
\section{Ressource}
https://en.wikipedia.org/wiki/Finite_field_arithmetic
https://en.wikipedia.org/wiki/Rijndael_MixColumns %maybe idk

View file

@ -110,5 +110,3 @@ the state before compression:
\noindent where $X_0$ denote the state at the beginning of the
block. After all blocks have been processed, the eight state words are
serialized in big-endian order to produce the 256-bit digest.
\newpage

View file

@ -21,10 +21,12 @@ The padding scheme follows the same structure as MD5 and SHA-256: a single
length is congruent to 448 bits modulo 512. The original message length in bits
is then appended as a 64-bit big-endian integer.
\vspace{1em}
\newpage
Each round applies the following four transformations in order:
\medskip
\textbf{SubBytes} replaces each byte of the state matrix by its image under the
Whirlpool S-box, a fixed 256-entry lookup table defined in the Whirlpool
specification.
@ -51,14 +53,17 @@ row $i$, each output byte $b_j$ is computed as:
b_j = \bigoplus_{k=0}^{7} \mathrm{MDS}[(j - k) \bmod 8] \cdot a_{i,k}
\end{align*}
\noindent where $\cdot$ denotes multiplication in $\mathrm{GF}(2^8)$ and
$\oplus$ denotes XOR.
\noindent where $\cdot$ denotes multiplication in $\mathrm{GF}(2^8)$ and $\oplus$ denotes XOR.
\medskip
\textbf{AddRoundKey} XORs the state with the current round key.
\vspace{1em}
\begin{align*}
%TODO: \forall i \in \mathbb{N},\ 0 \leq i < 8,
\end{align*}
\newpage
The S-box and the MDS matrix coefficients are fixed tables defined in the
Whirlpool specification; their values are too large to reproduce here. The