-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ELF] Implement --build-id={md5,sha1} with truncated BLAKE3
--build-id was introduced as "approximation of true uniqueness across all binaries that might be used by overlapping sets of people". It does not require the some resistance mentioned below. In practice, people just use --build-id=md5 for 16-byte build ID and --build-id=sha1 for 20-byte build ID. BLAKE3 has 256-bit key length, which provides 128-bit security against (second-)preimage, collision, and differentiability attacks. Its portable implementation is fast. It additionally provides Arm Neon/AVX2/AVX-512. Just implement --build-id={md5,sha1} with truncated BLAKE3. Linking clang 14 RelWithDebInfo with --threads=8 on a Skylake CPU: * 1.13x as fast with --build-id=md5 * 1.15x as fast with --build-id=sha1 --threads=4 on Apple m1: * 1.25x as fast with --build-id=md5 * 1.17x as fast with --build-id=sha1 Reviewed By: ikudrin Differential Revision: https://reviews.llvm.org/D121531
- Loading branch information
Showing
3 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters