@@ -1171,8 +1171,8 @@ Managing Future Changes to the Update Process
1171
1171
=============================================
1172
1172
1173
1173
If breaking changes are made to the update process, PyPI should implement these
1174
- changes without disrupting existing clients. For guidance on how to do so,
1175
- see the ongoing discussion in the TAP repository__.
1174
+ changes without disrupting existing clients. For general guidance on how to do
1175
+ so, see the ongoing discussion in the TAP repository__.
1176
1176
1177
1177
__ https://github.com/theupdateframework/taps/pull/107
1178
1178
@@ -1183,6 +1183,45 @@ This PEP adds the ability for clients to use TUF metadata to improve the
1183
1183
security of the update process.
1184
1184
1185
1185
1186
+ Hash Algorithm Transition Plan
1187
+ ------------------------------
1188
+
1189
+ If the algorithm used to hash target and metadata files becomes vulnerable, it
1190
+ SHOULD be replaced by a stronger hash algorithm.
1191
+
1192
+ The TUF metadata format allows to list digests from different hash algorithms
1193
+ alongside each other, together with an algorithm identifier, so that clients
1194
+ can seamlessly switch between algorithms.
1195
+
1196
+ However, once support for an old algorithm is turned off, clients that don't
1197
+ support the new algorithm will only be able to install or update packages,
1198
+ including the client itself, by disabling TUF verification. To allow clients to
1199
+ transition without temporarily losing TUF security guarantees, we recommend
1200
+ the following procedure.
1201
+
1202
+ 1. Implement new algorithm in Warehouse.
1203
+
1204
+ 2. Re-generate existing TUF metadata to include both old and new algorithm
1205
+ hashes, and include both old and new algorithm hashes in new metadata in
1206
+ Warehouse.
1207
+ Note, only TUF metadata that lists hash digests for target files or other
1208
+ metadata needs to be renewed, that is *bin-n*, *snapshot* and *timestamp*.
1209
+ Thus, only online keys are required to sign renewed metadata.
1210
+
1211
+ 3. Announce transition on high-visibility channels.
1212
+
1213
+ 4. Give popular clients such as pip and bandersnatch the chance to adopt new
1214
+ hash algorithm.
1215
+
1216
+ 5. Give end-users the chance to update clients.
1217
+
1218
+ 6. Get rough consensus to remove old hash algorithm from PyPI maintainers.
1219
+
1220
+ 7. Remove Warehouse support for old algorithm and only support new algorithm.
1221
+
1222
+
1223
+
1224
+
1186
1225
Appendix A: Repository Attacks Prevented by TUF
1187
1226
===============================================
1188
1227
0 commit comments