I am working to understand a system which saves a few bytes of data together wit
ID: 648399 • Letter: I
Question
I am working to understand a system which saves a few bytes of data together with what appears to be a single checksum byte that provides a very naive guarantee that the data has not been tampered with. My current task is to understand how this checksum is being calculated.
I cannot currently post any specific data, but I do have reason to believe the checksum calculation is very easy to compute. I also know for a fact that it receives no more than 6 bytes of data as input, and quite possibly as little as one byte.
Given that I have a table of several samples of data bytes + checksums, is there a formal process to reverse engineer this checksum, or do I have to rely on simple logic deduction from the known facts that I have?
Explanation / Answer
You would have to see about the given pairs of plain text and checksum. Try to find two only marginal different plain texts with the same checksum. (Shouldn't be do difficult with only one byte (256 possibilities) per checksum. Try a few one byte long plain texts and look for correlations of the checksum. What's the checksum of 8 zero bits? And 8 one bits? What's the checksum of the byte value of 1?
You say the checksum only gets 6 bytes as input... Is this because the checksum doesn't change with a seventh byte or because the input is just truncated / never exceeds 6 bytes?
A good guess could be the Cyclic redundancy check with 8 bits or with 32 bits truncated to 8 bits.
The most important thing is to know which algorithm was used. After that, the whole thing becomes much easier.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.