Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6846343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:36:36+00:00 2026-05-27T00:36:36+00:00

I am trying to figure out on which data the crc32 field in the

  • 0

I am trying to figure out on which data the crc32 field in the header of a RAR Recovery Record is based. I am trying to recreate a RAR volume based on a previous RAR volume and the extracted contents. I am up to the point where only 12 bytes differ from the correct/original volume.

The names are based on the unrar source code (arcread.cpp) or the RAR technote.

A RAR file consists of blocks. They have a header and a body:

[header][body]

The header contains metadata that describes the body. One of these blocks is HEAD_TYPE=0x74 File header (File in archive).

[header:a...FILE_CRC...z][body]

The field FILE_CRC (4 bytes) is calculated on all the data available in the [body], which is a stored or compressed file.

The block of a Recovery Record (HEAD_TYPE=0x7a subblock) is very similar to a file block, but it contains three extra fields in the header:

[header:a...FILE_CRC...z, "Protect+", rsc, dsc][body]
    rsc: recovery sector count (4 bytes)
    dsc: data sector count (8 bytes)
assert dsc*2 + rsc*512 == size([body])

You would think the FILE_CRC of this block is based on the data in the body, just like the file block, but this isn’t the case. (verified independently by an other person)
So my question is, what data is used to calculate this crc32?

Some things I have tried already:

  • starting from Protect+ ect. followed by the body
  • everything before the start of the RR subblock
  • I have brute-forced all possible ranges on a small RAR file.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:36:36+00:00Added an answer on May 27, 2026 at 12:36 am

    Instead of using the default seed (-0x1 or 0xFFFFFFFF):

    crc = crc32(data)
    crc = crc32(data, ~0xffffffff)
    

    an F was dropped (-0x10000000):

    crc = crc32(data, ~0x0fffffff)
    

    An email to the author was sent with the following response:

    As far as I can see quickly looking into RAR code, this is CRC32 of all CRC16 data and all recovery record parity sectors ("All the RR data" in your list).

    Note that while RAR stores this checksum, it does not use it anywhere. It is not necessary when recovering. Even if recovery record is partially damaged, its valid parts still can be used to recover data. We can check the repair success on per sector basis using CRC16, so one CRC32 covering all data is not required in recovery process.

    Eugene

    Like first thought, the FILE_CRC of the block is based on the data in the body. It looks as if there is a typo somewhere in the RAR code.

    XADRARParser.m of TheUnarchiver2.7.1_src has the following commented code:

        // Removed CRC checking because RAR uses it completely inconsitently
    /*  if(block.crc!=0x6152||block.type!=0x72||block.flags!=0x1a21||block.headersize!=7)
    ...
    

    Almost 3 years later I found out that someone else had already found the solution to this problem earlier that year.

    # Why is this odd CRC initialiser used?
    crc = crc32(rr_crcs, 0xF0000000)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having a hard time trying to figure out which data type I
I am trying to figure out which data types I should use for my
Trying to figure out which to use.
I am trying to figure out which is most appropriate. From the articles I
I'm trying to figure out a way to find out which files were affected
Just out of curiosity, I'm trying to figure out which exactly is the right
I am trying to automatically figure out which Delphi version (of Delphi 5 to
First time working with JSON in Rails and trying to figure out something which
I am trying to figure out a query which joins several tables (cca 8).
After trying to figure out why a Capistrano task (which tried to start a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.