📚 OpenRCE is preserved as a read-only archive. Launched at RECon Montreal in 2005. Registration and posting are disabled.








Flag: Tornado! Hurricane!

 Forums >>  Target Specific - General  >>  Knowing the Correct 16-bit Checksum Algorithm

Topic created on: April 29, 2007 11:06 CDT by timsheung .

I'm trying to reverse-engineer the data transmitted by my "Personal Response System (PRS)" unit; my goal is to eventually be able to modify the data inside it, and to make a duplicate of it.
But I've tried very hard thinking about the logic of generating the checksum followed by the transmitted message.

The transmitted data has been decoded, which contains firstly a 30-bit of student number (from 0-999999999), followed by a 4-bit of answer (from 0-9), then a 2-bit of confidence level (00 or 01 or 10), and after that there is a 16-bit of unknown data is included in the message.

Can any one suggest a possible approach to find a checksum algorithm that suits my case?

e.g.1
   student no.: "05198175"
        answer: "0000"
confidence lv.: "00"
the data would become:
0000 0001 0011 1101 0100 0101 0111 11 0000 00  1001 1101 0010 1010 00001
|___________________________________| |__| |_| |_________________| |___|
   30-bit student no. (bin --> dec,   ans. con.  16-bit checksum    end
     which then yields "5198175")          lv.                      bit

e.g.2
   student no.: "05198175"
        answer: "0001"
confidence lv.: "01"
the data would become:
0000 0001 0011 1101 0100 0101 0111 11 0001 01  1001 1101 0010 1111 00001
|___________________________________| |__| |_| |_________________| |___|
   30-bit student no. (bin --> dec,   ans. con.  16-bit checksum    end
     which then yields "5198175")          lv.                      bit

e.g.3
   student no.: "05177602"
        answer: "0000"
confidence lv.: "00"
the data would become:
0000 0001 0011 1100 0000 0100 0000 10 0000 00  1001 1000 1100 1110 00001
|___________________________________| |__| |_| |_________________| |___|
   30-bit student no. (bin --> dec,   ans. con.  16-bit checksum    end
     which then yields "5198175")          lv.                      bit

Known infomation:
1. The PRS handset contains a 8-bit Microcontroller.
2. The 16-bit checksum will accumulate when the answer bits accumulates.
   (from "0000"-->"0001",it will change chksum
    from "1001 1101 0010 1010" to "1001 1101 0010 1110")
3. The checksum may only be obtained by shifting, addition or subtraction,
   but no division.
4. I have tried to sum up each byte or each 2-bytes into a 16-bit
   variable, both big and little-endian, and seems does not match the
   checksum.
5. I have actually got 10 sets of data, which can be listed if anyone needs
   further explanation of the above.

Reference:
PRS info -- http://www.interwritelearning.com/products/prs/infrared/detail.html

  bushing     April 30, 2007 01:38.55 CDT
You saw this, right?  There were some good suggestions in the replies.

https://www.openrce.org/forums/posts/442

Note: Registration is required to post to the forums.

There are 31,328 total registered users.


Recently Created Topics
[help] Unpacking VMP...
Mar/12
Reverse Engineering ...
Jul/06
let 'IDAPython' impo...
Sep/24
set 'IDAPython' as t...
Sep/24
GuessType return une...
Sep/20
About retrieving the...
Sep/07
How to find specific...
Aug/15
How to get data depe...
Jul/07
Identify RVA data in...
May/06
Question about memor...
Dec/12


Recent Forum Posts
Finding the procedur...
rolEYder
Question about debbu...
rolEYder
Identify RVA data in...
sohlow
let 'IDAPython' impo...
sohlow
How to find specific...
hackgreti
Problem with ollydbg
sh3dow
How can I write olly...
sh3dow
New LoadMAP plugin v...
mefisto...
Intel pin in loaded ...
djnemo
OOP_RE tool available?
Bl4ckm4n


Recent Blog Entries
halsten
Mar/14
Breaking IonCUBE VM

oleavr
Oct/24
Anatomy of a code tracer

hasherezade
Sep/24
IAT Patcher - new tool for ...

oleavr
Aug/27
CryptoShark: code tracer ba...

oleavr
Jun/25
Build a debugger in 5 minutes

More ...


Recent Blog Comments
nieo on:
Mar/22
IAT Patcher - new tool for ...

djnemo on:
Nov/17
Kernel debugger vs user mod...

acel on:
Nov/14
Kernel debugger vs user mod...

pedram on:
Dec/21
frida.github.io: scriptable...

capadleman on:
Jun/19
Using NtCreateThreadEx for ...

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit