@@ -1171,8 +1171,8 @@ Managing Future Changes to the Update Process
11711171=============================================
11721172
11731173If 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__.
11761176
11771177__ https://github.com/theupdateframework/taps/pull/107
11781178
@@ -1183,6 +1183,45 @@ This PEP adds the ability for clients to use TUF metadata to improve the
11831183security of the update process.
11841184
11851185
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+
11861225Appendix A: Repository Attacks Prevented by TUF
11871226===============================================
11881227
0 commit comments