New answers tagged

9 votes
Accepted

Are there associative cryptographic / collision resistant hashes?

There is a plausible construction of such a hash. At design time, randomly choose two $2\times 2$ matrices with entries in $\mathbb{F}_{2^n}$ that have determinant 1, fix them, and call them $h(0),h(...
D.W.'s user avatar
  • 156k
0 votes

Determine if all the continuous subsequences of an array contain at least one unique element in O(n lgn)

Pivot is unique in the whole array, therefore every sub array containing pivot contains a unique item. Subarrays not containing pivot are the subarrays of the array from start to pivot-1 and the ...
gnasher729's user avatar
  • 28.4k
0 votes

How to create a 'hashing' function that maps up to 1 to N numbers uniquely to numbers 1 to N

Look for “linear congruential random number generator”. If you take a random number generator with range 0 <= r < n that’s basically what you want. And it’s quite fast.
gnasher729's user avatar
  • 28.4k
0 votes

What would happen SHA-256 collision were to be found?

If given some data we could at will create different data with the same SHA that would be a bad problem. Dump SHA. If we could at will create two sets of data with the same SHA, someone will figure ...
gnasher729's user avatar
  • 28.4k

Top 50 recent answers are included