All times are UTC - 5 hours [ DST ]


Forum rules


Please do not post questions about data recovery cases here (use this forum instead). This forum is for topics on finding new ways to recover data. Accessing firmware, writing programs, reading bits off the platter, recovering data from dust...



Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: ST Checksum
PostPosted: October 14th, 2021, 16:42 
Offline

Joined: September 17th, 2016, 16:06
Posts: 430
Location: India
Hello Lovely people of this forum, hope all is good...
kasakai bara aahe (only the local Marathi speaking people reading this post will understand kasa kai bara aahi, which means whats up ! hope all is nice!)

I wish to understand the math behind the checksum of ST Module.... I am planning to write my own tool to compute and correct the same.

Any leads will do. Time to write something again in C :)

Good Day

Simran


Top
 Profile  
 
 Post subject: Re: ST Checksum
PostPosted: October 14th, 2021, 18:05 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 15440
Location: Australia
https://github.com/eurecom-s3/hdd_firmware_tools
http://www.users.on.net/~fzabkar/FreeBasic_W32/Seagate/ST_CRC16_2.bas

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: ST Checksum
PostPosted: October 14th, 2021, 18:53 
Offline

Joined: September 17th, 2016, 16:06
Posts: 430
Location: India
Hi there Fzabkar. Thanks for always being helpful and supportive of my tiny projects.

Are we looking at CRC16 even for the Rosewood drives?

thanks

Simran


Top
 Profile  
 
 Post subject: Re: ST Checksum
PostPosted: October 14th, 2021, 19:08 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 15440
Location: Australia
It's still CRC16, AFAIK.

You could try the Python tool or my FB version:

http://www.users.on.net/~fzabkar/FreeBasic_W32/Seagate/ST_CRC16.exe

You could use F3RomExplorer to carve the ROM segments.

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: ST Checksum
PostPosted: October 15th, 2021, 14:05 
Offline
User avatar

Joined: August 15th, 2006, 3:01
Posts: 3459
Location: CDRLabs @ Chandigarh [ India ]
sin wrote:
Hello Lovely people of this forum, hope all is good...
kasakai bara aahe (only the local Marathi speaking people reading this post will understand kasa kai bara aahi, which means whats up ! hope all is nice!)

I wish to understand the math behind the checksum of ST Module.... I am planning to write my own tool to compute and correct the same.

Any leads will do. Time to write something again in C :)

Good Day

Simran


Hello Simran ,
What C Compiler are you using for your programming ,After My Borland Turbo C sessions in school i am planning to migrate to -> https://www.embarcadero.com/products/cbuilder ,I hardly find decent books on c++ builder and i also see this compiler which i have not used -> https://www.embarcadero.com/free-tools/ccompiler and https://www.embarcadero.com/free-tools/dev-cpp

_________________
Regards
Amarbir S Dhillon , Chandigarh Data Recovery Labs [India]
Logical,Semi Physical And Physical Data Recovery
Website-> http://www.chandigarhdatarecovery.com


Top
 Profile  
 
 Post subject: Re: ST Checksum
PostPosted: October 16th, 2021, 2:43 
Offline

Joined: September 17th, 2016, 16:06
Posts: 430
Location: India
Hello.

I use Dev C++ with TDM GCC 4.9.2.
My syntax is that of C and no C++

Simran


Top
 Profile  
 
 Post subject: Re: ST Checksum
PostPosted: October 17th, 2021, 13:02 
Offline

Joined: September 17th, 2016, 16:06
Posts: 430
Location: India
@Fzabkar

following is the ip bitstream and corresponding checksum stream

0000 0000 0000 0001
1111 1111 1111 1111

0000 0000 0000 0010
1111 1111 1111 1110

0000 0000 0000 0011
1111 1111 1111 1101

0000 0000 0000 0100
1111 1111 1111 1100

0000 0000 0000 0101
1111 1111 1111 1011

hehe
--


Top
 Profile  
 
 Post subject: Re: ST Checksum
PostPosted: October 18th, 2021, 19:22 
Offline

Joined: September 17th, 2016, 16:06
Posts: 430
Location: India
Here is something more interesting
There is an algorithm so as to how the MSBs and LSBs are added
When the LSBs are added, and they overflow by 4bits, the 4MSB overflown bits are truncated

eg wr.t. LSBs
FF+FF = 1FE, however the 1 is disregarded as overflown and only FE is considered in computation

ie: 00 ff 00 ff

Similarly,
FF+FF+FF=2FD however the 2 is disregarded and it's just FD.
00 ff 00 ff 00 ff

in a bit field where just there are MSBS and no LSBs to be added in the module, the MSBs can be added to 0x101 times before things overflow.
....
So the way the whole module is added, its just truncated to 0x_ _ _ _ which is computed against a value that makes the whole checksum 0000
--


to add, this is not for the ROM modules....its for another module that resides on SA and is sensitive to checksums :D

--


Top
 Profile  
 
 Post subject: Re: ST Checksum
PostPosted: October 18th, 2021, 22:56 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 15440
Location: Australia
In addition to CRC16, the following tool computes all the different checksum types that I've encountered in hard drives (and have managed to identify):

http://www.users.on.net/~fzabkar/FreeBasic_W32/Utils/checksum.bas
http://www.users.on.net/~fzabkar/FreeBasic_W32/Utils/checksum.exe

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: ST Checksum
PostPosted: October 25th, 2021, 6:47 
Offline

Joined: September 17th, 2016, 16:06
Posts: 430
Location: India
figured out the math behind the checksum bits
it's not CRC!
its 2s compliment :)

code writing begins :)
--


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group