Page MenuHomePhabricator

Upgrade File content hashing to SHA256
ClosedPublic

Authored by epriestley on Apr 4 2017, 10:38 PM.
Tags
None
Referenced Files
F12841367: D17620.id42383.diff
Thu, Mar 28, 9:10 PM
Unknown Object (File)
Jan 23 2024, 10:08 AM
Unknown Object (File)
Jan 15 2024, 7:42 PM
Unknown Object (File)
Jan 13 2024, 3:40 PM
Unknown Object (File)
Jan 7 2024, 4:44 PM
Unknown Object (File)
Jan 5 2024, 9:25 PM
Unknown Object (File)
Jan 3 2024, 7:05 PM
Unknown Object (File)
Dec 30 2023, 6:24 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
Branch
files10
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 16299
Build 21671: Run Core Tests
Build 21670: arc lint + arc unit