Skip to content
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.

Replace CRC32 with Another Hash Function #42

Closed
DavidBerdik opened this issue May 27, 2020 · 1 comment
Closed

Replace CRC32 with Another Hash Function #42

DavidBerdik opened this issue May 27, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@DavidBerdik
Copy link
Owner

InfiniDrive currently makes use of the CRC32 hash function to validate the integrity of uploaded fragments. With the introduction of the update command, the values produced by this hash function are now used to determine if two fragments are identical. This is potentially risky, as CRC32 has a collision rate that is higher than other hash functions. It would be worth looking in to replacing CRC32 with a hash function that is less prone to collision. Obvious candidates are MD5 and SHA256.

@DavidBerdik DavidBerdik added the enhancement New feature or request label May 27, 2020
@DavidBerdik DavidBerdik self-assigned this May 27, 2020
@DavidBerdik
Copy link
Owner Author

The decision was made to add SHA256 support in addition to CRC32. By using two hashes, we should be safe from collisions. SHA256 support was introduced in 7994b44.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant