I was given a 16 byte key(used to encrypt message in RC4). First 8 bytes are unknown for me. I know that key was created by hashing a message using SHA256(secret) and getting first 16 characters from string obtained from this hashing function. Unfortunately i don't see a way to get the first 8 bytes of this key. As i know SHA256 is one way hashing function(we cant decrypt it). So how i can use half of the key to get a whole? I would be grateful for giving me some advice.
Asked
Active
Viewed 493 times
1 Answers
1
You answered your own question. The point of a hash is that it's very hard to get the original value, and that the hash changes completely when even a single bit is different.
The 8 bytes you're looking for could be anything, dependent solely on the original value that was being hashed. If you don't know the original value, there is no way to determine what the first 8 bytes of the hash are.

Rik
- 28,507
- 14
- 48
- 67
-
if i have encrypted message with the key created by hash function. Can i use half of key,knowledge that SH2 was used and given cryptogram? – Vegeta Oct 19 '15 at 11:30
-
Not without brute-forcing the encrypted message, which will take a prohibitively long time. – Rik Oct 19 '15 at 13:17