Q&A mechanism based on SHA256 - fast computing problem
Budget: $30 – $250 USD
There is a question and answer mechanism. It consists in the fact that the question "Q" is 4 bytes, for eg. 0xAA 0xBB 0xCC 0xDD. The answer "A" is generated in such a way that the sequence "S" with a length of 8 bytes is added to the question "Q". A sequence of 12 bytes is then created. The SHA256 hash function of that 12 byte string is then computed. The first 4 bytes of the calculated SHA256 value are the response "A". So, for example:
Q = 0xAA, 0xBB, 0xCC, 0xDD
S = 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
SHA246 (AABBCCDD0102030405060708) = e455df10f57a47498c12c5eaad9b93f525aba1252a7a3a7fee160878db0b6aa8
so: A = e455df10 (first 4 bytes).
I know 3 pairs of sample Q questions and A answers. The goal is to calculate S which is a sequence of 8 bytes. I wrote a program that adds 8 bytes S to the Q that I know. Then it calculates SHA256 and checks if the first 4 bytes agree with the answer A I know. It is a brute force attack. The problem is that the loop substitution 8 bytes and the SHA256 calculation for the combination 0xFFFFFFFFFFFFFFFF is very time consuming (even computing on GPU takes tens of days if not more). Is it possible to find the sequence S in a different way and within a reasonable time - a few hours or days maybe?
If someone could help me on a faster method to solve this problem, I would be very grateful.
Q = 0xAA, 0xBB, 0xCC, 0xDD
S = 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
SHA246 (AABBCCDD0102030405060708) = e455df10f57a47498c12c5eaad9b93f525aba1252a7a3a7fee160878db0b6aa8
so: A = e455df10 (first 4 bytes).
I know 3 pairs of sample Q questions and A answers. The goal is to calculate S which is a sequence of 8 bytes. I wrote a program that adds 8 bytes S to the Q that I know. Then it calculates SHA256 and checks if the first 4 bytes agree with the answer A I know. It is a brute force attack. The problem is that the loop substitution 8 bytes and the SHA256 calculation for the combination 0xFFFFFFFFFFFFFFFF is very time consuming (even computing on GPU takes tens of days if not more). Is it possible to find the sequence S in a different way and within a reasonable time - a few hours or days maybe?
If someone could help me on a faster method to solve this problem, I would be very grateful.