@@ -1219,8 +1219,8 @@ Managing Future Changes to the Update Process
1219
1219
=============================================
1220
1220
1221
1221
If breaking changes are made to the update process, PyPI should implement these
1222
- changes without disrupting existing clients. For guidance on how to do so,
1223
- see the ongoing discussion in the TAP repository__.
1222
+ changes without disrupting existing clients. For general guidance on how to do
1223
+ so, see the ongoing discussion in the TAP repository__.
1224
1224
1225
1225
__ https://github.com/theupdateframework/taps/pull/107
1226
1226
@@ -1231,6 +1231,47 @@ This PEP adds the ability for clients to use TUF metadata to improve the
1231
1231
security of the update process.
1232
1232
1233
1233
1234
+ Hash Algorithm Transition Plan
1235
+ ------------------------------
1236
+
1237
+ If the algorithm used to hash target and metadata files becomes vulnerable, it
1238
+ SHOULD be replaced by a stronger hash algorithm.
1239
+
1240
+ The TUF metadata format allows to list digests from different hash algorithms
1241
+ alongside each other, together with an algorithm identifier, so that clients
1242
+ can seamlessly switch between algorithms.
1243
+
1244
+ However, once support for an old algorithm is turned off, clients that don't
1245
+ support the new algorithm will only be able to install or update packages,
1246
+ including the client itself, by disabling TUF verification. To allow clients to
1247
+ transition without temporarily losing TUF security guarantees, we recommend
1248
+ the following procedure.
1249
+
1250
+ 1. Implement new algorithm in Warehouse.
1251
+
1252
+ 2. Regenerate existing, unexpired TUF metadata to include hashes using both the
1253
+ old and new algorithms. All new metadata going forward shall list both hash
1254
+ algorithms.
1255
+ Note, only TUF metadata that lists hash digests for target files or other
1256
+ metadata needs to be renewed, that is *bin-n*, *snapshot* and *timestamp*.
1257
+ Thus, only online keys are required to sign renewed metadata.
1258
+
1259
+ 3. Announce transition on high-visibility channels, such as `packaging on
1260
+ Python Discourse`__ and the `PyPI changes mailing list`__.
1261
+
1262
+ 4. Give popular clients such as pip and bandersnatch the chance to adopt new
1263
+ hash algorithm.
1264
+
1265
+ 5. Give end-users the chance to update clients.
1266
+
1267
+ 6. Get rough consensus to remove old hash algorithm from PyPI maintainers.
1268
+
1269
+ 7. Remove Warehouse support for old algorithm and only support new algorithm.
1270
+
1271
+ __ https://discuss.python.org/c/packaging
1272
+ __ https://mail.python.org/mailman3/lists/pypi-announce.python.org/
1273
+
1274
+
1234
1275
Appendix A: Repository Attacks Prevented by TUF
1235
1276
===============================================
1236
1277
0 commit comments