stuartpb / surpass

Taking sensitive field input beyond the ordinary
https://stuartpb.github.io/surpass/demo.html
MIT License
1 stars 0 forks source link

Entropy investigation #3

Closed stuartpb closed 8 years ago

stuartpb commented 8 years ago

About half the keys on my keyboard currently cause the pieces of the Gross Simplification to stick in place if held down (ie. inserting the same character multiple times in a row causes the hash value to move by a multiple of 4).

This is probably an argument in favor of moving one of the sexnary (now there's a word you don't see every day) factors into the lowest position instead of the position: that might be enough to avoid this issue (though it could end up with the same shapes always being the same colors, or it might just not avoid the problem at all). Needs testing.

Could also be cause to investigate a new hash algorithm like djb2.

stuartpb commented 8 years ago

Looking at this last night, I realized that EVERY character, typed 4 times, was yielding the same multiple of 4 as the position before it - some didn't change the position, some flipped it, and some rotated left or right, but EVERY character had this effect when repeated. That was bad.

However, I also realized I hadn't meant to use the full 32 bits of the FNV-1a hash (my initial designs had been based on pulling a mod-144 value from a 0-65535 number), so I could just fold the high word over the low word via XOR to mitigate the issue (as recommended by Wikipedia).

stuartpb commented 8 years ago

Closing under the assumption ebeb844 has solved the problem.