WSP-Hash-256: A Cryptographic, Non-Multiplicative, 256-Bit Hashing Algorithm Without Input Padding, Parallel Reads or Prime Number Vulnerabilities

William Stafford Parsons developed a 256-bit cryptographic hashing algorithm as both a substantial improvement to SHA-256 and a test subject for cryptanalysis.

Library

Source

#include <stdint.h> struct wsp_hash_256_s { uint32_t _state[8]; uint32_t state[8]; }; void wsp_hash_256_initialize(unsigned long input_count, const uint8_t *input, struct wsp_hash_256_s *s) { unsigned char i = 0; s->state[0] = 1111111111; while ( i != 7 && i != input_count ) { i++; s->state[i] = input[i - 1] + s->state[i - 1]; s->state[i] += (s->state[i] + 111111111) << 9; } while (i != 7) { i++; s->state[i] = s->state[i - 1] + 111111111; s->state[i] += (s->state[i] + 111111111) << 9; } s->_state[0] = s->state[0]; s->_state[1] = s->state[1]; s->_state[2] = s->state[2]; s->_state[3] = s->state[3]; s->_state[4] = s->state[4]; s->_state[5] = s->state[5]; s->_state[6] = s->state[6]; s->_state[7] = s->state[7]; } void wsp_hash_256_transform(unsigned long i, unsigned long input_count, const uint8_t *input, struct wsp_hash_256_s *s) { while (i != input_count) { s->state[i & 7] += ( input[i] + s->state[(i + 1) & 7] + s->state[(i - 1) & 7] + 111111111 ) << 8; s->_state[i & 7] ^= (( ((input[i] << 24) | (s->state[i - 1 & 7] >> 8)) + s->state[i & 7] ) >> 2) + s->state[i & 7] + input[i] + 11; i++; } while (i < 7) { s->state[i] += s->state[i + 1] + 111111111; s->state[i] += (s->state[i] + 111111111) << 9; i++; } } void wsp_hash_256_finalize(struct wsp_hash_256_s *s) { unsigned char i = 24; s->_state[0] += (s->state[0] + s->_state[1]) ^ s->_state[0]; s->_state[1] += s->state[1] ^ (s->_state[0] + s->_state[2]); s->_state[2] += (s->state[2] + s->_state[3]) ^ s->_state[1]; s->_state[3] += s->state[3] ^ (s->_state[2] + s->_state[4]); s->_state[4] += (s->state[4] + s->_state[5]) ^ s->_state[2]; s->_state[5] += s->state[5] ^ (s->_state[4] + s->_state[6]); s->_state[6] += (s->state[6] + s->_state[7]) ^ s->_state[3]; s->_state[7] += (( s->state[1] ^ s->state[2] ^ s->state[3] ) << 16) | ((s->state[4] ^ s->state[5] ^ s->state[6]) >> 16) + s->state[7]; while (i != 9) { s->state[7] += (( s->state[(s->state[3] ^ s->_state[7]) & 7] + (s->state[4] ^ s->_state[0]) + s->_state[1] ) >> i) + (s->state[0] ^ s->_state[2]); s->state[6] += (( s->state[(s->state[2] ^ s->_state[0]) & 7] + (s->state[3] ^ s->_state[1]) + s->_state[2] ) << i) + (s->state[7] ^ s->_state[3]); s->state[5] += (( s->state[(s->state[1] ^ s->_state[1]) & 7] + (s->state[2] ^ s->_state[2]) + s->_state[3] ) >> i) + (s->state[6] ^ s->_state[4]); s->state[4] += (( s->state[(s->state[0] ^ s->_state[2]) & 7] + (s->state[1] ^ s->_state[3]) + s->_state[4] ) << i) + (s->state[5] ^ s->_state[5]); s->state[3] += (( s->state[(s->state[7] ^ s->_state[3]) & 7] + (s->state[0] ^ s->_state[4]) + s->_state[5] ) >> i) + (s->state[4] ^ s->_state[6]); s->state[2] += (( s->state[(s->state[6] ^ s->_state[4]) & 7] + (s->state[7] ^ s->_state[5]) + s->_state[6] ) << i) + (s->state[3] ^ s->_state[7]); s->state[1] += (( s->state[(s->state[5] ^ s->_state[5]) & 7] + (s->state[6] ^ s->_state[6]) + s->_state[7] ) >> i) + (s->state[2] ^ s->_state[0]); s->state[0] += (( s->state[(s->state[4] ^ s->_state[6]) & 7] + (s->state[5] ^ s->_state[7]) + s->_state[0] ) << i) + (s->state[1] ^ s->_state[1]); i -= 3; } }

Reference

wsp_hash_256_initialize() is the initialization function that accepts the 3 following arguments.

input_count is the count of elements in the input array.

input is the const uint8_t array to hash.

s is a struct wsp_hash_256_s pointer.

The return value data type is void.

wsp_hash_256_transform() is the core hashing loop that accepts the 4 following arguments.

i is the starting index position of elements in the input array.

input_count is the count of elements in the input array. When hashing in split segments, the value must be a multiple of 8, with the exception of the end segment.

input is the const uint8_t array to hash.

s is a struct wsp_hash_256_s pointer.

wsp_hash_256_finalize() is the finalization function that accepts the following argument.

s is a struct wsp_hash_256_s pointer. s.state contains the finalized hash digest result.

The return value data type is void.

Requirements

C compiler with C99 (ISO/IEC 9899:1999) standard compatibility.

Explanation

WSP-Hash-256 is designed for educational cryptanalysis and as a faster, one-byte-at-a-time alternative to SHA-256.

It hashes input data 1 byte at a time without padding using low-cost CPU instructions to meet compliance, portability and code security requirements.

It avoids common bottlenecks found in other cryptographic hashing algorithms, including 2048-bit additive constants, input padding, input length as an additive integer and expensive operations in the core hashing loop.

It's computationally-infeasible in virtually all cases to either reverse a hash digest into a message or find 2 different messages with the same hash digest.

The burden of cryptographic security proof is addressed with the following unusual security properties.

Instead of padding the input bytes with a minimum size, wsp_hash_256_initialize() loops chain together each of the 8 32-bit s->state segments with input-based values to avoid causing trivial collisions from small input sizes.

After initializing the 8 32-bit segments in the auxiliary s->_state with the result, the input bytes are hashed into 8 32-bit digests in a round-robin sequence with collision resistance derived from chaining each input byte.

The wsp_hash_256_transform() loop sums each input byte with a 32-bit s->state segment at a forward-moving index. This contributes heavily to preimage security since an attacker doesn’t know the value of either input[i] or s->state[i & 7] after each reverse iteration.

Without considering the security properties of the finalization sequence, attempting to reverse the aforementioned hashing loop requires 256 to the power of input_count brute-force combinations.

Message bytes are processed one-by-one to increase dispersion and reduce collisions across the 256 s->state bits.

Using parallelism or multi-byte processing risks higher collisions while relying on 256-bit collision probability as "too big to collide".

The summed 111111111 constant summed with adjacent 32-bit s->state segments on each iteration creates a significant distribution of bits at a low cost from emulated multiplication, even when all message bits are 0.

The speed of this core loop rivals the speed of other fast, minimal one-at-at-time hash functions.

After each input byte is processed, randomized bits are distributed further with a significant avalanche effect in wsp_hash_256_finalize().

It's infeasible to predict either the input characters or the input length from a hash digest without knowing each of the 8 32-bit s->_state segments.

These values are hidden by summing with 3-bit masks and shifting bits, meaning an attacker must brute-force a minimum of 2²⁵⁶ possible combinations to begin reversing a hash digest.

When considering the aforementioned core hashing algorithm loop, this number increases to 2²⁵⁶ multiplied by 256 to the power of input_count.

Compared to optimized SHA-256, it's up to 500% faster as shown in the following benchmarking table with average processing times.

