refactor: rework newline
This commit is contained in:
parent
0c62539e8f
commit
d89e7a37d6
8 changed files with 22 additions and 15 deletions
|
|
@ -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
|
--- 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
|
input. The exact combination operation is algorithm-specific: MD5 and SHA-256
|
||||||
use an additive feedforward, while Whirlpool uses the Miyaguchi-Preneel scheme.
|
use an additive feedforward, while Whirlpool uses the Miyaguchi-Preneel scheme.
|
||||||
|
|
||||||
\newpage
|
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,3 @@ The library currently implements the following algorithms:
|
||||||
|
|
||||||
These functions are commonly used for data integrity verification, digital
|
These functions are commonly used for data integrity verification, digital
|
||||||
signatures, and \textbf{M}essage \textbf{A}uthentication \textbf{C}ode\textbf{s} (MACs).
|
signatures, and \textbf{M}essage \textbf{A}uthentication \textbf{C}ode\textbf{s} (MACs).
|
||||||
|
|
||||||
\newpage
|
|
||||||
|
|
|
||||||
|
|
@ -22,10 +22,17 @@
|
||||||
\newpage
|
\newpage
|
||||||
|
|
||||||
\input{preliminaries}
|
\input{preliminaries}
|
||||||
|
\newpage
|
||||||
\input{introduction}
|
\input{introduction}
|
||||||
|
\newpage
|
||||||
\input{generic_interface}
|
\input{generic_interface}
|
||||||
|
\newpage
|
||||||
\input{md5}
|
\input{md5}
|
||||||
|
\newpage
|
||||||
\input{sha256}
|
\input{sha256}
|
||||||
|
\newpage
|
||||||
\input{whirlpool}
|
\input{whirlpool}
|
||||||
|
\newpage
|
||||||
|
\input{ressource}
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|
|
||||||
|
|
@ -98,5 +98,3 @@ the state before compression:
|
||||||
\noindent where $A_0$, $B_0$, $C_0$, $D_0$ denote the state at the beginning
|
\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
|
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.
|
serialized in little-endian order to produce the 128-bit digest.
|
||||||
|
|
||||||
\newpage
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
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
|
function from a block cipher $E$. Given a current state $H$ and a message
|
||||||
block $M$, it produces a new state as:
|
block $M$, it produces a new state as:
|
||||||
|
|
||||||
\begin{align*}
|
\begin{align*}
|
||||||
H \leftarrow E(H,\ M) \oplus M \oplus H
|
H \leftarrow E(H,\ M) \oplus M \oplus H
|
||||||
\end{align*}
|
\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
|
harder: an attacker targeting the output must first find a collision in the
|
||||||
larger internal state, which requires significantly more work than attacking
|
larger internal state, which requires significantly more work than attacking
|
||||||
the digest directly.
|
the digest directly.
|
||||||
|
|
||||||
\newpage
|
|
||||||
|
|
|
||||||
6
doc/ressource.tex
Normal file
6
doc/ressource.tex
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
\section{Ressource}
|
||||||
|
https://en.wikipedia.org/wiki/Finite_field_arithmetic
|
||||||
|
|
||||||
|
https://en.wikipedia.org/wiki/Rijndael_MixColumns %maybe idk
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -110,5 +110,3 @@ the state before compression:
|
||||||
\noindent where $X_0$ denote the state at the beginning of the
|
\noindent where $X_0$ denote the state at the beginning of the
|
||||||
block. After all blocks have been processed, the eight state words are
|
block. After all blocks have been processed, the eight state words are
|
||||||
serialized in big-endian order to produce the 256-bit digest.
|
serialized in big-endian order to produce the 256-bit digest.
|
||||||
|
|
||||||
\newpage
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
length is congruent to 448 bits modulo 512. The original message length in bits
|
||||||
is then appended as a 64-bit big-endian integer.
|
is then appended as a 64-bit big-endian integer.
|
||||||
|
|
||||||
\vspace{1em}
|
\newpage
|
||||||
|
|
||||||
Each round applies the following four transformations in order:
|
Each round applies the following four transformations in order:
|
||||||
|
|
||||||
|
\medskip
|
||||||
|
|
||||||
\textbf{SubBytes} replaces each byte of the state matrix by its image under the
|
\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
|
Whirlpool S-box, a fixed 256-entry lookup table defined in the Whirlpool
|
||||||
specification.
|
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}
|
b_j = \bigoplus_{k=0}^{7} \mathrm{MDS}[(j - k) \bmod 8] \cdot a_{i,k}
|
||||||
\end{align*}
|
\end{align*}
|
||||||
|
|
||||||
\noindent where $\cdot$ denotes multiplication in $\mathrm{GF}(2^8)$ and
|
\noindent where $\cdot$ denotes multiplication in $\mathrm{GF}(2^8)$ and $\oplus$ denotes XOR.
|
||||||
$\oplus$ denotes XOR.
|
|
||||||
|
|
||||||
\medskip
|
\medskip
|
||||||
|
|
||||||
\textbf{AddRoundKey} XORs the state with the current round key.
|
\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
|
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
|
Whirlpool specification; their values are too large to reproduce here. The
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue