diff --git a/src/md5/md5.c b/src/md5/md5.c index ad10c20..2250535 100644 --- a/src/md5/md5.c +++ b/src/md5/md5.c @@ -13,6 +13,11 @@ 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, diff --git a/src/sha256/sha256.c b/src/sha256/sha256.c index 8298db6..d7f13d4 100644 --- a/src/sha256/sha256.c +++ b/src/sha256/sha256.c @@ -1,5 +1,12 @@ #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, diff --git a/src/sha256/sha256_init.c b/src/sha256/sha256_init.c index e59e2ae..59d2de6 100644 --- a/src/sha256/sha256_init.c +++ b/src/sha256/sha256_init.c @@ -1,5 +1,11 @@ #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;