Add BLAKE3 as a hash option

General No-Intro related discussions.
Post Reply
rarenight
Datter
Posts: 705
Joined: 19 Mar 2017 09:41

Add BLAKE3 as a hash option

Post by rarenight »

The newly-released BLAKE3 hashing algorithm hashes at the read speed of your drive if on an SSD, so it's blazingly fast. @johnsanc performed some tests hashing a 30 GB file which yielded the following results:

Code: Select all

Hashing of a 30 GB File
========================
BLAKE3 = 16.6 sec
CRC32  = 33.6 sec
MD5    = 69.6 sec
SHA1   = 72.1 sec
SHA256 = 143.4 sec
SHA512 = 105.7 sec
And on top of that, BLAKE3 is cryptographically secure. So it's more than twice as fast as CRC32 and is as functionally useful to verify file integrity as SHA256.

Given its benefits, I would eventually like to see BLAKE3 integrated into DOM as a hash option to help modernize the sets. There are three barriers to its inclusion, of course:

1. We need volunteers who are willing to rehash sets in BLAKE3, as partially-hashed sets aren't useful. Maybe a script could generate compliant XMLs that could be imported?

2. We need tools like ROMVault to develop the ability to scan and rebuild sets solely on their BLAKE3 hashes.

3. We need to decide whether to replace SHA256 with BLAKE3 for new entries.

What say you all? Good idea to implement eventually?
Braintrash
Posts: 13
Joined: 14 Jul 2015 15:31

Re: Add BLAKE3 as a hash option

Post by Braintrash »

I love it.

Seems the logical next step.
Hiccup
Datter
Posts: 1720
Joined: 09 Oct 2015 11:29

Re: Add BLAKE3 as a hash option

Post by Hiccup »

Sounds like a good idea, although I think SHA256 should be kept too, as its the "industry standard" secure hash, and is quite commonly used.
User avatar
Macarro
Posts: 31
Joined: 06 Jun 2008 18:55

Re: Add BLAKE3 as a hash option

Post by Macarro »

Are .dat checkers (ClrMamePro, ROMCenter, ROMVault...) compatible with that hash algorithm? Will they be?
Hiccup
Datter
Posts: 1720
Joined: 09 Oct 2015 11:29

Re: Add BLAKE3 as a hash option

Post by Hiccup »

Macarro wrote: 28 Nov 2023 23:25 Are .dat checkers (ClrMamePro, ROMCenter, ROMVault...) compatible with that hash algorithm? Will they be?
Not at the moment, but GordonJ, the developer of ROMVault, would probably be receptive to adding it as an option if dats start using it.
Post Reply