New answers tagged

0

With a cryptographic hash function, reversing hashes amounts to trying potential inputs until you find an input that matches the hash. If you do find an input that hashes to the target, it is presumed to be the same input that was originally used (e.g. the user's password). In that case, the entropy and length of the input is useful to know since it can ...


1

Generating collisions for a 32-bit hash is trivial; thanks to birthday paradox, the expected effort is only about 217 hash evaluations. If you don't believe me, try running this Perl code: use strict; use warnings; use Digest::SHA 'sha256'; my $message = "a"; my %preimages; while (1) { my $hash = unpack("H8", sha256($message)); print "$hash: $...


0

Depends on the message length. If the length is 1 byte (2 bytes, 3 bytes, ...) - it is trivial to do an exhaustive search to find the message that maps into the known hash. The longer the message - the harder it gets.


0

No, it is still non-trivial to reverse the hash. However, knowing the message length and allowed characters places an upper bound on the number of possible messages.


1

Preimage resistance is usually defined not for all the inputs, but for all the outputs, since what you are trying to model is the inability to, given any output $y$, obtain an input $x$ such that $H(x) = y$. I'm not going to solve the problem for you since you may be able to do it by yourself. Just try to think of the patterns in the output and if this can ...



Top 50 recent answers are included