Compare commits
No commits in common. "27d2c8d21a122aa0c0cb623668657188f9d95444" and "0da22db6fadfc1d55acc35715e0bb065ed17c289" have entirely different histories.
27d2c8d21a
...
0da22db6fa
5 changed files with 0 additions and 37 deletions
|
|
@ -21,15 +21,6 @@ stored first. This distinction matters when serializing the internal state to
|
|||
produce the final digest --- MD5 uses little-endian, while SHA-256 and
|
||||
Whirlpool use big-endian.
|
||||
|
||||
\[
|
||||
\text{Value}\; 0xD41D8CD9:
|
||||
\begin{cases}
|
||||
\text{Big-endian: } & \text{d4}\;\mid\;\text{1d}\;\mid\;\text{8c}\;\mid\;\text{d9}\\
|
||||
\text{Little-endian: } & \text{d9}\;\mid\;\text{8c}\;\mid\;\text{1d}\;\mid\;\text{d4}
|
||||
\end{cases}
|
||||
\]
|
||||
|
||||
|
||||
\vspace{1em}
|
||||
|
||||
A \textbf{message} is the arbitrary-length input fed to a hash function. The
|
||||
|
|
|
|||
|
|
@ -12,11 +12,6 @@
|
|||
|
||||
\vspace{0.5em}
|
||||
|
||||
\item Whirlpool \textit{reference implementations}.\\
|
||||
\url{https://web.archive.org/web/20171129084214/http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html}
|
||||
|
||||
\vspace{0.5em}
|
||||
|
||||
\item Wikipedia, \textit{AES}.\\
|
||||
\url{https://en.wikipedia.org/wiki/Advanced_Encryption_Standard}
|
||||
|
||||
|
|
@ -41,11 +36,6 @@
|
|||
\item Wikipedia, \textit{Bitwise operation}.\\
|
||||
\url{https://en.wikipedia.org/wiki/Bitwise_operation}
|
||||
|
||||
\vspace{0.5em}
|
||||
|
||||
\item Wikipedia, \textit{Miyaguchi Preneel}.\\
|
||||
\url{https://en.wikipedia.org/wiki/One-way_compression_function#Miyaguchi.E2.80.93Preneel}
|
||||
|
||||
|
||||
\end{itemize}
|
||||
%https://revistarsc.com.br/ojs/index.php/rsc/article/download/123/version/139/91/280
|
||||
|
|
|
|||
|
|
@ -13,11 +13,6 @@ const uint32_t g_md5_s[64] = {
|
|||
|
||||
#undef S_ROUND
|
||||
|
||||
/*
|
||||
* import math
|
||||
* for i in range(0, 64):
|
||||
* hex(math.floor(math.pow(2, 32) * abs(math.sin(i+1))))
|
||||
*/
|
||||
const uint32_t g_md5_T[64] = {
|
||||
0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee,
|
||||
0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501,
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
#include "sha256.h"
|
||||
|
||||
/*
|
||||
* for i in range(0, 64):
|
||||
* p = nth_prime(i + 1)
|
||||
* value = math.floor((2**32) * ((p ** (1/3)) % 1))
|
||||
* print(hex(int(value)))
|
||||
*/
|
||||
|
||||
const uint32_t g_sha256_K[64] = {
|
||||
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
|
||||
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
|
||||
|
|
|
|||
|
|
@ -1,11 +1,5 @@
|
|||
#include "sha256.h"
|
||||
|
||||
/*
|
||||
* for i in range(0,8):
|
||||
* p = nth_prime(i + 1)
|
||||
* frac = math.sqrt(p) % 1
|
||||
* print(hex(int(frac * 2**32)))
|
||||
*/
|
||||
void sha256_init(void *ctx)
|
||||
{
|
||||
struct sha256_ctx *local_ctx = ctx;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue