Page MenuHomePhabricator

Upgrade File content hashing to SHA256
ClosedPublic

Authored by epriestley on Apr 4 2017, 10:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Sep 9, 11:47 AM
Unknown Object (File)
Sep 5 2024, 11:47 PM
Unknown Object (File)
Sep 5 2024, 11:47 PM
Unknown Object (File)
Sep 5 2024, 11:47 PM
Unknown Object (File)
Sep 5 2024, 12:31 AM
Unknown Object (File)
Sep 2 2024, 5:12 AM
Unknown Object (File)
Aug 31 2024, 12:47 PM
Unknown Object (File)
Aug 25 2024, 9:09 PM
Subscribers
None

Details

Summary

Ref T12464. This defuses any possible SHA1-collision attacks by using SHA256, for which there is no known collision.

(SHA256 hashes are larger -- 256 bits -- so expand the storage column to 64 bytes to hold them.)

Test Plan
  • Uploaded the same file twice, saw the two files generate the same SHA256 content hash and use the same underlying data.
  • Tried with a fake hash algorihtm ("quackxyz") to make sure the failure mode worked/degraded correctly if we don't have SHA256 for some reason. Got two valid files with two copies of the same data, as expected.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable