@@ -1086,19 +1086,20 @@ non-volatile storage as FILENAME.EXT.
1086
1086
1087
1087
* ** 3.3** . ** Check for a rollback attack.**
1088
1088
1089
- * ** 3.3.1** . Note that the trusted snapshot metadata file may be checked for
1090
- authenticity, but its expiration does not matter for the following purposes.
1089
+ * ** 3.3.1** . Note that the trusted snapshot metadata file may be checked
1090
+ for authenticity, but its expiration does not matter for the following
1091
+ purposes.
1091
1092
1092
- * ** 3.3.2** . The version number of the trusted snapshot metadata file, if
1093
- any, MUST be less than or equal to the version number of the new snapshot
1094
- metadata file.
1093
+ * ** 3.3.2** . The version number of the trusted snapshot metadata file, if
1094
+ any, MUST be less than or equal to the version number of the new snapshot
1095
+ metadata file.
1095
1096
1096
- * ** 3.3.3** . The version number of the targets metadata file, and all
1097
- delegated targets metadata files (if any), in the trusted snapshot metadata
1098
- file, if any, MUST be less than or equal to its version number in the new
1099
- snapshot metadata file. Furthermore, any targets metadata filename that was
1100
- listed in the trusted snapshot metadata file, if any, MUST continue to be
1101
- listed in the new snapshot metadata file.
1097
+ * ** 3.3.3** . The version number of the targets metadata file, and all
1098
+ delegated targets metadata files (if any), in the trusted snapshot metadata
1099
+ file, if any, MUST be less than or equal to its version number in the new
1100
+ snapshot metadata file. Furthermore, any targets metadata filename that was
1101
+ listed in the trusted snapshot metadata file, if any, MUST continue to be
1102
+ listed in the new snapshot metadata file.
1102
1103
1103
1104
* ** 3.4** . ** Check for a freeze attack.** The latest known time should be
1104
1105
lower than the expiration timestamp in the new snapshot metadata file. If
@@ -1116,69 +1117,68 @@ VERSION_NUMBER is the version number of the targets metadata file listed in the
1116
1117
snapshot metadata file. In either case, the client MUST write the file to
1117
1118
non-volatile storage as FILENAME.EXT.
1118
1119
1119
- 4.1. **Check against snapshot metadata.** The hashes (if any), and version
1120
- number of the new targets metadata file MUST match the trusted snapshot metadata.
1121
- This is done, in part, to prevent a mix-and-match attack by man-in-the-middle
1122
- attackers.
1120
+ * ** 4.1** . ** Check against snapshot metadata.** The hashes (if any), and
1121
+ version number of the new targets metadata file MUST match the trusted
1122
+ snapshot metadata. This is done, in part, to prevent a mix-and-match attack
1123
+ by man-in-the-middle attackers.
1123
1124
1124
- 4.2. **Check for an arbitrary software attack.** The new targets metadata file
1125
- MUST have been signed by a threshold of keys specified in the trusted root
1126
- metadata file.
1125
+ * ** 4.2** . ** Check for an arbitrary software attack.** The new targets
1126
+ metadata file MUST have been signed by a threshold of keys specified in the
1127
+ trusted root metadata file.
1127
1128
1128
- 4.3. **Check for a rollback attack.** The version number of the trusted
1129
- targets metadata file, if any, MUST be less than or equal to the version
1130
- number of the new targets metadata file.
1129
+ * ** 4.3** . ** Check for a rollback attack.** The version number of the trusted
1130
+ targets metadata file, if any, MUST be less than or equal to the version
1131
+ number of the new targets metadata file.
1131
1132
1132
- 4.4. **Check for a freeze attack.** The latest known time should be lower
1133
- than the expiration timestamp in the new targets metadata file. If so,
1134
- the new targets metadata file becomes the trusted targets metadata file.
1133
+ * ** 4.4** . ** Check for a freeze attack.** The latest known time should be
1134
+ lower than the expiration timestamp in the new targets metadata file. If so,
1135
+ the new targets metadata file becomes the trusted targets metadata file.
1135
1136
1136
- 4.5. **Perform a preorder depth-first search for metadata about the desired
1137
- target, beginning with the top-level targets role.**
1137
+ * ** 4.5** . ** Perform a preorder depth-first search for metadata about the
1138
+ desired target, beginning with the top-level targets role.**
1138
1139
1139
- 4.5.1. If this role has been visited before, then skip this role (so that
1140
- cycles in the delegation graph are avoided).
1141
- Otherwise, if an application-specific maximum number of roles have been
1142
- visited, then go to step 5 (so that attackers cannot cause the client to
1143
- waste excessive bandwidth or time).
1144
- Otherwise, if this role contains metadata about the desired target, then go
1145
- to step 5.
1140
+ * ** 4.5.1** . If this role has been visited before, then skip this role (so
1141
+ that cycles in the delegation graph are avoided). Otherwise, if an
1142
+ application-specific maximum number of roles have been visited, then go to
1143
+ step 5 (so that attackers cannot cause the client to waste excessive
1144
+ bandwidth or time). Otherwise, if this role contains metadata about the
1145
+ desired target, then go to step 5.
1146
1146
1147
- 4.5.2. Otherwise, recursively search the list of delegations in order of
1148
- appearance.
1147
+ * ** 4.5.2** . Otherwise, recursively search the list of delegations in order
1148
+ of appearance.
1149
1149
1150
- 4.5.2.1. If the current delegation is a multi-role delegation, recursively
1151
- visit each role, and check that each has signed exactly the same non-custom
1152
- metadata (i.e., length and hashes) about the target (or the lack of any
1153
- such metadata).
1150
+ * ** 4.5.2.1** . If the current delegation is a multi-role delegation,
1151
+ recursively visit each role, and check that each has signed exactly the
1152
+ same non-custom metadata (i.e., length and hashes) about the target (or
1153
+ the lack of any such metadata).
1154
1154
1155
- 4.5.2.2. If the current delegation is a terminating delegation, then jump
1156
- to step 5.
1155
+ * ** 4.5.2.2** . If the current delegation is a terminating delegation,
1156
+ then jump to step 5.
1157
1157
1158
- 4.5.2.3. Otherwise, if the current delegation is a non-terminating
1159
- delegation, continue processing the next delegation, if any. Stop the
1160
- search, and jump to step 5 as soon as a delegation returns a result.
1158
+ * ** 4.5.2.3** . Otherwise, if the current delegation is a non-terminating
1159
+ delegation, continue processing the next delegation, if any. Stop the
1160
+ search, and jump to step 5 as soon as a delegation returns a result.
1161
1161
1162
- 5. Verify the desired target against its targets metadata
1162
+ ** 5 ** . ** Verify the desired target against its targets metadata** .
1163
1163
1164
- 5.1. If there is no targets metadata about this target, then report that
1164
+ * ** 5.1** . If there is no targets metadata about this target, then report that
1165
1165
there is no such target.
1166
1166
1167
- 5.2. Otherwise, download the target (up to the number of bytes specified in
1168
- the targets metadata), and verify that its hashes match the targets
1169
- metadata. (We download up to this number of bytes, because in some cases,
1170
- the exact number is unknown. This may happen, for example, if an external
1171
- program is used to compute the root hash of a tree of targets files, and
1172
- this program does not provide the total size of all of these files.)
1173
- If consistent snapshots are not used (see Section 7), then the filename
1174
- used to download the target file is of the fixed form FILENAME.EXT (e.g.,
1175
- foobar.tar.gz).
1176
- Otherwise, the filename is of the form HASH.FILENAME.EXT (e.g.,
1177
- c14aeb4ac9f4a8fc0d83d12482b9197452f6adf3eb710e3b1e2b79e8d14cb681.foobar.tar.gz) ,
1178
- where HASH is one of the hashes of the targets file listed in the targets
1179
- metadata file found earlier in step 4.
1180
- In either case, the client MUST write the file to non-volatile storage as
1181
- FILENAME.EXT.
1167
+ * ** 5.2** . Otherwise, download the target (up to the number of bytes
1168
+ specified in the targets metadata), and verify that its hashes match the
1169
+ targets metadata. (We download up to this number of bytes, because in some
1170
+ cases, the exact number is unknown. This may happen, for example, if an
1171
+ external program is used to compute the root hash of a tree of targets files,
1172
+ and this program does not provide the total size of all of these files.) If
1173
+ consistent snapshots are not used (see Section 7), then the filename used to
1174
+ download the target file is of the fixed form FILENAME.EXT (e.g.,
1175
+ foobar.tar.gz).
1176
+
1177
+ Otherwise, the filename is of the form HASH.FILENAME.EXT (e.g. ,
1178
+ c14aeb4ac9f4a8fc0d83d12482b9197452f6adf3eb710e3b1e2b79e8d14cb681.foobar.tar.gz),
1179
+ where HASH is one of the hashes of the targets file listed in the targets
1180
+ metadata file found earlier in step 4. In either case, the client MUST write
1181
+ the file to non-volatile storage as FILENAME.EXT.
1182
1182
1183
1183
## ** 6. Usage**
1184
1184
0 commit comments