-3
$\begingroup$

Is it possible to find the original message if we know a sha256 hashed value and its message length?

$\endgroup$
1
$\begingroup$

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.

$\endgroup$
1
$\begingroup$

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.

$\endgroup$
0
$\begingroup$

I agree it's (quite) trivial for 1,2,3 bytes. Not doing the reverse of a hash, but simply having the possibility to calculate 256/65536/16777216 hashes and compare for a match. The good old and simple brute force attack.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.