@@ -21,9 +21,96 @@ This edition covers what happened during the month of January 2021.
2121### General
2222-->
2323
24- <!-- -
2524### Reviews
26- -->
25+
26+ * [[ PATCH 0/5
] Support for commits signed by multiple algorithms
] ( https://lore.kernel.org/git/[email protected] / ) 27+
28+ Brian M Carlson sent a patch series to allow verifying signed
29+ commits and tags when using multiple hash algorithms. This is a
30+ follow up from Brian's multi-year work on supporting the SHA-256
31+ hash algorithm in Git, to deal with the fact that the original SHA-1
32+ algorithm is becoming more and more outdated and insecure.
33+
34+ One of the trickiest part in supporting a new hash algorithm is that
35+ when Git objects (except blobs) are converted to the new hash, their
36+ contents changes, because the hashes they contain (to reference
37+ other Git objects) are converted too. So old signatures they contain
38+ become invalid.
39+
40+ A way to overcome this issue is to add a new signature, that signs
41+ the converted object, to each signed object that is converted. This
42+ way such object would have 2 signatures, and can always be verified
43+ using one of them, even if it gets converted back and forth.
44+
45+ Brian's patch series addressed the issue that for SHA-256 tags it
46+ was initially planned to have the signature in a Git object header
47+ (which is called a header signature), instead of at the end of the
48+ tag message (which is called a trailing signature), but
49+ unfortunately the patch implementing that got lost. So we use
50+ trailing signatures.
51+
52+ Brian then explained "We can't change this now, because otherwise it
53+ would be ambiguous whether the trailing signature on a SHA-256
54+ object was for the SHA-256 contents or whether the contents were a
55+ rewritten SHA-1 object with no SHA-256 signature at all." So the
56+ solution he implemented was to "use the trailing signature for the
57+ preferred hash algorithm and use a header for the other variant".
58+
59+ Brian thinks this solution is the best we can do in the current
60+ situation, as it still allows converting back and forth between
61+ hashes, and verifying signatures created with older versions of Git,
62+ though tags signed with multiple algorithms can't be verified with
63+ older versions of Git.
64+
65+ For commits, Brian patch series fixes the bug that old header
66+ signatures weren't stripped off before verifying new signatures, so
67+ verifications always failed.
68+
69+ The result of his series is then that signing both commits and tags
70+ can now be round-tripped through both SHA-1 and SHA-256 conversions.
71+
72+ Junio Hamano, the Git maintainer, replied to a patch in the series
73+ suggesting using the ` size_t ` type for byte lengths, instead of
74+ ` unsigned long ` , as ` unsigned long ` was breaking 32-bit builds.
75+
76+ Brian agreed and sent a
77+ [ version 2
] ( https://lore.kernel.org/git/[email protected] / ) 78+ of the series with Junio's fix.
79+
80+ Junio replied to the cover letter of this series asking "How widely
81+ are SHA-256 tags in use in the real world, though?", and if it was really
82+ too late to use a header signature for tags, as was originaly
83+ planned.
84+
85+ Brian replied:
86+
87+ > I don't know. I don't know of any major hosting platform that
88+ supports them, but of course many people may be using them
89+ independently on self-hosted instances.
90+
91+ He also explained why he thought the solution didn't matter much,
92+ because he'd just noticed that old Git versions don't properly strip
93+ header signatures, so wouldn't anyway be able to verify tags or
94+ commits with multiple signatures.
95+
96+ He ended his reply saying "there's a lot more prep work (surprise)
97+ before we get to anything interesting." To which Junio replied:
98+ "Uncomfortably excited to hear this ;-)"
99+
100+ Brian
[ replied with an interesting summary of his in progress work
] ( https://lore.kernel.org/git/X%[email protected] / ) .
101+
102+ Gábor Szeder then reported a Clang warning, while Junio suggested
103+ more ` unsigned long ` to ` size_t ` changes.
104+
105+ Brian then sent a
106+ [ version 3
] ( https://lore.kernel.org/git/[email protected] / ) 107+ of his patch series with fixes for the issues reported by Gábor and
108+ Junio, and then a few weeks later
109+ [ version 4
] ( https://lore.kernel.org/git/[email protected] / ) 110+ to fix another small issue.
111+
112+ This patch series is scheduled to be merged in the ` master ` branch
113+ soon.
27114
28115<!-- -
29116### Support
0 commit comments