@@ -994,66 +994,65 @@ repo](https://github.com/theupdateframework/specification/issues).
994
994
995
995
## ** 5. Detailed Workflows**
996
996
997
- ### **The client application**
998
-
999
- 0. **Load the trusted root metadata file.** We assume that a good, trusted
1000
- copy of this file was shipped with the package manager or software updater
1001
- using an out-of-band process. Note that the expiration of the trusted root
1002
- metadata file does not matter, because we will attempt to update it in the
1003
- next step.
1004
-
1005
- 1. **Update the root metadata file.** Since it may now be signed using
1006
- entirely different keys, the client must somehow be able to establish a
1007
- trusted line of continuity to the latest set of keys (see Section 6.1). To
1008
- do so, the client MUST download intermediate root metadata files, until the
1009
- latest available one is reached.
1010
-
1011
- 1.1. Let N denote the version number of the trusted root metadata file.
1012
-
1013
- 1.2. **Try downloading version N+1 of the root metadata file**, up to
1014
- some X number of bytes (because the size is unknown). The value for X is
1015
- set by the authors of the application using TUF. For example, X may be
1016
- tens of kilobytes. The filename used to download the root metadata file
1017
- is of the fixed form VERSION_NUMBER.FILENAME.EXT (e.g., 42.root.json). If
1018
- this file is not available, then go to step 1.8.
1019
-
1020
- 1.3. **Check signatures.** Version N+1 of the root metadata file MUST
1021
- have been signed by: (1) a threshold of keys specified in the trusted
1022
- root metadata file (version N), and (2) a threshold of keys specified in
1023
- the new root metadata file being validated (version N+1).
1024
-
1025
- 1.4. **Check for a rollback attack.** The version number of the trusted
1026
- root metadata file (version N) must be less than or equal to the version
1027
- number of the new root metadata file (version N+1). Effectively, this
1028
- means checking that the version number signed in the new root metadata
1029
- file is indeed N+1.
1030
-
1031
- 1.5. Note that the expiration of the new (intermediate) root metadata
1032
- file does not matter yet, because we will check for it in step 1.8.
1033
-
1034
- 1.6. Set the trusted root metadata file to the new root metadata file.
1035
-
1036
- 1.7. Repeat steps 1.1 to 1.7.
1037
-
1038
- 1.8. **Check for a freeze attack.** The latest known time should be lower
1039
- than the expiration timestamp in the trusted root metadata file.
1040
-
1041
- 1.9. **If the timestamp and / or snapshot keys have been rotated, then
1042
- delete the trusted timestamp and snapshot metadata files.** This is done
1043
- in order to recover from fast-forward attacks after the repository has
1044
- been compromised and recovered. A _fast-forward attack_ happens when
1045
- attackers arbitrarily increase the version numbers of: (1) the timestamp
1046
- metadata, (2) the snapshot metadata, and / or (3) the targets, or a
1047
- delegated targets, metadata file in the snapshot metadata. Please see
1048
- [the Mercury
1049
- paper](https://ssl.engineering.nyu.edu/papers/kuppusamy-mercury-usenix-2017.pdf)
1050
- for more details.
1051
-
1052
- 2. **Download the timestamp metadata file**, up to Y number of bytes
1053
- (because the size is unknown.) The value for Y is set by the authors of the
1054
- application using TUF. For example, Y may be tens of kilobytes. The
1055
- filename used to download the timestamp metadata file is of the fixed form
1056
- FILENAME.EXT (e.g., timestamp.json).
997
+ ** The client application**
998
+
999
+ 0 . ** Load the trusted root metadata file.** We assume that a good, trusted
1000
+ copy of this file was shipped with the package manager or software updater
1001
+ using an out-of-band process. Note that the expiration of the trusted root
1002
+ metadata file does not matter, because we will attempt to update it in the
1003
+ next step.
1004
+
1005
+ 1 . ** Update the root metadata file.** Since it may now be signed using
1006
+ entirely different keys, the client must somehow be able to establish a
1007
+ trusted line of continuity to the latest set of keys (see Section 6.1). To do
1008
+ so, the client MUST download intermediate root metadata files, until the
1009
+ latest available one is reached.
1010
+
1011
+ 1.1. Let N denote the version number of the trusted root metadata file.
1012
+
1013
+ 1.2. **Try downloading version N+1 of the root metadata file**, up to some
1014
+ X number of bytes (because the size is unknown). The value for X is set by
1015
+ the authors of the application using TUF. For example, X may be tens of
1016
+ kilobytes. The filename used to download the root metadata file is of the
1017
+ fixed form VERSION_NUMBER.FILENAME.EXT (e.g., 42.root.json). If this file
1018
+ is not available, then go to step 1.8.
1019
+
1020
+ 1.3. **Check signatures.** Version N+1 of the root metadata file MUST have
1021
+ been signed by: (1) a threshold of keys specified in the trusted root
1022
+ metadata file (version N), and (2) a threshold of keys specified in the new
1023
+ root metadata file being validated (version N+1).
1024
+
1025
+ 1.4. **Check for a rollback attack.** The version number of the trusted
1026
+ root metadata file (version N) must be less than or equal to the version
1027
+ number of the new root metadata file (version N+1). Effectively, this means
1028
+ checking that the version number signed in the new root metadata file is
1029
+ indeed N+1.
1030
+
1031
+ 1.5. Note that the expiration of the new (intermediate) root metadata file
1032
+ does not matter yet, because we will check for it in step 1.8.
1033
+
1034
+ 1.6. Set the trusted root metadata file to the new root metadata file.
1035
+
1036
+ 1.7. Repeat steps 1.1 to 1.7.
1037
+
1038
+ 1.8. **Check for a freeze attack.** The latest known time should be lower
1039
+ than the expiration timestamp in the trusted root metadata file.
1040
+
1041
+ 1.9. **If the timestamp and / or snapshot keys have been rotated, then
1042
+ delete the trusted timestamp and snapshot metadata files.** This is done in
1043
+ order to recover from fast-forward attacks after the repository has been
1044
+ compromised and recovered. A _fast-forward attack_ happens when attackers
1045
+ arbitrarily increase the version numbers of: (1) the timestamp metadata,
1046
+ (2) the snapshot metadata, and / or (3) the targets, or a delegated
1047
+ targets, metadata file in the snapshot metadata. Please see [the Mercury
1048
+ paper](https://ssl.engineering.nyu.edu/papers/kuppusamy-mercury-usenix-2017.pdf)
1049
+ for more details.
1050
+
1051
+ 2 . ** Download the timestamp metadata file** , up to Y number of bytes (because
1052
+ the size is unknown.) The value for Y is set by the authors of the
1053
+ application using TUF. For example, Y may be tens of kilobytes. The filename
1054
+ used to download the timestamp metadata file is of the fixed form
1055
+ FILENAME.EXT (e.g., timestamp.json).
1057
1056
1058
1057
2.1. **Check signatures.** The new timestamp metadata file must have been
1059
1058
signed by a threshold of keys specified in the trusted root metadata file.
0 commit comments