2 ms·
Thanks for the answer. I am really not familiar with the mathematics of hash algorithms and I ask just to learn. Why is length essentially a weak hash? Isn't i
by hrjet 12y ago
Thanks for the answer. I am really not familiar with the mathematics of hash algorithms and I ask just to learn.
Why is length essentially a weak hash? Isn't it an additional constraint that works orthogonal to the hash? It serves to restrict the space of collisions and hence directly reduces the exploit surface. Moreover, the length can be independently verified of the hash function, and its space & time complexity is negligible.
- Dylan16807 12y ago> Why is length essentially a weak hash? It's utterly trivial to match by itself. Adding length to a real hash is a mild difficulty increase. Adding a second hash is a massive difficulty increase. > Isn't it an additional constraint that works orthogonal to the hash? Yes. But so is a second hash. > It serves to restrict the space of collisions and hence directly reduces the exploit surface. Very inefficiently. > Moreover, the length can be independently verified of the hash function, and its space & time complexity is negligible. A second hash is independent of the first hash too. Hashing a second time compared to downloading and hashing the first time is pretty close to negligible.