100k 10-Byte Inputs SHA-256 0.190s --- WSP-Hash-256 0.087s Won 100k 60-Byte Inputs SHA-256 0.332s --- WSP-Hash-256 0.121s Won 100k 1k-Byte Inputs SHA-256 3.120s --- WSP-Hash-256 0.693s Won 100k 10k-Byte Inputs SHA-256 32.875s --- WSP-Hash-256 6.072s Won

The following code outputs a test vector with sequential 4-byte inputs.

#include <stdio.h> #include "wsp_hash_256.h"; int main(void) { struct wsp_hash_256_s s; int8_t input[4] = {49, 48, 48, 48}; unsigned char i = 48; printf("Input Output\n\n"); while (i != 73) { printf("%d %d %d %d ", input[0], input[1], input[2], input[3]); wsp_hash_256_initialize(4, (const uint8_t *) input, &s); wsp_hash_256_transform(0, 4, (const uint8_t *) input, &s); wsp_hash_256_finalize(&s); printf( "0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x\n", s.state[0], s.state[1], s.state[2], s.state[3], s.state[4], s.state[5], s.state[6], s.state[7] ); input[3]++; i++; } return 0; }

A secure avalanche distribution effect in sequential hash digests is demonstrated with the following test vector.

Input Output 49 48 48 48 0xfd3b8f29 0xbc108515 0x7d1300f6 0xdc97ec52 0x39793ccd 0x096582eb 0x9a23b548 0xe27758c0 49 48 48 49 0x28105ace 0xd0de4f5e 0xa852a3a4 0xf0ee4ac8 0xe7ac2f1b 0x9ae3737b 0x2439457d 0x4b1f47d7 49 48 48 50 0x88173a05 0xc25b7222 0x556b323a 0xf8bbd916 0xcb4a18f0 0xb0e32f22 0xa681bc0b 0xb9fc0092 49 48 48 51 0x3a5d037c 0xc6a98046 0x4d7ca509 0x73311016 0xd1bf2946 0xdd8cb6f5 0x72f70c2e 0x24920843 49 48 48 52 0x4c8e01ee 0x027915ea 0xfad0c690 0xda44b267 0x21a09061 0x5e49daab 0x60725cd2 0x85f51502 49 48 48 53 0xbbe66e09 0x80ccbc7c 0xcb775747 0x9ab491e4 0x87934408 0x9cc91cbe 0xc463f887 0xd6fbb5c3 49 48 48 54 0x143cbd41 0x469763e7 0xaa530e95 0x2427f9ee 0x0c808b94 0x0f5bc093 0x4b41fcb7 0xc27bcfe1 49 48 48 55 0xe44df10e 0x09271a09 0x2f8700b3 0xa5e7214d 0x48b04a97 0xba3bb9fa 0xd6866ec4 0x7b3de9fc 49 48 48 56 0xd0101fee 0x24697cbc 0x732ea7ed 0xb5414169 0x0a352686 0x56800c8b 0x8b2e0a9c 0x158a84ee 49 48 48 57 0xbd7ff0c5 0x8c524145 0x07ac7eff 0x300d917f 0x926a8acf 0x2ddeb1b4 0xbeaf6969 0x0b405341 49 48 48 58 0xd03dbf51 0x9b047980 0x8d3d7faa 0x9fa99c16 0xc7c281cd 0xd8cb50e1 0x781a98b9 0x232bdc32 49 48 48 59 0xddc9d9e8 0x69a34c44 0xe295c0c6 0x3857e769 0x32b7785e 0x01da3827 0x9f37de0b 0x2609d5ef 49 48 48 60 0x32681881 0x878ff77d 0xcff55945 0x6fc75417 0xfd290c87 0x56998f4f 0xd537bd79 0x674b817c 49 48 48 61 0xbabdbe2e 0x125feeb8 0x9cde8b11 0x420543fb 0x126cb238 0xf1dd4cfd 0x9b10c70a 0x5d9db400 49 48 48 62 0xe5c851ca 0xeeea9c31 0x30b0c6f9 0x528868f1 0x615c808d 0x807875fd 0x895f1f1a 0x4da8d19f 49 48 48 63 0x77fb525f 0x79e6c3e8 0x89a8b2ec 0x0a74e715 0xc306173c 0x9d8a3198 0x56a750bb 0x17faa366 49 48 48 64 0xb6c504cc 0x4184e2a8 0xf8c76af8 0x703cc3d9 0x340b9f15 0x27bb8acd 0x88cab9e6 0x95ba38e8 49 48 48 65 0xc1adce6d 0x921d5364 0x968a38f3 0x3cb37a50 0x21fdc1cc 0xa7752459 0xc3083429 0xe893c6a7 49 48 48 66 0x86ecbddb 0x2f037b4e 0xeda355d4 0x8e593c16 0x2c351a61 0xd7f4a43b 0x543e503b 0xf8599195 49 48 48 67 0xe7e2ab2b 0xa1877600 0xc3436eaf 0x6aafff0e 0xfdc2d6de 0xbfb75290 0x832e3b20 0x876e061f 49 48 48 68 0x45f6e0f6 0x37f4a64c 0x1e38c7c0 0x28150f43 0xcff0cde0 0xcdad0e16 0xeb70ad14 0x519632f2 49 48 48 69 0x09b24d07 0x8a9bbe66 0x39d3cf5c 0x3ab3c653 0x70d3f62d 0x70c621aa 0x09876940 0x157173d2 49 48 48 70 0xa0991090 0xf5f778c7 0xe4729e54 0xdd2572a2 0x7551a28d 0x2c09ea17 0x52d1bd95 0xf9b84e0b 49 48 48 71 0x0d2d95c8 0xcfa7855c 0xcd47ba08 0x1fff374f 0x6bb18cd1 0x558dfc5c 0x763a19be 0x6788397b 49 48 48 72 0xe2fe011a 0x05672fe2 0x827dff5a 0xb553288b 0xf32da8e1 0x2f73b9eb 0x64931b00 0x20c5682b

Here's the output test vector with the first byte flipped.

