untitled-pit-group / foxhound

PIFS standard backend
BSD Zero Clause License
0 stars 0 forks source link

[RFC] doc/api: Change file hash type to SHA-256 #13

Closed paulsnar closed 2 years ago

paulsnar commented 2 years ago

Honestly, BLAKE3 was kind of an aspirational choice because it was supposed to be faster and I had a slight distaste for the fact that the SHA-2 family is prone to length extension attacks—though the latter actually doesn't matter in practice, this is not intended for cryptographic purposes—but BLAKE3 availability isn't widespread; as my benchmark, PHP doesn't by default support BLAKE3 for hash so doing that would require an extension, and honestly that's a significant ask for a distributable environment.

Hence, I hereby propose to change the hash to the bog standard SHA-256 that ought to be supported pretty much everywhere, even if its performance might be slightly worse or its security characteristics slightly less favourable.

paulsnar commented 2 years ago

On second thought, given that at this point it's an implementation detail anyway, imma go demote this from an RFC to an BDFL merge.