Skip to content
Merged

Oldv #129

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ABC

This file was deleted.

Binary file modified docs/rain.wasm
Binary file not shown.
1 change: 1 addition & 0 deletions js/.mark
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Thu Jan 9 19:29:56 CST 2025
14 changes: 7 additions & 7 deletions js/lib/api.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ export let rain = { loaded: false };


const STORM_TV = [
["0ec74bfcbbc1e74f7e3f6adc47dc267644a2071f2d8f4fc931adb96b864c0a5a", ""],
["379bd2823607188d1a2f8c5621feda9002dc8ff1f0cc9902d55d6c99a6488240", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"],
["600e741274ca196710064e3d8e892bebce5c9ec47944dbf0f56608a5cb21748a", "The quick brown fox jumps over the lazy dog"],
["cfb961820b823c889e03ca79d130eb2d919a38f947e68745349a73e2f43f7392", "The quick brown fox jumps over the lazy cog"],
["9161d399ef638b837b821631847aa6603edb66ad16e14e25f9f96d119bebca1b", "The quick brown fox jumps over the lazy dog."],
["eaf60e7a4817e110d21b5d7888e0993f7ce4c4317ad168e47370cb67d053e41a", "After the rainstorm comes the rainbow."],
["e2490c856a9f5086a896d2eba9b640e38c8ac8c234e769fb7b8ddd9f112a1727", "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"],
[ "e3ea5f8885f7bb16468d08c578f0e7cc15febd31c27e323a79ef87c35756ce1e", ""],
[ "9e07ce365903116b62ac3ac0a033167853853074313f443d5b372f0225eede50", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"],
[ "f88600f4b65211a95c6817d0840e0fc2d422883ddf310f29fa8d4cbfda962626", "The quick brown fox jumps over the lazy dog"],
[ "ec05208dd1fbf47b9539a761af723612eaa810762ab7a77b715fcfb3bf44f04a", "The quick brown fox jumps over the lazy cog"],
[ "822578f80d46184a674a6069486b4594053490de8ddf343cc1706418e527bec8", "The quick brown fox jumps over the lazy dog."],
[ "410427b981efa6ef884cd1f3d812c880bc7a37abc7450dd62803a4098f28d0f1", "After the rainstorm comes the rainbow."],
[ "47b5d8cb1df8d81ed23689936d2edaa7bd5c48f5bc463600a4d7a56342ac80b9", "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"],
];

const BOW_TV = [
Expand Down
14 changes: 7 additions & 7 deletions js/rainsum.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ import {

const testVectors = {
rainstorm: [
[ "0ec74bfcbbc1e74f7e3f6adc47dc267644a2071f2d8f4fc931adb96b864c0a5a", "" ],
[ "379bd2823607188d1a2f8c5621feda9002dc8ff1f0cc9902d55d6c99a6488240", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ],
[ "600e741274ca196710064e3d8e892bebce5c9ec47944dbf0f56608a5cb21748a", "The quick brown fox jumps over the lazy dog" ],
[ "cfb961820b823c889e03ca79d130eb2d919a38f947e68745349a73e2f43f7392", "The quick brown fox jumps over the lazy cog" ],
[ "9161d399ef638b837b821631847aa6603edb66ad16e14e25f9f96d119bebca1b", "The quick brown fox jumps over the lazy dog." ],
[ "eaf60e7a4817e110d21b5d7888e0993f7ce4c4317ad168e47370cb67d053e41a", "After the rainstorm comes the rainbow." ],
[ "e2490c856a9f5086a896d2eba9b640e38c8ac8c234e769fb7b8ddd9f112a1727", "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" ]
[ "e3ea5f8885f7bb16468d08c578f0e7cc15febd31c27e323a79ef87c35756ce1e", ""],
[ "9e07ce365903116b62ac3ac0a033167853853074313f443d5b372f0225eede50", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"],
[ "f88600f4b65211a95c6817d0840e0fc2d422883ddf310f29fa8d4cbfda962626", "The quick brown fox jumps over the lazy dog"],
[ "ec05208dd1fbf47b9539a761af723612eaa810762ab7a77b715fcfb3bf44f04a", "The quick brown fox jumps over the lazy cog"],
[ "822578f80d46184a674a6069486b4594053490de8ddf343cc1706418e527bec8", "The quick brown fox jumps over the lazy dog."],
[ "410427b981efa6ef884cd1f3d812c880bc7a37abc7450dd62803a4098f28d0f1", "After the rainstorm comes the rainbow."],
[ "47b5d8cb1df8d81ed23689936d2edaa7bd5c48f5bc463600a4d7a56342ac80b9", "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"],
],
rainbow: [
[ "9af7f7b2faaf87e9da4fe493916a78567ec2284018028a5df78968e351cc6dda", "" ],
Expand Down
Binary file modified js/wasm/rain.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion src/rainbow.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define __RAINBNOWVERSION__ "3.0.0"
#define __RAINBNOWVERSION__ "3.1.0"
// includes the complete flow via mixB in response to a lack of backwards flow identified by Reiner Pope
#include <cstdint>
#include <cstdlib>
Expand Down
10 changes: 5 additions & 5 deletions src/rainstorm.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define __STORMVERSION__ "3.0.0"
#define __STORMVERSION__ "3.1.1"
// v2 is NIS2-v1 - non invertible state, v1 - passess all normal smhasher tests. BadSeeds not tested yet.
// includes a compress step on each ingest to make it harder to invert the state even given knowledge of it

Expand Down Expand Up @@ -132,7 +132,7 @@ namespace rainstorm {
weakfunc(this->h, temp, i & 1);
}

compress1(this->h, this->start, seed);
//compress1(this->h, this->start, seed);

chunk += 64;
chunk_len -= 64;
Expand All @@ -147,7 +147,7 @@ namespace rainstorm {
// temp[lenRemaining >> 3] |= (uint64_t)(lenRemaining << ((lenRemaining&7)*8));
// was removed in Frank's code.

compress1(this->h, this->start, seed);
//compress1(this->h, this->start, seed);

for (int i = 0; i < ROUNDS; i++) {
weakfunc(this->h, temp, i & 1);
Expand Down Expand Up @@ -234,7 +234,7 @@ namespace rainstorm {
weakfunc(h, temp, i & 1);
}

compress1(h, start, seed);
//compress1(h, start, seed);

data += 64;
lenRemaining -= 64;
Expand All @@ -245,7 +245,7 @@ namespace rainstorm {
// Frank's fix: remove the length encoding line that can cause issues
// temp[lenRemaining >> 3] |= (uint64_t)(lenRemaining << ((lenRemaining&7)*8));

compress1(h, start, seed);
//compress1(h, start, seed);

for (int i = 0; i < ROUNDS; i++) {
weakfunc(h, temp, i & 1);
Expand Down
2 changes: 1 addition & 1 deletion src/tool.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#define VERSION "3.0.0"
#define VERSION "3.1.0"
#include <atomic> // for std::atomic
#include <iostream>
#include <array>
Expand Down
42 changes: 21 additions & 21 deletions verification/vectors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ b669467111c6fda5b5aadb8c290ef033e66be5241276a199cb10fc442c34cbe7 "The quick brow
f7f217751f5940df46fafd1b1edbd1fc8d1398d3bac00385582cefce03016ab2 "After the rainstorm comes the rainbow."
5b6217ce8fff616a75207982644a8dbbe5f235370e9178b801f329eac511c8f6 "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
Rainstorm test vectors:
0ec74bfcbbc1e74f7e3f6adc47dc267644a2071f2d8f4fc931adb96b864c0a5a ""
379bd2823607188d1a2f8c5621feda9002dc8ff1f0cc9902d55d6c99a6488240 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
600e741274ca196710064e3d8e892bebce5c9ec47944dbf0f56608a5cb21748a "The quick brown fox jumps over the lazy dog"
cfb961820b823c889e03ca79d130eb2d919a38f947e68745349a73e2f43f7392 "The quick brown fox jumps over the lazy cog"
9161d399ef638b837b821631847aa6603edb66ad16e14e25f9f96d119bebca1b "The quick brown fox jumps over the lazy dog."
eaf60e7a4817e110d21b5d7888e0993f7ce4c4317ad168e47370cb67d053e41a "After the rainstorm comes the rainbow."
e2490c856a9f5086a896d2eba9b640e38c8ac8c234e769fb7b8ddd9f112a1727 "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
e3ea5f8885f7bb16468d08c578f0e7cc15febd31c27e323a79ef87c35756ce1e ""
9e07ce365903116b62ac3ac0a033167853853074313f443d5b372f0225eede50 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
f88600f4b65211a95c6817d0840e0fc2d422883ddf310f29fa8d4cbfda962626 "The quick brown fox jumps over the lazy dog"
ec05208dd1fbf47b9539a761af723612eaa810762ab7a77b715fcfb3bf44f04a "The quick brown fox jumps over the lazy cog"
822578f80d46184a674a6069486b4594053490de8ddf343cc1706418e527bec8 "The quick brown fox jumps over the lazy dog."
410427b981efa6ef884cd1f3d812c880bc7a37abc7450dd62803a4098f28d0f1 "After the rainstorm comes the rainbow."
47b5d8cb1df8d81ed23689936d2edaa7bd5c48f5bc463600a4d7a56342ac80b9 "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
JavaScript/WASM test vectors
Rainbow test vectors:
9af7f7b2faaf87e9da4fe493916a78567ec2284018028a5df78968e351cc6dda ""
4bb4b7dbc4bd78f011c9f41293564abb79f12da16bac056c98aa68fe1c3eed8f "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
f652f20dbd02240238372c8eace0215549a02552bb2eac31bf802fbfa58f5546 "The quick brown fox jumps over the lazy dog"
da30e89eab4bd6300211d53d9edd5a8bb523528b722b7db46e8876550cdc95f7 "The quick brown fox jumps over the lazy cog"
b669467111c6fda5b5aadb8c290ef033e66be5241276a199cb10fc442c34cbe7 "The quick brown fox jumps over the lazy dog."
f7f217751f5940df46fafd1b1edbd1fc8d1398d3bac00385582cefce03016ab2 "After the rainstorm comes the rainbow."
5b6217ce8fff616a75207982644a8dbbe5f235370e9178b801f329eac511c8f6 "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
9af7f7b2faaf87e9da4fe493916a78567ec2284018028a5df78968e351cc6dda ""
4bb4b7dbc4bd78f011c9f41293564abb79f12da16bac056c98aa68fe1c3eed8f "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
f652f20dbd02240238372c8eace0215549a02552bb2eac31bf802fbfa58f5546 "The quick brown fox jumps over the lazy dog"
da30e89eab4bd6300211d53d9edd5a8bb523528b722b7db46e8876550cdc95f7 "The quick brown fox jumps over the lazy cog"
b669467111c6fda5b5aadb8c290ef033e66be5241276a199cb10fc442c34cbe7 "The quick brown fox jumps over the lazy dog."
f7f217751f5940df46fafd1b1edbd1fc8d1398d3bac00385582cefce03016ab2 "After the rainstorm comes the rainbow."
5b6217ce8fff616a75207982644a8dbbe5f235370e9178b801f329eac511c8f6 "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
Rainstorm test vectors:
0ec74bfcbbc1e74f7e3f6adc47dc267644a2071f2d8f4fc931adb96b864c0a5a ""
379bd2823607188d1a2f8c5621feda9002dc8ff1f0cc9902d55d6c99a6488240 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
600e741274ca196710064e3d8e892bebce5c9ec47944dbf0f56608a5cb21748a "The quick brown fox jumps over the lazy dog"
cfb961820b823c889e03ca79d130eb2d919a38f947e68745349a73e2f43f7392 "The quick brown fox jumps over the lazy cog"
9161d399ef638b837b821631847aa6603edb66ad16e14e25f9f96d119bebca1b "The quick brown fox jumps over the lazy dog."
eaf60e7a4817e110d21b5d7888e0993f7ce4c4317ad168e47370cb67d053e41a "After the rainstorm comes the rainbow."
e2490c856a9f5086a896d2eba9b640e38c8ac8c234e769fb7b8ddd9f112a1727 "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
e3ea5f8885f7bb16468d08c578f0e7cc15febd31c27e323a79ef87c35756ce1e ""
9e07ce365903116b62ac3ac0a033167853853074313f443d5b372f0225eede50 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
f88600f4b65211a95c6817d0840e0fc2d422883ddf310f29fa8d4cbfda962626 "The quick brown fox jumps over the lazy dog"
ec05208dd1fbf47b9539a761af723612eaa810762ab7a77b715fcfb3bf44f04a "The quick brown fox jumps over the lazy cog"
822578f80d46184a674a6069486b4594053490de8ddf343cc1706418e527bec8 "The quick brown fox jumps over the lazy dog."
410427b981efa6ef884cd1f3d812c880bc7a37abc7450dd62803a4098f28d0f1 "After the rainstorm comes the rainbow."
47b5d8cb1df8d81ed23689936d2edaa7bd5c48f5bc463600a4d7a56342ac80b9 "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"