git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 0/9] Makefile & docs: document SHA-{1,256} behavior, fix bug

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Oct 20, 2022, 22:43 UTC
Message-ID
<cover-v3-0.9-00000000000-20221020T223946Z-avarab@gmail.com>
In-Reply-To
<cover-v2-0.4-00000000000-20221019T010222Z-avarab@gmail.com>

This v3 is a rewrite of the larger-in-scope v2[2] to only fix the current Makefile & INSTALL documentation do to do with our SHA-1 and SHA-256 knobs.

The only behavior change here is in 1/8, where I fix what's obviously a bug in the current behavior (so that we don't need to document that edge case). I'll submit a patch to change the behavior on OSX to use sha1collisiondetection by default on top of this series.

1. https://lore.kernel.org/git/cover-v2-0.4-00000000000-20221019T010222Z-avarab@gmail.com/
Ævar Arnfjörð Bjarmason (9):
  Makefile: always (re)set DC_SHA1 on fallback
  INSTALL: remove discussion of SHA-1 backends
  Makefile: correct DC_SHA1 documentation
  Makefile: create and use sections for "define" flag listing
  Makefile: rephrase the discussion of *_SHA1 knobs
  Makefile: document default SHA-256 backend
  Makefile: document SHA-1 and SHA-256 default and selection order
  Makefile: document default SHA-1 backend on OSX
  Makefile: discuss SHAttered in *_SHA{1,256} discussion
 INSTALL  |   4 -
 Makefile | 260 +++++++++++++++++++++++++++++++++++--------------------
 2 files changed, 166 insertions(+), 98 deletions(-)
Range-diff against v2:
 1:  392fabdb456 <  -:  ----------- fsmonitor OSX: compile with DC_SHA1=YesPlease
 -:  ----------- >  1:  ef3c5be11e0 Makefile: always (re)set DC_SHA1 on fallback
 -:  ----------- >  2:  017a0a9791c INSTALL: remove discussion of SHA-1 backends
 -:  ----------- >  3:  62dd2d5708d Makefile: correct DC_SHA1 documentation
 2:  7ae22276aa7 !  4:  933bef576b3 Makefile: create and use sections for "define" flag listing
    @@ Makefile: include shared.mak
     -# Define BLK_SHA1 environment variable to make use of the bundled
     -# optimized C SHA1 routine.
     -#
    --# Define DC_SHA1 to unconditionally enable the collision-detecting sha1
    +-# Define DC_SHA1 to enable the collision-detecting sha1
     -# algorithm. This is slower, but may detect attempted collision attacks.
    --# Takes priority over other *_SHA1 knobs.
     -#
     -# Define DC_SHA1_EXTERNAL in addition to DC_SHA1 if you want to build / link
     -# git with the external SHA1 collision-detect library.
    @@ Makefile: include shared.mak
     +#
     +# == SHA-1 and SHA-256 defines ==
     +#
    -+# Define BLK_SHA1 environment variable to make use of the bundled
    -+# optimized C SHA1 routine.
    ++# === SHA-1 backend ===
    ++#
    ++# ==== Options common to all SHA-1 implementations ====
    ++#
    ++# Define SHA1_MAX_BLOCK_SIZE to limit the amount of data that will be hashed
    ++# in one call to the platform's SHA1_Update(). e.g. APPLE_COMMON_CRYPTO
    ++# wants 'SHA1_MAX_BLOCK_SIZE=1024L*1024L*1024L' defined.
    ++#
    ++# ==== Options for the sha1collisiondetection implementation ====
     +#
    -+# Define DC_SHA1 to unconditionally enable the collision-detecting sha1
    ++# Define DC_SHA1 to enable the collision-detecting sha1
     +# algorithm. This is slower, but may detect attempted collision attacks.
    -+# Takes priority over other *_SHA1 knobs.
     +#
     +# Define DC_SHA1_EXTERNAL in addition to DC_SHA1 if you want to build / link
     +# git with the external SHA1 collision-detect library.
    @@ Makefile: include shared.mak
     +# by the git project to migrate to using sha1collisiondetection as a
     +# submodule.
     +#
    ++# ==== Other SHA-1 implementations ====
    ++#
    ++# Define BLK_SHA1 environment variable to make use of the bundled
    ++# optimized C SHA1 routine.
    ++#
     +# Define OPENSSL_SHA1 environment variable when running make to link
     +# with the SHA1 routine from openssl library.
     +#
    -+# Define SHA1_MAX_BLOCK_SIZE to limit the amount of data that will be hashed
    -+# in one call to the platform's SHA1_Update(). e.g. APPLE_COMMON_CRYPTO
    -+# wants 'SHA1_MAX_BLOCK_SIZE=1024L*1024L*1024L' defined.
    ++# === SHA-256 backend ===
     +#
     +# Define BLK_SHA256 to use the built-in SHA-256 routines.
     +#
 3:  78ef8636c57 <  -:  ----------- Makefile: really use and document sha1collisiondetection by default
 4:  f1fb9775b33 <  -:  ----------- Makefile: rephrase the discussion of *_SHA1 knobs
 -:  ----------- >  5:  5b18198c477 Makefile: rephrase the discussion of *_SHA1 knobs
 -:  ----------- >  6:  73685592aba Makefile: document default SHA-256 backend
 -:  ----------- >  7:  05edcfb9cd9 Makefile: document SHA-1 and SHA-256 default and selection order
 -:  ----------- >  8:  859e69fbe9f Makefile: document default SHA-1 backend on OSX
 -:  ----------- >  9:  c1f27255d3e Makefile: discuss SHAttered in *_SHA{1,256} discussion
-- 
2.38.0.1178.g509f5fa8ce0
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 22 of 55 in “core: update our SHA-1 docs, use sha1collisiondetection on OSX too”
  1. 0/5 core: update our SHA-1 docs, use sha1collisiondetection on OSX tooÆvar Arnfjörð Bjarmason, Apr 22, 2022
  2. 1/5 Makefile: create and use sections for "define" flag listingÆvar Arnfjörð Bjarmason, Apr 22, 2022
  3. 3/5 Makefile: rephrase the discussion of *_SHA1 knobsÆvar Arnfjörð Bjarmason, Apr 22, 2022
  4. 5/5 Makefile: use $(OBJECTS) instead of $(C_OBJ)Ævar Arnfjörð Bjarmason, Apr 22, 2022
  5. 2/5 Makefile: really use and document sha1collisiondetection by defaultÆvar Arnfjörð Bjarmason, Apr 22, 2022
  6. 4/5 Makefile + hash.h: remove PPC_SHA1 implementationÆvar Arnfjörð Bjarmason, Apr 22, 2022
  7. Junio C HamanoApr 22, 2022
  8. Ævar Arnfjörð BjarmasonMay 19, 2022
  9. Ævar Arnfjörð BjarmasonMay 26, 2022
  10. 0/4 core: update our SHA-1 docs, use sha1collisiondetection on OSX tooÆvar Arnfjörð Bjarmason, Oct 19, 2022
  11. 1/4 fsmonitor OSX: compile with DC_SHA1=YesPleaseÆvar Arnfjörð Bjarmason, Oct 19, 2022
  12. 3/4 Makefile: really use and document sha1collisiondetection by defaultÆvar Arnfjörð Bjarmason, Oct 19, 2022
  13. Eric SunshineOct 19, 2022
  14. Junio C HamanoOct 19, 2022
  15. Ævar Arnfjörð BjarmasonOct 19, 2022
  16. Junio C HamanoOct 19, 2022
  17. Junio C HamanoOct 19, 2022
  18. Junio C HamanoOct 19, 2022
  19. brian m. carlsonOct 20, 2022
  20. 4/4 Makefile: rephrase the discussion of *_SHA1 knobsÆvar Arnfjörð Bjarmason, Oct 19, 2022
  21. 2/4 Makefile: create and use sections for "define" flag listingÆvar Arnfjörð Bjarmason, Oct 19, 2022
  22. 0/9 Makefile & docs: document SHA-{1,256} behavior, fix bugÆvar Arnfjörð Bjarmason, Oct 20, 2022
  23. 1/9 Makefile: always (re)set DC_SHA1 on fallbackÆvar Arnfjörð Bjarmason, Oct 20, 2022
  24. 2/9 INSTALL: remove discussion of SHA-1 backendsÆvar Arnfjörð Bjarmason, Oct 20, 2022
  25. 3/9 Makefile: correct DC_SHA1 documentationÆvar Arnfjörð Bjarmason, Oct 20, 2022
  26. 5/9 Makefile: rephrase the discussion of *_SHA1 knobsÆvar Arnfjörð Bjarmason, Oct 20, 2022
  27. 6/9 Makefile: document default SHA-256 backendÆvar Arnfjörð Bjarmason, Oct 20, 2022
  28. 7/9 Makefile: document SHA-1 and SHA-256 default and selection orderÆvar Arnfjörð Bjarmason, Oct 20, 2022
  29. Eric SunshineOct 20, 2022
  30. 4/9 Makefile: create and use sections for "define" flag listingÆvar Arnfjörð Bjarmason, Oct 20, 2022
  31. 8/9 Makefile: document default SHA-1 backend on OSXÆvar Arnfjörð Bjarmason, Oct 20, 2022
  32. Eric SunshineOct 20, 2022
  33. 9/9 Makefile: discuss SHAttered in *_SHA{1,256} discussionÆvar Arnfjörð Bjarmason, Oct 20, 2022
  34. 0/9 Makefile & docs: document SHA-{1,256} behavior, fix bugÆvar Arnfjörð Bjarmason, Oct 26, 2022
  35. 1/9 Makefile: always (re)set DC_SHA1 on fallbackÆvar Arnfjörð Bjarmason, Oct 26, 2022
  36. 2/9 INSTALL: remove discussion of SHA-1 backendsÆvar Arnfjörð Bjarmason, Oct 26, 2022
  37. 3/9 Makefile: correct DC_SHA1 documentationÆvar Arnfjörð Bjarmason, Oct 26, 2022
  38. 5/9 Makefile: rephrase the discussion of *_SHA1 knobsÆvar Arnfjörð Bjarmason, Oct 26, 2022
  39. 6/9 Makefile: document default SHA-256 backendÆvar Arnfjörð Bjarmason, Oct 26, 2022
  40. 7/9 Makefile: document SHA-1 and SHA-256 default and selection orderÆvar Arnfjörð Bjarmason, Oct 26, 2022
  41. Junio C HamanoOct 26, 2022
  42. 4/9 Makefile: create and use sections for "define" flag listingÆvar Arnfjörð Bjarmason, Oct 26, 2022
  43. 8/9 Makefile: document default SHA-1 backend on OSXÆvar Arnfjörð Bjarmason, Oct 26, 2022
  44. 9/9 Makefile: discuss SHAttered in *_SHA{1,256} discussionÆvar Arnfjörð Bjarmason, Oct 26, 2022
  45. 00/10 Makefile, docs & code: document & fix SHA-{1,256} selection behaviorÆvar Arnfjörð Bjarmason, Nov 7, 2022
  46. 01/10 Makefile: always (re)set DC_SHA1 on fallbackÆvar Arnfjörð Bjarmason, Nov 7, 2022
  47. 02/10 INSTALL: remove discussion of SHA-1 backendsÆvar Arnfjörð Bjarmason, Nov 7, 2022
  48. 03/10 Makefile: correct DC_SHA1 documentationÆvar Arnfjörð Bjarmason, Nov 7, 2022
  49. 06/10 Makefile: document default SHA-256 backendÆvar Arnfjörð Bjarmason, Nov 7, 2022
  50. 05/10 Makefile: rephrase the discussion of *_SHA1 knobsÆvar Arnfjörð Bjarmason, Nov 7, 2022
  51. 07/10 Makefile: document SHA-1 and SHA-256 default and selection orderÆvar Arnfjörð Bjarmason, Nov 7, 2022
  52. 04/10 Makefile: create and use sections for "define" flag listingÆvar Arnfjörð Bjarmason, Nov 7, 2022
  53. 08/10 Makefile & test-tool: replace "DC_SHA1" variable with a "define"Ævar Arnfjörð Bjarmason, Nov 7, 2022
  54. 09/10 Makefile: document default SHA-1 backend on OSXÆvar Arnfjörð Bjarmason, Nov 7, 2022
  55. 10/10 Makefile: discuss SHAttered in *_SHA{1,256} discussionÆvar Arnfjörð Bjarmason, Nov 7, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.