Input Output -50 48 48 48 0xd1b4143d 0x2a9b0233 0x0193a776 0x089f4627 0x1069cfb4 0xb55d7686 0xedd8a2e5 0x3569a51c -50 48 48 49 0xd6184141 0x7a8a202d 0xf4c654f8 0xc70e0547 0x984c94b3 0xadc900ee 0xbd6a6ace 0xbc80123a -50 48 48 50 0x8e75138f 0x59c91ea2 0x4a428694 0x050fe868 0xd2cec6c8 0x283e646e 0x9c3e33a4 0x4b902caf -50 48 48 51 0x8f4b5faa 0xd9b2af0e 0x504b885f 0xa9e8e816 0x818b81f8 0x6b572638 0xb8b689a9 0x9c6f9807 -50 48 48 52 0x9bc7773a 0x3fe675b0 0xd1a2c9cd 0x6a3de34a 0x47457f53 0x9ec90263 0xd107908d 0x5caeb8c4 -50 48 48 53 0x5d7eb93c 0x63d6f3d7 0x8e58d8fa 0x51df443b 0x38874869 0x9a825a23 0xe98e37dc 0xde24349d -50 48 48 54 0x88a57d03 0xb97e982a 0x44626a63 0xeef2dc5a 0x4103fb1c 0xcef51a41 0x2f9e018f 0x8518537f -50 48 48 55 0x616b48fe 0xf52bd9c2 0x7be769d5 0x109e040c 0x3f92220e 0x4e8a3df7 0x48f16592 0x7bcfd3bc -50 48 48 56 0x1abb38dd 0x31887dd2 0xde2984a9 0x0d78d6ad 0x1331bc6c 0x9ad115ca 0xb19dd276 0x84f6c49b -50 48 48 57 0x1006275c 0x0e29f76b 0xde9ffd9b 0xab86d1c5 0x3c2483f4 0x31db3b67 0xbc802fa0 0x45aa1fea -50 48 48 58 0xc7ff1b20 0x86beca11 0x18f4aef5 0x64ed43b3 0xed732bc9 0x227ff131 0x91473698 0xc97939ee -50 48 48 59 0x853c7139 0x8b3df196 0x8ec0ea77 0xbe86e86b 0xc8bb8936 0x03b5142e 0xac87359b 0xf5a14759 -50 48 48 60 0x9841827e 0xf8a8e72c 0xaa37adc0 0xeec6e435 0xb308cce1 0xf8bd0acd 0x84478f65 0x7baedb4a -50 48 48 61 0x86c794b2 0x8c0c8a36 0xcfc4ad1f 0x8b3671c9 0xd8479d4b 0xcb2d5560 0xc1ab9795 0x0cae3c7c -50 48 48 62 0xbe278ee4 0x86e08db5 0x7fc1c901 0x9b66a9dc 0x8f733b77 0x20d0612d 0x987051de 0x51808007 -50 48 48 63 0x58ffd8ab 0x5dc3cd0b 0x3ac3ffae 0x851e1cf4 0xfbc7e0ee 0x0d24e9a8 0xb2c346cb 0xdbc6d834 -50 48 48 64 0x12b9c4db 0x3924dd5d 0x22c21a79 0xed59a847 0x918d3bc4 0x713f5d9c 0x05031328 0x160a0718 -50 48 48 65 0x7a7313d5 0x23151b91 0x561c7248 0x674b2144 0x4b0e8e31 0x914444ec 0x6d7b54f7 0x9edb4f7d -50 48 48 66 0xd8803a97 0xb9917777 0x25aa2605 0xe2f4b94f 0x328a7239 0x25e9f81a 0x5e103e3c 0xb78bdecc -50 48 48 67 0x3cfcca52 0x58cf7196 0x6a426c10 0x9eb7419a 0x9f76dad8 0x206368c6 0x7bf2c819 0xf9ff7011 -50 48 48 68 0xd46ce958 0xdc69a3e7 0xa7964e60 0xaf37f333 0xcedd325c 0x7cf9953b 0xa16f2a41 0xfe6e9be1 -50 48 48 69 0x5f605b6a 0x6e08fe1b 0x38bcd0b4 0x94c29fd1 0x79009feb 0x9ca6cc63 0xfb7509ce 0x2ecd744c -50 48 48 70 0x2d1f58dd 0xfeacff3c 0x91065548 0x75e39a53 0x0b685ffd 0x03295d7b 0xb1702e2e 0xeac2476f -50 48 48 71 0xf1341d9b 0xe2aac7a8 0x167a0e8f 0xb26631b5 0x07286960 0x352cc611 0x861a0c4e 0xa9ba1353 -50 48 48 72 0xaa74e55a 0xc81883f4 0x8a7ed609 0xf159bc13 0x0e1310eb 0x406a8514 0x423e1af3 0x2ff0818e

Here's the output test vector with the second byte flipped.

Input Output 49 -49 48 48 0x57f7d281 0x8a238855 0x056c0dc2 0x0be775aa 0x7111cc87 0x8ba41bcc 0xf65e20d7 0x703cd7ab 49 -49 48 49 0xb1838ece 0xa55a8517 0xee0075c7 0x0bf158df 0x65e1909b 0xc456bc89 0x57a0b6a4 0x72811b59 49 -49 48 50 0x8f2573ec 0x9c33cfb9 0x07f2641a 0x8bcd5c1f 0xb68109cf 0xf564f462 0xa4302db7 0x3b5e7958 49 -49 48 51 0x219f94c2 0x670db217 0xac93a47b 0xec4fcd63 0xb5000a72 0x2920bc89 0xfc2904ff 0xff1532e0 49 -49 48 52 0x805e9ebe 0x57833906 0x3460f4c0 0xcc5e066c 0x81b53084 0xa087f24c 0x30c579b3 0x01670e98 49 -49 48 53 0xd9da02cb 0x937b887b 0xe474162d 0x05ad3f61 0x9adc2ab4 0xa044ec87 0x927efc5c 0x39b5fdb1 49 -49 48 54 0xc7f9a5b4 0xc0f5df5c 0x2b9e3b72 0xb61ef049 0xd6107951 0xe6c7373d 0x4accefbd 0x534227f9 49 -49 48 55 0xca4bdb2d 0xcbd81602 0xd75013fc 0x95043a7c 0x9662dbe9 0x5e147e19 0x26b1d6ec 0x1c2f5a2f 49 -49 48 56 0x11aa1daa 0xe930c5eb 0xb67e98cc 0x71d4a7c3 0xc42aadce 0xd79e5172 0xe5a61687 0x79f2bde8 49 -49 48 57 0x94927e7c 0xc5e19162 0x277d046d 0xd488455f 0x423af9f2 0x993b62ce 0x3ceccfaa 0x260e7455 49 -49 48 58 0x8e2625ad 0x73e7dc23 0xc09b6f19 0xb4415dc5 0x359d66e8 0xe945ac8b 0x48e3059e 0xe384df7f 49 -49 48 59 0x4b8122b9 0x79b99aee 0x81bbedc7 0xc129da9a 0xdc91a584 0xc8f42142 0x24427db1 0xae3e4da4 49 -49 48 60 0x965cc85b 0xd59dbe70 0x15f51c22 0x865ea2e1 0xaa9b325d 0x9b8a8fa6 0xaead5b4e 0x76e3f13c 49 -49 48 61 0x942db99d 0x9077cd87 0x4ba40b83 0x60c5fb35 0xa2bc4dc1 0x1d95c0d4 0x7b12b916 0x2098f45b 49 -49 48 62 0x1460f4c0 0x3954f137 0x6058801d 0x5080337d 0xd5e9291f 0x0e908840 0xd5593aae 0xd2cbfb80 49 -49 48 63 0xed0891cd 0xa0813518 0x11206666 0x6fd715f3 0xae59ba1c 0x18880099 0x5676ca69 0x28b1bffd 49 -49 48 64 0xcf08a4b8 0x19c132ff 0xe02137f8 0x11d70a6f 0xe749eb7c 0x47f85e98 0x71b4c7f0 0xad71c166 49 -49 48 65 0xfa05e318 0x646e0b9c 0x66209161 0x450c14f0 0x1c825f2b 0x0f43f434 0x19ff8bdc 0x3dcca570 49 -49 48 66 0xbcaee35f 0xcbe75a22 0xd5ecdf0e 0x014b2ca8 0x3e3755ab 0xe1756caa 0x40899206 0x80e0217b 49 -49 48 67 0xf08b157c 0xbfad5cd8 0xf63c7a3b 0xc9a699d7 0xc277d3a1 0x61910733 0x9c5025d1 0xf7834877 49 -49 48 68 0x53171088 0x7da0499e 0xc2649f30 0xfad9f358 0x4791d661 0xfd6633e0 0xeb522320 0xfdb08a05 49 -49 48 69 0x87e979bd 0x2a1a57fb 0x40d76095 0x57234570 0xf58309fb 0xc50b51e9 0x090b9a1b 0xaeefa880 49 -49 48 70 0xa51c920d 0x2eb8d99b 0xdb229928 0xd7f4c8ca 0x0dad5bab 0x5bc379e5 0x9ca55073 0xdbc88d40 49 -49 48 71 0xaebe74e1 0xff66759e 0x94829658 0xf6c872bf 0x7f28f7c8 0x5802f3b6 0x44fd9d5e 0xb883803e 49 -49 48 72 0x084d8f2b 0xdaf4c5cd 0x0333b955 0xb99508b9 0x092c5fbc 0xbf0dce17 0x10791235 0x3e6cec55

All input with repeating-character length extension creates a significant avalanche effect on the output as demonstrated with the following test vector.

Input Output "00" 0xf4dd207f 0x80161b76 0x9d856af8 0x3232e40d 0xe79c48de 0x883d6563 0xf7902cab 0x71e1b341 "000" 0x9b5b75ba 0x0154b4e4 0x79954256 0x0283f96d 0x49d68a58 0x874e8943 0xcbecbe97 0x88ec8108 "0000" 0x5e0a7e86 0x4b79236e 0x5818673c 0x091488cf 0x85d630fe 0xd10645b4 0x06d58f64 0x93686469 "00000" 0xcbdde62b 0x2a6c2e27 0x7f18d3d3 0x0ff54668 0xfe2b5474 0xb7b06cb4 0x817613e4 0x3813fe6c "000000" 0x121b7d57 0x015f141f 0x484333a2 0xdc2e53bf 0x0286eb8f 0x7074418e 0xbd1f6dbf 0x2b702111 "00000000" 0xd0a2ce63 0x6ec940d1 0x0d87bbd3 0xe0b0611c 0xfbad5fdb 0xc0817338 0x060dca07 0x744a5e70 "000000000" 0x36923ca7 0xa9441d11 0xf71a6395 0x57069e7a 0x8f410250 0x8811d466 0x6bb104e4 0x9a61490c "0000000000" 0x34744c74 0xfe3f8ecd 0x5580b608 0xf67cffdc 0xbcd8efaa 0x6c1fa58a 0x315174d7 0x93bc2854 "00000000000" 0x7332ef96 0x55c42f62 0x6569a3b0 0x6f314451 0xed157be6 0xeb3bf1ef 0x139f9292 0xffd7f258 "11" 0xf4bdaa6a 0x38df31f8 0x915fb58b 0xbec4e11d 0x8da0506c 0x10268269 0xcca486b8 0x5b5af6fb "111" 0x519c9cda 0x690f9c67 0xa0ac41bd 0x7be67715 0xff9ebd63 0xd1d40d1e 0xadd64153 0x282718bc "1111" 0xeccc84ee 0x3826453a 0x955ead60 0x8e848960 0x644eb42e 0x0126936c 0xdacd080e 0xe6d38e87 "11111" 0xcb401c5b 0x520d51ea 0x657d3728 0x55442ab7 0xb26c1029 0x2f570435 0x0f336a77 0xeb7aa702 "111111" 0xfaf268ec 0xeed18d86 0x7e48330b 0x505c7881 0xa16bf146 0x98316d30 0x59215733 0xa40377dd "1111111" 0xc6a8991a 0x79268f8f 0x86837fed 0xade957da 0xb561bba6 0x1a1174f7 0x36be4323 0x4fae936e "11111111" 0x7d31cfdb 0x6634233e 0x2ce05712 0xb6b3bcf7 0x4a1757aa 0x478cbc2d 0xcaf95b6a 0xed086be8 "111111111" 0x9f6ea23c 0x48ae3a3a 0x21524360 0x40440820 0x1d3b9a88 0x0dd0146d 0x3af96178 0xffadd8ba "1111111111" 0x87942e56 0x3599e6d8 0x09fa6142 0xa3bc9f77 0x09217796 0x55fca641 0x5cdf9e28 0xbe7bf19b "11111111111" 0x500fc875 0xbb46edee 0x37ef210f 0x2a597b39 0x11985639 0x91a525f3 0xaf060286 0xab3a1727

All single-byte input create a significant avalanche effect on the output as demonstrated with the following test vector.

Input Output "0" 0x1ee2215d 0x629f54c2 0x879b7206 0x95920cab 0x8fa4e33f 0x56c75278 0xa064a866 0x0b946f9c "1" 0xc17e6a3d 0x79aa599e 0x39fa1a53 0xef4ff859 0xca0f2149 0xdc9212de 0xc24912b4 0xd8fc7208 "2" 0xf6c07b92 0x26418946 0x24f171e1 0xd5b849d1 0x05233c92 0x11dfc623 0x37fd7b46 0xa6bee50e "3" 0xc7b65619 0x4054e8ad 0x272f4ae5 0xc8b97763 0x21481cf5 0xbb493eb7 0x21fe8c80 0x5ce19cc1 "4" 0x614c3148 0x433b5e55 0x7887be8d 0x5092d034 0x9e56e384 0x3ae240a8 0xe08071fc 0xc850c74c "5" 0x8d9c774d 0xe25de51b 0x6b618753 0x9de48f28 0x34224c4f 0x1d1136fc 0xdeeeee30 0xfb3a9ed8 "6" 0x89d26ff0 0x78f26bd9 0xcb638462 0x390bb389 0x85d72e80 0x949360a5 0x862d3b5b 0xaad06eba "7" 0x8c3d4d9d 0xc03dd2fb 0xb15a0e2b 0x0da33e96 0x181a97f0 0xa26eb61d 0x96a1b1e6 0x709b330e "8" 0xd46ea26b 0x4065e559 0x1fabd1d1 0x61c3131b 0x8c84c81a 0x172c6ee5 0xce9a6f01 0x7612355f "9" 0x622bd467 0xac02911c 0x753771a3 0x22754c24 0x21f98f37 0x06a0b58e 0x211740be 0xeb27004b ":" 0x71f175ac 0x9f15bb9b 0xd42093ac 0x5a0b3986 0xc412d493 0xcc510068 0x3f8c6bb0 0xc0687877 ";" 0xcd129df6 0xf48feb63 0xfe73752e 0xfc9d7b05 0x1853e486 0xb5e1fdbf 0x9746194b 0x4661dd1b "<" 0xbdba45e5 0xa6f3f056 0xb28a3b6f 0x55ed0305 0x58839c1a 0xcfdeedfd 0xa5ae5f81 0xa63e5a65 "=" 0xfbf79d31 0xb73e8b4b 0x4810250a 0xcfc3b8f2 0x83005c09 0xd4f1b899 0xca698f8d 0x5f65048f ">" 0x3931617a 0xe0f1399c 0x7ca3ea04 0x3ccda20c 0x3cc525da 0x082bc040 0x8f3354d5 0x69df2542 "?" 0xce8b9be2 0x8e8c0029 0x520e1c15 0xb53eb229 0xb563df32 0x1b8c8645 0x95b117a3 0x22950e86 "@" 0x3abf91e4 0x9a5992a7 0x5da227a1 0xf938425a 0x537528b1 0x8a5b6c59 0x372955b6 0x72589785 "A" 0x6cdeb8f1 0xe194e9d9 0xa586895f 0x5d83bb8d 0x881d063c 0xbd6ddfe1 0x8bf56117 0x4cb0520c "B" 0x4a372347 0xcd9299ee 0xe44655bf 0x95527029 0x6b99f061 0x6d8d4666 0x93e77ee8 0xae504ad5 "C" 0x9d6d62a0 0xeb26066c 0x830bed03 0xd4fccfb9 0xb197259e 0x616355a2 0x071cb52e 0xdc5e937e "D" 0x5c95c7b9 0x07146f4a 0xbaafb026 0x3e7e509e 0xc7c59e17 0x1a395591 0xa2f8a294 0xedac1a26 "E" 0x7c901ee1 0xad22b0c0 0x428208df 0x48087b0a 0x94fdb07e 0xbbf02ac4 0x8ce84e77 0x19189c65 "F" 0xb58188d4 0x3d94274d 0xf49e2823 0x91285994 0x81e0498a 0x4dccdbde 0x2a9fb355 0x78d9b3ce "G" 0x3cb8811a 0x23ee87ec 0xb15ddad8 0xc5ae051b 0x08cc49c4 0xf5d5c6a5 0xfc61d637 0x228b6e28 "H" 0x86ed7e9b 0xf89240d8 0xe8812513 0x64a9fadf 0x303f3458 0x29eb409b 0x22eeda78 0xb1e845af "I" 0xa12f9977 0x0015204d 0x0e530704 0xcc5d94a2 0xedc7b2b3 0x5a22939b 0x40a78771 0x053b42fa "J" 0xad9f72b9 0x38025756 0xc1fd2625 0xb14fccb3 0x8080143f 0x155f064d 0x9f1ca7f9 0x79d09e89 "K" 0x4ed3c809 0xdf17c851 0xdaa488cb 0x325b846b 0xae60499d 0xdc0dd47f 0xebecdeaa 0x3f8a3250 "L" 0x5be8d75e 0xa7492251 0x1a251d16 0x62b9b2db 0x19e45533 0xd4bbf4dd 0x31f97a65 0x914ea33b "M" 0x8b89a872 0xb2a0f969 0xbfca5d12 0x755b69cb 0xc0737157 0xa9c5cb2c 0x30f6e072 0x4cc09c3b "N" 0xe1d9088d 0x7069a02c 0x07fb7b30 0x2282dd03 0xd40d023b 0x1e99ec25 0xf71ef2a3 0x47b7b602 "O" 0x215b6027 0x9e6cc40f 0x6b1d3d0d 0x096f8139 0xe5033df8 0xe9c17e6c 0x7887e942 0x6c3568ae "P" 0x63838864 0x447643bc 0xe3233f10 0x59a00532 0x4759091d 0x060bb859 0x2e307e75 0x57fef619 "Q" 0x215634fb 0xc4f145d9 0x48676698 0x63de5c7b 0x43c7e584 0x752e80d0 0xa103f299 0xb30bd547 "R" 0x3afe9696 0x259ef62c 0xf55ff7fd 0x30ebd5db 0xaa6c8798 0xe164cb64 0x6d7773e2 0x2a5eaa67 "S" 0x9632f58e 0xbab7fe8e 0xbb7fdce5 0x2c6cc604 0xa0f32720 0x057502c3 0xdb64f7be 0xc4ef2d74 "T" 0xb2b090e1 0x967619ca 0xbefd3699 0x269b202e 0x954984ea 0x7ce92390 0x41505fe8 0x7011bbda "U" 0x36170d15 0xab3bbad4 0x6f9ca741 0x2313e986 0xd782b27c 0x59a43fa2 0xce550cf0 0xa5349e10 "V" 0x891c6f29 0x490a3ae2 0x64280a20 0xc6237439 0x5a166669 0x0829ea38 0x4204b9fa 0x8264c64b "W" 0xca4805d5 0x88d20eec 0x84e81eaf 0xc1212b03 0xa5bf21f6 0xeb5fa882 0x81f92c1e 0xfb47884d "X" 0x8cff5a94 0x79406ffa 0xd3b266d7 0xdd41b45e 0x3d976688 0xc886f669 0xff47cd2c 0xe05fa2fd "Y" 0x1e658de1 0xbe73c567 0xad3a2a3c 0x05b3d4f9 0x26b65474 0x4f218ded 0x98101c93 0xf71b530f "Z" 0xf6b07376 0xdd252b0e 0xbfc0f9ee 0x2fac7c75 0xe3273b70 0xeaff59cf 0xddcd0088 0x9ba8afb7 "[" 0x3c6caed4 0xf04580e0 0x9a47cf73 0x7c03211e 0x50ac91c5 0x362c3431 0x8e1297ac 0x4db7f2f4 "\" 0x69a171fd 0x2db50a48 0x1838b277 0xa9efa2f8 0x0a8f8e4c 0x2379e069 0xf427c2e4 0x3ca00392 "]" 0x66908977 0xaf9e66cb 0xa384307d 0x67bcd4a2 0x7e0a0d69 0x614469f8 0x83e350e0 0xe04c1276 "^" 0xf99b5c92 0x1f0d9a94 0xbe2292aa 0x38f15386 0xefdf1f3a 0x48421ae8 0xa2cd2ded 0xc85dcbb4 "_" 0x93a1c060 0x681cbb98 0x516240c1 0x76173aa7 0x10ce282e 0x02980428 0xae040e06 0x926d9aac "`" 0x99b18c8f 0x08d02fd4 0xde55fb44 0x91684092 0xef25cb43 0x1c23429d 0x3519d2b5 0x0db1ea2c "a" 0x561091d7 0x4b141130 0xfb50e947 0x69b3b8d5 0x92937b52 0xf899fd7d 0x001e2db1 0xc1e482c3 "b" 0x33a34696 0xd6234094 0x74e606ba 0xd1b620d9 0x4f284cab 0xa6159ad6 0x0fce1773 0xbc5b4e64 "c" 0xc4e796a5 0x1a93d915 0x7387faeb 0x55bd1cc2 0x2f2010a6 0x80516989 0x99456eb1 0xbabb76d3 "d" 0x4dc69f5e 0x1956ed48 0x0fcd90fa 0x66a33b0c 0xb92b7468 0xa5efa948 0x389dac23 0xcde898e3 "e" 0x9940fc9d 0x45585236 0x9e10c336 0xecabcf7c 0x7de2f386 0xccafedb7 0x663b0914 0xa6e62187 "f" 0xa0cffec0 0xb0684f82 0x317c0b9b 0x88ade959 0xc360d589 0xce45fd1a 0x5cdde9ed 0x73d34d59 "g" 0x21b55a88 0x12285588 0xc78e1287 0x2cf8a17b 0x1989eb6d 0x7476160f 0x7dffc865 0xca8013b7 "h" 0x424a9aec 0xf7849a83 0x46d94d12 0xa6ac48bd 0x4c0f5b4e 0xd0537715 0x4a878d1e 0x97b4bd94 "i" 0x802e38f2 0xb22c90b0 0xd6fe45fc 0xe98ff10a 0x4cc6a470 0x0f34e7b5 0x15c1d6c7 0xbe106f7b "j" 0xae2a91ab 0xef8112b8 0xf8a3ed0f 0xa977c232 0xe47d8f3d 0x321fb566 0x4de1dab2 0x0bc15723 "k" 0xb179f0ca 0x9691845b 0x575c903b 0x252e0941 0xa31adb4a 0x2ad91b11 0x706f283a 0xc9ef14f3 "l" 0x4d38de15 0x9fca64a8 0xd0e6b113 0xb4fd3680 0x6456ae7b 0x6cd8be4d 0x270a4250 0x44f05d0a "m" 0x03296b55 0x4a5b6d22 0xeeffb035 0xa12afa8e 0x6e8c18f0 0xd5a3a202 0xee7ebfe3 0x4ca48f09 "n" 0x0e7e8256 0xf0eae6ed 0xf83d0a0c 0x82a23683 0x34d7d1fd 0x1a5aba5d 0xa5073c2a 0x1a8d0469 "o" 0x9456c926 0x747bbae4 0x7c28e59c 0xaef20679 0xbcef19f3 0x1a5b882a 0xacd24798 0x62b72c80 "p" 0x4a4a2491 0xffe4ad2b 0xd73b4b31 0x3061e043 0x03270824 0xf2a191ec 0x6684de66 0xdc9506cc "q" 0x573c1452 0x65aa2963 0xf115594a 0xf5bb9cbd 0xfd86d720 0x1da9e7bf 0xb8f04692 0x3b3fc9d7 "r" 0xf226b51b 0xe2dc5137 0x541843f2 0x0867aa96 0x8e939614 0x44ba0686 0x61896e54 0x51ce3352 "s" 0x8888831f 0xcd732fde 0x90361f85 0x1f2d241e 0x26ce4929 0x5b855554 0x0cec3fcc 0x5a498842 "t" 0x96643e50 0x3e0b0407 0x5e258dc4 0x16414ebe 0x9857f53d 0x6b7da140 0x4c7a2591 0x3578b616 "u" 0x8f46ea7e 0x598ed103 0x8b42a75f 0x08b0606f 0x7753d80f 0x5c61df2c 0x2831c462 0x03b6a39c "v" 0xd3f0436a 0xb407260f 0x53904adb 0xd87a4fc2 0x493f7f8b 0x9ae3ec62 0x8890c00b 0xb178338c "w" 0x4193e064 0x27d3ad42 0xcdb80cfd 0x9fbf4be0 0xaa06f50c 0xe66d86ab 0x653e0b0e 0x232daf47 "x" 0xa0f504b4 0x63912b23 0x5ce83466 0xa7228ea4 0xe6e9fe21 0x49d208af 0x65590df1 0xb2c33e1c "y" 0xb41506a9 0xd1ce8a06 0xb01c6894 0x7bb49139 0x213fd043 0xf17a4b43 0xb802abb1 0x468908c7 "z" 0xc870a8eb 0x0adc78a1 0x7f217ff9 0xb0178e20 0x4c9b5da3 0xa06af50a 0x9174dcb1 0x59255878

All input with repeated 0 bytes creates a significant avalanche effect as shown in the following test vector.

Input Output 0 0 0 0 0 0 0 0 0 0 0x35febccf 0x6e59cbb0 0x9f111ffc 0x46cc5edb 0x1ea95e01 0xda0dbe6a 0xc84f9f2b 0xedb26c1a 0 0 0 0 0 0 0 0 0 1 0xb7b3c536 0xa7b93fb3 0x786118d9 0x242efa4b 0x5f930dff 0xe6489dc2 0x2339ccc7 0x0d112545 0 0 0 0 0 0 0 0 0 2 0x7fc297e6 0x1e378d55 0x2e466fd7 0xff6de849 0x4a9c7836 0xf714f8fe 0x1708f26e 0x9a8630f4 0 0 0 0 0 0 0 0 0 3 0xa489aa67 0x88cf8179 0x24ab27fc 0x5ac3acc6 0xd05e7972 0x6e53c19e 0x0f832733 0x9718bd9b 0 0 0 0 0 0 0 0 0 4 0xc34a51aa 0xe9a13a99 0x68873609 0x50e6c4e8 0x290a113f 0x1e2e1ac7 0x6291d3e3 0x2be04d1a 0 0 0 0 0 0 0 0 0 5 0xb83e72c9 0x92c7bf74 0x45ec8908 0x64525d8c 0xf0e09cb1 0xd8229e52 0x34ee7d31 0x2035b8e5 0 0 0 0 0 0 0 0 0 6 0x875ab10d 0xc45b57fb 0x70d37743 0xc66eba3b 0x79203440 0x4ffb2c79 0x26826769 0x6b329347 0 0 0 0 0 0 0 0 0 7 0xce0987fb 0x82d2e246 0x34e460f8 0x2fa14218 0xc94776ca 0x13c14d76 0x5639bd79 0x794e6731 0 0 0 0 0 0 0 0 0 8 0x3efee461 0x68edeb80 0xa32d5f22 0x0c52ddea 0x08927108 0xec520b33 0x9715698c 0x34a08e2b 0 0 0 0 0 0 0 0 0 9 0x66f4b865 0xa2b605f1 0x46601b58 0x668c4d5a 0x318aae89 0xe2134e0d 0xb32cc680 0x7f34d5fb 0 0 0 0 0 0 0 0 0 10 0xdd7d069e 0xf795ffd7 0x038abeaf 0x70859548 0x168a10f9 0xde0abda6 0x721b114b 0xa33ebe9b 0 0 0 0 0 0 0 0 0 11 0x5d8d7546 0xcf95c9ae 0x7780bf79 0x09799f3f 0x1dfc63bc 0xbe07ed78 0xb4e36e17 0xfd172e5a 0 0 0 0 0 0 0 0 0 12 0xa3550545 0xde9b3a57 0xbf4a2012 0xa7485571 0xdc9f94f6 0xeeea0698 0x9fa3e997 0x58b9f5d3 0 0 0 0 0 0 0 0 0 13 0xb3abcbf3 0x1353f0f9 0x74f0c382 0x74965903 0xe31bd418 0xc434f961 0x6c893a46 0x1a6d6e62 0 0 0 0 0 0 0 0 0 14 0x330e6bb5 0x7981b325 0x5f990516 0x1ee66a1e 0xc333fab1 0xe5375c5b 0x2cf1195e 0x5a8c43d2 0 0 0 0 0 0 0 0 0 15 0x600ceccd 0x16a9eba7 0x8c20bc80 0xd155d328 0x906bec60 0x0dcfff05 0xc5f3b39f 0x6cc3d72f 0 0 0 0 0 0 0 0 0 16 0xf2da7b7e 0x33220ce3 0xc61f8886 0xaf2efc41 0x13c7b419 0x12c9f0ed 0xb73eb2c5 0x8082d87a 0 0 0 0 0 0 0 0 0 17 0x81583848 0xf2e2c649 0xc71ae6d4 0x8ce69239 0x2f9ea474 0x2bf81255 0x497eafc0 0xf4f56fa2 0 0 0 0 0 0 0 0 0 18 0x406faf95 0xeea99805 0xe595186d 0xadfdb5a1 0x143a2a56 0x62d9cb6b 0x7000e0f9 0xfb3335f2 0 0 0 0 0 0 0 0 0 19 0xb2e16821 0x7f00a747 0x41b92e37 0xfe36062e 0xfaa27911 0x5f95a2ed 0xd3b374fc 0xbffa1b57 0 0 0 0 0 0 0 0 0 20 0x9beb3c14 0xed5e4927 0xffc9887c 0x82abe45c 0xc68b8f12 0xd4607704 0xb9cc30de 0xe1cd1900 1 0 0 0 0 0 0 0 0 0 0xdb8a5571 0x376ed859 0xf53f9ac0 0xb1a8d47d 0x77f29c85 0xb74e57cd 0xe7f567e7 0x4e21593a 2 0 0 0 0 0 0 0 0 0 0x5fd5f694 0x535d7478 0x498b5427 0xc6b65520 0xf228d743 0xcd1feca9 0x298c45c4 0xe622d6a3 3 0 0 0 0 0 0 0 0 0 0xfe30833d 0x0b6f7c64 0x223e2be8 0x580a8c9c 0x3bec681d 0x4d59d2ff 0x8adde47b 0xa64ca9e6 4 0 0 0 0 0 0 0 0 0 0xe5119770 0x8dd48dfd 0x18fca5da 0x002d3432 0xaa51949c 0x8531e944 0x12d505ea 0xf290c521 5 0 0 0 0 0 0 0 0 0 0x1a6c402f 0x1417ceef 0x3a8e68d0 0x9d16cc62 0x2787014d 0x859e9c94 0x951ec48b 0x38ef56b6 6 0 0 0 0 0 0 0 0 0 0xc271c006 0xdfabdf58 0x78d1d5d0 0x622dea77 0xf6865cf1 0x78681e1f 0x2f88a9f5 0x8d03e34a 7 0 0 0 0 0 0 0 0 0 0xc697d3d2 0x53b83bd8 0x8f461af2 0xdadd9d55 0x8f518a92 0xd8c930a0 0x5e2f299d 0xe4342f11 8 0 0 0 0 0 0 0 0 0 0xc467b1e5 0xfacea0f3 0x1f22dbb5 0xf8107c2a 0x8e59df5b 0xc64d4eaf 0xa1b74a0d 0xb3e2336e 9 0 0 0 0 0 0 0 0 0 0x50dae866 0x2412f54b 0x4d7cf1cc 0x2db6bd38 0x7da6b2d9 0x2b0f92ce 0x135242c0 0x90b78cce 10 0 0 0 0 0 0 0 0 0 0x696d6d3a 0x64de567d 0xe191dac0 0xda44fc26 0xc20c16de 0xcb36b5c0 0x23cb402d 0xb0ce20e5 11 0 0 0 0 0 0 0 0 0 0x5862f61d 0xadb03d2a 0x44a46b1d 0xdb2599e2 0x5dc0ccff 0xf83614ff 0x33b46a7c 0x0b260fda 12 0 0 0 0 0 0 0 0 0 0x195cd8ce 0xf4fdf3b0 0x1504272c 0x0e1d4229 0x4ba135a3 0x13645f0e 0xac363fd9 0x788c8f85 13 0 0 0 0 0 0 0 0 0 0xb0743194 0x4f0ca764 0x38eddf51 0x05b9b46f 0x36320658 0x07b3a1c3 0xfc31ec09 0x48deb4ec 14 0 0 0 0 0 0 0 0 0 0xfda7cf51 0xfbd8df3c 0xe149bcfd 0xd5fb5eb0 0x740b2155 0x97c6932c 0x090c2b66 0x6dd09434 15 0 0 0 0 0 0 0 0 0 0xaa3a7598 0x197f5578 0xdafb1ddc 0x09fdbef4 0x79e5614a 0xda9bedeb 0x3cdf9148 0x9f343609 16 0 0 0 0 0 0 0 0 0 0x8438d844 0x5e762dc3 0x3f4da379 0x4119997e 0x8298bbfe 0x1728d2d8 0xad2e0a7c 0x5fe23079 17 0 0 0 0 0 0 0 0 0 0xdaafa22a 0xd07695f2 0xc559b770 0x390bd166 0x855290ec 0x7da35cf4 0x1fb70396 0xa6a08038 18 0 0 0 0 0 0 0 0 0 0x1bb9f5d8 0xbf87056f 0x5228d60c 0xd440bb6a 0xb6ea4ae1 0x4db85249 0xc939cf49 0x2fb7219a 19 0 0 0 0 0 0 0 0 0 0x46cec438 0x95d5f2e4 0xebe6bda3 0x26390dfa 0x1e1681af 0x64bce607 0xa6ebda56 0x9861fd19 20 0 0 0 0 0 0 0 0 0 0xa1d5d2fe 0x9b1a3d07 0x851a1be5 0x76d51c54 0xfe4070e8 0xe19fcf37 0x53f1373e 0x31e6202b 0 0 0 0 0 0 0 0 0 0 0x889f9953 0x992650db 0x50f08730 0xdf2bfc22 0x85a4fb95 0xe95d60a1 0x15739d78 0x9033a361 1 0 0 0 0 0 0 0 0 0 0x05c17f48 0x46730980 0xc3f93b1a 0x6d9fab1b 0xc79068e9 0x09571da5 0xc4e707ca 0x4da5c7a7 2 0 0 0 0 0 0 0 0 0 0xd9341e71 0x9d3e3dbc 0x9e62f108 0x02e38157 0xfe74ff68 0x01e4f438 0xac74ea0b 0x03fac304 3 0 0 0 0 0 0 0 0 0 0x11d63a0b 0x0126afe2 0x44820d6e 0xb357b72b 0x5212d7d7 0x8a83f01f 0x7f9fba36 0xbb10c1cc 4 0 0 0 0 0 0 0 0 0 0x75c59305 0x8e57c5a0 0x32ea8214 0x4624b47e 0x830d4d9d 0x982e45e5 0x84a31f1b 0x9c880e46 5 0 0 0 0 0 0 0 0 0 0xe65b4ac8 0x8051e1b9 0x3e77ec86 0x6dbd530b 0x8f65088b 0xb86146f8 0x1a64614d 0xae7a69da 6 0 0 0 0 0 0 0 0 0 0x8e919b03 0x87aa49f0 0x03944c6d 0x94fd9a76 0x83bc929f 0xc182a35f 0xa3dc0c13 0x960e3012 7 0 0 0 0 0 0 0 0 0 0x28c64107 0xecfec00f 0x59fcdbe2 0x8bb58b0e 0xc391209f 0x23b525be 0x72ecfafb 0x82598324 8 0 0 0 0 0 0 0 0 0 0xdff638b5 0xf2c13934 0x11525d57 0x4b18c784 0x667f5dd2 0xf7c4e7e1 0x6f31e500 0x6848657d 9 0 0 0 0 0 0 0 0 0 0x31c578f3 0x2048ff60 0xd9318eba 0x8a3caf11 0x46b5ff3c 0x8fe389be 0xa71d34a4 0x1be1f701 10 0 0 0 0 0 0 0 0 0 0x00be4390 0xfbf02ac4 0x67b66606 0x2dc515d3 0x145142cd 0x29642f0f 0xe58780a5 0xa5c3bbe2 11 0 0 0 0 0 0 0 0 0 0xdc48fbe6 0x10e31eaa 0x30f48375 0x3e1a297d 0x34e49020 0xb213816e 0xae544557 0xe8e9e3b3 12 0 0 0 0 0 0 0 0 0 0xb16836f7 0x2cb2ee8d 0xb70efce9 0x2e04877f 0xe496fea4 0xc922802f 0xdbf47ca8 0x08510a07 13 0 0 0 0 0 0 0 0 0 0x2f8e4e79 0x40b7f489 0xdaf385b0 0xeb2f6285 0x7a7d99c3 0x412029c6 0x3e403899 0x3c2897e8 14 0 0 0 0 0 0 0 0 0 0xd9f4b27b 0x2c592508 0x5d6f6285 0x7296ecdc 0xe64498fe 0x53f241f6 0xed0816e8 0xc18de9e9 15 0 0 0 0 0 0 0 0 0 0xea0bf2bd 0xbbd96371 0x417de91d 0x476be679 0xf76897f4 0x2257e554 0x71919f98 0x4ee5e9a9 16 0 0 0 0 0 0 0 0 0 0xb2528721 0xc22cb863 0xa67c034f 0xff2225fa 0xcae9eef6 0x4b5208cc 0xed7e9231 0x657dbc50 17 0 0 0 0 0 0 0 0 0 0x861ad1a7 0xe6e6d2dc 0x3f974c19 0x0a70db00 0x345f6d55 0x818228cf 0xe5147241 0x645cf500 18 0 0 0 0 0 0 0 0 0 0xcea9e913 0x7c9cf834 0x7606c82e 0x7f25a289 0xb03f1a2b 0x163d3d9d 0xc5983058 0x1e0cf36b 19 0 0 0 0 0 0 0 0 0 0x5367fb31 0x6ab81bd4 0x46048510 0xcf1bea6f 0x6823c82f 0x57640308 0xa55fb02d 0x8d7ecd39 20 0 0 0 0 0 0 0 0 0 0xb8123a72 0x4b56b72d 0xfaa34c7c 0x299e0daa 0x0f5a7d7c 0xcc8cd827 0xe0d102de 0xd9ad3023

Empty input hashes to a non-empty digest.

Input Output "" 0xe6a95645 0x528b3767 0x51068b70 0xc1a24b2d 0x631b1cca 0x468e0f7f 0x317a376c 0xa7bd7646

It was tested with the following file-based collision testing code to prove the absence of trivially-found collisions as a security vulnerability.

#include <stdio.h> #include "wsp_hash_256.h" int main(void) { FILE *file; struct wsp_hash_256_s s; int8_t input[4] = {0, 0, 0, 0}; char digest[65]; char i = -128; char j; char k; char l; while (i != 127) { j = -128; while (j != 127) { k = -128; while (k != 127) { l = -128; while (l != 127) { input[0] = i; input[1] = j; input[2] = k; input[3] = l; wsp_hash_256_initialize(4, (const uint8_t *) input, &s); wsp_hash_256_transform(0, 4, (const uint8_t *) input, &s); wsp_hash_256_finalize(&s); sprintf( digest, "%08x%08x%08x%08x%08x%08x%08x%08x", state[0], state[1], state[2], state[3], state[4], state[5], state[6], state[7] ); file = fopen(digest, "rb"); if (file == NULL) { file = fopen(digest, "wb"); if (file != NULL) { fclose(file); } } else { printf( "Input %02x %02x %02x %02x %02x collides with another input.", input[0], input[1], input[2], input[3], input[4] ); fclose(file); } l++; } k++; } j++; } i++; } return 0; }

As with every cryptographic hashing algorithm, collisions are statistically-possible and it's not verified as 100% collision-proof, although it passes all extended 256-bit SMHasher "excessive torture" tests without using an auxiliary seed.

Each 32-bit state segment passes the first few tests when testing distribution with Diehard and PractRand.

Each 32-bit state segment passes both the first few PractRand tests and Diehard tests with the following birthday spacing results from the aforementioned incrementing input attack pattern.

Segment P-Value Delta From Adjacent Segment state[0] 0.66460012 +0.00000000 state[1] 0.55493620 -0.10966392 state[2] 0.84028490 +0.28534870 state[3] 0.00322349 -0.83706141 state[4] 0.26841025 +0.26518676 state[5] 0.67389158 +0.40548133 state[6] 0.84343940 +0.16954782 state[7] 0.71425794 -0.12918146

Furthermore, when new prime number increment patterns are discovered, they have no effect on the cryptographic security properties of this hashing algorithm.

All additive constants and shift values in this hashing algorithm are composite numbers. The decrementing shift operand values in the finalization loop are 24, 21, 18, 15 and 12, all of which are spread evenly between 0 and 32 for the best digest distribution results.

There's a pattern in prime numbers when any set of adjacent prime numbers span a gap sized at a multiple of 10.

In a set of 3 adjacent prime numbers a b c, and when a and c have the difference of 10, b is the result of incrementing by either 4 or 6.

The first occurrence of this pattern, starting from the first prime number in ascending order, is 19 23 29.

There are several other patterns, for example, in a set of adjacent prime numbers a b c d and when a and d have the difference of 10, the difference of b and c is 2.

The first occurrence of this pattern, starting from the first prime number in ascending order, is 7 11 13 17.

The following prime number generator code validates this for the first 20k primes.

#include <stdbool.h> #include <stdio.h> int main(void) { unsigned int primes[20000]; unsigned int dividend = 3; unsigned int divisor; unsigned short gap_occurrences_count = 0; unsigned short i = 1; bool is_prime; bool is_pattern = true; while (i != 20000) { divisor = 3; is_prime = true; while ( dividend != divisor && is_prime == true ) { if ((dividend % divisor) == 0) { is_prime = false; } divisor += 2; } if (is_prime == true) { primes[i] = divisor; i++; } dividend += 2; } while (i != 9) { i--; if ((primes[i] - 10) == primes[i - 2]) { gap_occurrences_count++; if ( (primes[i - 1] + 4) != primes[i] && (primes[i - 1] + 6) != primes[i] ) { is_pattern = false; } } } if (is_pattern == true) { printf( "The prime number pattern is consistent among %u gap occurences.", gap_occurrences_count ); } else { printf( "The prime number pattern is inconsistent among %u gap occurences.", gap_occurrences_count ); } return 0; }

Of the 20k primes, there are 1120 occurrences of the aforementioned pattern.

The following is a visualization of the first 100 occurences and their increments.

19 +4 23 +6 29 31 +6 37 +4 41 43 +4 47 +6 53 61 +6 67 +4 71 73 +6 79 +4 83 79 +4 83 +6 89 127 +4 131 +6 137 157 +6 163 +4 167 163 +4 167 +6 173 229 +4 233 +6 239 271 +6 277 +4 281 349 +4 353 +6 359 373 +6 379 +4 383 379 +4 383 +6 389 433 +6 439 +4 443 439 +4 443 +6 449 499 +4 503 +6 509 607 +6 613 +4 617 643 +4 647 +6 653 673 +4 677 +6 683 733 +6 739 +4 743 751 +6 757 +4 761 937 +4 941 +6 947 967 +4 971 +6 977 1009 +4 1013 +6 1019 1093 +4 1097 +6 1103 1213 +4 1217 +6 1223 1279 +4 1283 +6 1289 1291 +6 1297 +4 1301 1429 +4 1433 +6 1439 1489 +4 1493 +6 1499 1543 +6 1549 +4 1553 1549 +4 1553 +6 1559 1597 +4 1601 +6 1607 1609 +4 1613 +6 1619 1657 +6 1663 +4 1667 1777 +6 1783 +4 1787 1861 +6 1867 +4 1871 1987 +6 1993 +4 1997 2131 +6 2137 +4 2141 2203 +4 2207 +6 2213 2287 +6 2293 +4 2297 2341 +6 2347 +4 2351 2347 +4 2351 +6 2357 2371 +6 2377 +4 2381 2383 +6 2389 +4 2393 2389 +4 2393 +6 2399 2437 +4 2441 +6 2447 2467 +6 2473 +4 2477 2539 +4 2543 +6 2549 2677 +6 2683 +4 2687 2689 +4 2693 +6 2699 2791 +6 2797 +4 2801 2833 +4 2837 +6 2843 2851 +6 2857 +4 2861 2953 +4 2957 +6 2963 3079 +4 3083 +6 3089 3181 +6 3187 +4 3191 3313 +6 3319 +4 3323 3319 +4 3323 +6 3329 3529 +4 3533 +6 3539 3607 +6 3613 +4 3617 3613 +4 3617 +6 3623 3691 +6 3697 +4 3701 3793 +4 3797 +6 3803 3907 +4 3911 +6 3917 3919 +4 3923 +6 3929 4003 +4 4007 +6 4013 4129 +4 4133 +6 4139 4441 +6 4447 +4 4451 4447 +4 4451 +6 4457 4507 +6 4513 +4 4517 4639 +4 4643 +6 4649 4723 +6 4729 +4 4733 4789 +4 4793 +6 4799 4933 +4 4937 +6 4943 4993 +6 4999 +4 5003 4999 +4 5003 +6 5009 5077 +4 5081 +6 5087 5407 +6 5413 +4 5417 5431 +6 5437 +4 5441 5521 +6 5527 +4 5531 5563 +6 5569 +4 5573 5641 +6 5647 +4 5651 5683 +6 5689 +4 5693 5839 +4 5843 +6 5849 5851 +6 5857 +4 5861 5857 +4 5861 +6 5867 6037 +6 6043 +4 6047 6043 +4 6047 +6 6053 6211 +6 6217 +4 6221 6571 +6 6577 +4 6581 6907 +4 6911 +6 6917 6961 +6 6967 +4 6971 6967 +4 6971 +6 6977 6991 +6 6997 +4 7001 7237 +6 7243 +4 7247 7243 +4 7247 +6 7253 7477 +4 7481 +6 7487 7537 +4 7541 +6 7547

Additional sub-patterns among these patterns could suggest the existence of undiscovered vulnerabilities in SHA-256 and other cryptographic hashing algorithms relying on the security properties of prime number derivatives.

Further analyses of these patterns could result in a prime number increment formula to optimize primality testing computations and redefine the principles of cryptographic security and mathematics.

The lack of initialized additive prime-based constant arrays and fixed-length padding schemes present in other cryptographic hashing algorithms reduces the possibility of digest patterns and decryption methods to weaken or break cryptographic security.

To support this notion, 32-bit digest segments were tested in PractRand for bit distribution quality with input data sizes from 1 MB up to 32 MB.

The following benchmarking template uses sequential 4-byte data inputs padded to segments divisible by 64.

The input values are incremented by either 4 or 6 and the padding integer is 10, all of which are numbers derived from the aforementioned pattern in prime numbers.

#include <stdio.h> #include "wsp_hash_256.h" int main(void) { struct wsp_hash_256_s s; static uint8_t input[512]; unsigned short i = 0; unsigned short j; unsigned short k; unsigned short l; unsigned short m; while (i != 512) { input[i] = 10; i++; } i = 0; while (i < 255) { j = 0; while (j < 255) { k = 0; while (k < 255) { l = 0; while (l < 255) { input[0] = l; input[1] = j; input[2] = k; input[3] = i; m = 512; while (m != 0) { wsp_hash_256_initialize(m, (const uint8_t *) input, &s); wsp_hash_256_transform(0, m, (const uint8_t *) input, &s); wsp_hash_256_finalize(&s); fwrite(&(state[0]), sizeof(state[0]), 1, stdout); m -= 64; } l += 4; } k += 6; } j += 4; } i += 6; } return 0; }

Of the 48 exhaustive PractRand tests, there were 8x more 32-bit pattern anomalies in SHA-256.

All speed tests were performed locally on a Pixelbook Go M3 using Debian.

It may be suitable for cryptographic applications, but it hasn't received NIST analysis results or approval.

Games

ContrivityContrivity Icon

Contrivity

Spawn into the hostile quantum laboratory and destroy wave after wave of oscillations.