아래 내용을 파악해주세요.
CRC SHA: New vs Old format
Forum: Open DiscussionCreator: RobertF Created: 2022-02-16 Updated: 2022-03-10
RobertF
RobertF - 2022-02-16
I recently updated my 7zip version to 21.07 (from 18.06) and found the new CRC SHA changes (which I like very much). However, I do see a few issues.
- The checksums are a bit different between the old and new versions. When selecting the asterisk option (to generate all CRCs), the "data" CRC matches between old and new; however, the "data and names" do not. I'd suggest there be a way to generate the old versions when needed.
- The new version has an additional hyphenated number appended to the CRCs. For example:
CRC32 checksum for data: 31491E8B-00000002
CRC32 checksum for data and names: 62FD87AA-00000003
Thus, when I go to verify an old set of checksums, I need to clean the newly generated ones first.
- I found it very difficult to change between the 19.00 and 21.07 versions; (i.e. I found 19.00 generates the old CRCs correctly). (I'm running Windows 10.) The issue is with the CRC SHA context menu. For some reason it does not update correctly without some precise steps (which I haven't quite determined). I've tried various combinations of uninstall, reboot, enable/disable CRC SHA context menu, and registry cleanup (via CCleaner). After numerous tries, I can finally get it to work; but I've never been able to narrow it down to easily repeatable steps.
I'm primarily interested in seeing a fix for #1, such that old and new versions can both be generated. For #2, I'm interested in what this appended number means. And for #3, I'd be interested if anyone has the exact steps figured out.
Respectfully submitted, -RobertF
Last edit: RobertF 2022-02-16
Igor Pavlov
Igor Pavlov - 2022-02-17
- it was changed to be compatible with linux.
linux uses slashes instead of backslash in windows.
7-Zip now uses slashes internally.
So now you must have same checksums in linux and in Windows for same directory structures.
- it's high part of sum:
the sum has more digits:
ff + ff = fe-01
RobertF
RobertF - 2022-02-17
- Thanks for explaining why it's different. However, I believe it still makes sense to allow users a way to generate the old values so they have a way to validate their old checksums. Wouldn't you agree?
- Interesting. What is the purpose of having the high part of the sum? For example, if I were to look at a SHA256 checksum, why would I want more than the 256 bits? Is there some new standard that this meets?
Igor Pavlov
Igor Pavlov - 2022-02-17
- It's not some standard.
It's just some internal code. So I didn't see big demand to keep compatibility with previous versions. I just tried to get better new code that works same way for Linux and Windows versions.
- Some users erroneously thought that that value was real hashsum (as sha-256 digest). But it's not real hashsum and it's not standard hashsum of another hashsum.
It is arithmetic sum of hashsums. So that additional part -00000015 can show to user that it's not pure standard hashsum.
Also it increases the number of digits for crc32 method. So it's more safe to get more digits.
Last edit: Igor Pavlov 2022-02-17
RobertF
RobertF - 2022-02-18
- It's nice that it will work the same (for both Linux and Windows) going forward. Though long term users have relied on the prior behavior for many years. I myself have years of old archives with checksums and don't really want the task of upgrading all old checksums to the new format. Thus, it would be very handy if we had some way to generate & validate these old checksums. (I won't belabor this any more; either you're convince of the benefit to long term users or not.)
- Ahhh, I see your point that some users might be confused. And from your comment, I assume there is no standard for aggregating checksums. I guess I would have simply added a note to the help file.
By "safe" I assume you mean less collision, but it seems to be of limited value. And it certainly makes the results look more complex than the shorter format.
With the ability to generate a sha256 checksum file (which is really nice), I would recommend the following. Consider making the values generated by the asterisk option equal to the checksums on the sha256 file itself. i.e. this would give us one more way to validate results. i.e. I generate the sha256 checksum file, then I generate checksums on that file, and I see the resulting checksums match with the values generated with the asterisk function.
This would also allow users to create and anticipate other checksum values for validations. For example, I could add/remove/modify a file in a directory tree, and I would know how to update my prior sha256 file such that I could anticipate the new asterisk results.
Respectfully submitted, -RobertF
PS: And just for the record, I think this is an excellent product and appreciate all the time and effort put into it!!!
JS D
JS D - 2022-03-10
I think being able to create both the old and new format might be useful for some people. However, in my opinion, it would be even more important to make the "Test archive: Checksum" function work with both formats when verifying hashes.
I did some tests with the popular HashCheck software and noticed that it generates files similar to the old 7-Zip format, but it can actually read both the old and new formats when doing the verifications, which is really nice. On the other hand, HashCheck has a major drawback because it does not support long file paths over 260 characters and I have no hope to see this fixed because it's development has been on hold for a very long time on GitHub.
If 7-Zip could do everything that HashCheck does (even better actually), then we could finally stop using that old and deprecated tool. ;)
Also, another nice feature to add to the hash verification would be the ability to associate some file extensions with 7-Zip and have it automatically recognize that it's a hashset to verify when double clicking on the file.
Keep up the good work!