Hot answers tagged

1

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.


1

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 ...


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: $...



Only top voted, non community-wiki answers of a minimum length are eligible