1
1
# <p align =" center " >The Update Framework Specification
2
2
3
- Last modified: ** 5 March 2020**
3
+ Last modified: ** 6 March 2020**
4
4
5
- Version: ** 1.0.0 **
5
+ Version: ** 1.0.1 **
6
6
7
7
We strive to make the specification easy to implement, so if you come across
8
8
any inconsistencies or experience any difficulty, do let us know by sending an
@@ -709,10 +709,9 @@ repo](https://github.com/theupdateframework/specification/issues).
709
709
710
710
* ** 4.4. File formats: snapshot.json**
711
711
712
- The snapshot.json file is signed by the snapshot role. It lists the version
713
- numbers of only the top-level targets and all delegated targets role metadata.
714
- The metadata length and hashes are OPTIONAL for the top-level targets and
715
- all delegated targets roles.
712
+ The snapshot.json file is signed by the snapshot role. It MUST list the
713
+ version numbers of the top-level targets metadata and all delegated targets
714
+ metadata. It MAY also list their lengths and file hashes.
716
715
717
716
The "signed" portion of snapshot.json is as follows:
718
717
@@ -732,18 +731,23 @@ repo](https://github.com/theupdateframework/specification/issues).
732
731
, ...
733
732
}
734
733
735
- METAPATH is the metadata file's path on the repository relative to the
736
- metadata base URL.
734
+ METAPATH is the file path of the metadata on the repository relative to the
735
+ metadata base URL. For snapshot.json, these are top-level targets metadata
736
+ and delegated targets metadata.
737
737
738
- VERSION is listed for the top-level targets and all delegated targets roles
739
- available on the repository .
738
+ VERSION is the integer version number as shown in the metadata file at
739
+ METAPATH .
740
740
741
- LENGTH is the integer length in bytes of the metadata file. It is
742
- OPTIONAL for all roles.
741
+ LENGTH is the integer length in bytes of the metadata file at METAPATH. It
742
+ is OPTIONAL and can be omitted to reduce the snapshot metadata file size. In
743
+ that case the client MUST use a custom download limit for the listed
744
+ metadata.
743
745
744
- HASHES is the dictionary that specifies one or more hashes, including
745
- the cryptographic hash function. For example: { "sha256": HASH, ... }. It is
746
- OPTIONAL for all roles.
746
+ HASHES is a dictionary that specifies one or more hashes of the metadata
747
+ file at METAPATH, including their cryptographic hash function. For example:
748
+ { "sha256": HASH, ... }. HASHES is OPTIONAL and can be omitted to reduce
749
+ the snapshot metadata file size. In that case the repository MUST guarantee
750
+ that VERSION alone unambiguously identifies the metadata at METAPATH.
747
751
748
752
A snapshot.json example file:
749
753
@@ -958,8 +962,8 @@ repo](https://github.com/theupdateframework/specification/issues).
958
962
959
963
* ** 4.6. File formats: timestamp.json**
960
964
961
- The timestamp file is signed by a timestamp key. It indicates the
962
- latest versions of other files and is frequently resigned to limit the
965
+ The timestamp file is signed by a timestamp key. It indicates the latest
966
+ version of the snapshot metadata and is frequently resigned to limit the
963
967
amount of time a client can be kept unaware of interference with obtaining
964
968
updates.
965
969
@@ -1072,8 +1076,8 @@ repo](https://github.com/theupdateframework/specification/issues).
1072
1076
* ** 1.1** . Let N denote the version number of the trusted root metadata file.
1073
1077
1074
1078
* ** 1.2** . ** Try downloading version N+1 of the root metadata file** , up to
1075
- some X number of bytes (because the size is unknown). The value for X is set
1076
- by the authors of the application using TUF. For example, X may be tens of
1079
+ some W number of bytes (because the size is unknown). The value for W is set
1080
+ by the authors of the application using TUF. For example, W may be tens of
1077
1081
kilobytes. The filename used to download the root metadata file is of the
1078
1082
fixed form VERSION_NUMBER.FILENAME.EXT (e.g., 42.root.json). If this file is
1079
1083
not available, or we have downloaded more than Y number of root metadata files
@@ -1125,9 +1129,9 @@ repo](https://github.com/theupdateframework/specification/issues).
1125
1129
* ** 1.10** . ** Set whether consistent snapshots are used as per the trusted
1126
1130
root metadata file** (see Section 4.3).
1127
1131
1128
- ** 2** . ** Download the timestamp metadata file** , up to Y number of bytes
1129
- (because the size is unknown.) The value for Y is set by the authors of the
1130
- application using TUF. For example, Y may be tens of kilobytes. The filename
1132
+ ** 2** . ** Download the timestamp metadata file** , up to X number of bytes
1133
+ (because the size is unknown). The value for X is set by the authors of the
1134
+ application using TUF. For example, X may be tens of kilobytes. The filename
1131
1135
used to download the timestamp metadata file is of the fixed form FILENAME.EXT
1132
1136
(e.g., timestamp.json). The client MUST write the file to non-volatile storage
1133
1137
as FILENAME.EXT.
@@ -1149,8 +1153,10 @@ as FILENAME.EXT.
1149
1153
file. If the new timestamp metadata file has expired, discard it, abort the
1150
1154
update cycle, and report the potential freeze attack.
1151
1155
1152
- ** 3** . ** Download snapshot metadata file** , up to the number of bytes specified
1153
- in the timestamp metadata file. If consistent snapshots are not used (see
1156
+ ** 3** . ** Download snapshot metadata file** , up to either the number of bytes
1157
+ specified in the timestamp metadata file, or some Y number of bytes. The value
1158
+ for Y is set by the authors of the application using TUF. For example, Y may be
1159
+ tens of kilobytes. If consistent snapshots are not used (see
1154
1160
Section 7), then the filename used to download the snapshot metadata file is of
1155
1161
the fixed form FILENAME.EXT (e.g., snapshot.json). Otherwise, the filename is
1156
1162
of the form VERSION_NUMBER.FILENAME.EXT (e.g., 42.snapshot.json), where
@@ -1159,10 +1165,10 @@ the timestamp metadata file. In either case, the client MUST write the file to
1159
1165
non-volatile storage as FILENAME.EXT.
1160
1166
1161
1167
* ** 3.1** . ** Check against timestamp metadata.** The hashes and version
1162
- number of the new snapshot metadata file MUST match the hashes and version
1163
- number listed in timestamp metadata. If hashes and version do not match,
1164
- discard the new snapshot metadata, abort the update cycle, and report the
1165
- failure.
1168
+ number of the new snapshot metadata file MUST match the hashes (if any) and
1169
+ version number listed in the trusted timestamp metadata. If hashes and
1170
+ version do not match, discard the new snapshot metadata, abort the update
1171
+ cycle, and report the failure.
1166
1172
1167
1173
* ** 3.2** . ** Check signatures.** The new snapshot metadata file MUST have
1168
1174
been signed by a threshold of keys specified in the trusted root metadata
@@ -1207,11 +1213,12 @@ VERSION_NUMBER is the version number of the targets metadata file listed in the
1207
1213
snapshot metadata file. In either case, the client MUST write the file to
1208
1214
non-volatile storage as FILENAME.EXT.
1209
1215
1210
- * ** 4.1** . ** Check against snapshot metadata.** The hashes (if any), and
1211
- version number of the new targets metadata file MUST match the trusted
1212
- snapshot metadata. This is done, in part, to prevent a mix-and-match attack
1213
- by man-in-the-middle attackers. If the new targets metadata file does not
1214
- match, discard it, abort the update cycle, and report the failure.
1216
+ * ** 4.1** . ** Check against snapshot metadata.** The hashes and version
1217
+ number of the new targets metadata file MUST match the hashes (if any) and
1218
+ version number listed in the trusted snapshot metadata. This is done, in
1219
+ part, to prevent a mix-and-match attack by man-in-the-middle attackers. If
1220
+ the new targets metadata file does not match, discard it, abort the update
1221
+ cycle, and report the failure.
1215
1222
1216
1223
* ** 4.2** . ** Check for an arbitrary software attack.** The new targets
1217
1224
metadata file MUST have been signed by a threshold of keys specified in the
0 commit comments