@@ -1296,10 +1296,10 @@ it in the next step.
1296
1296
reached. Therefore, it MUST temporarily turn on consistent snapshots in
1297
1297
order to download * versioned* root metadata files as described next.
1298
1298
1299
- 1 . Let N denote the version number of the trusted root metadata
1299
+ 2 . Let N denote the version number of the trusted root metadata
1300
1300
file.
1301
1301
1302
- 1 . ** Try downloading version N+1 of the root metadata file** , up to
1302
+ 3 . ** Try downloading version N+1 of the root metadata file** , up to
1303
1303
some W number of bytes (because the size is unknown). The value for W is set
1304
1304
by the authors of the application using TUF. For example, W may be tens of
1305
1305
kilobytes. The filename used to download the root metadata file is of the
@@ -1309,15 +1309,15 @@ it in the next step.
1309
1309
The value for Y is set by the authors of the application using TUF. For
1310
1310
example, Y may be 2^10.
1311
1311
1312
- 1 . ** Check for an arbitrary software attack.** Version N+1 of the root
1312
+ 4 . ** Check for an arbitrary software attack.** Version N+1 of the root
1313
1313
metadata file MUST have been signed by: (1) a threshold of keys specified in
1314
1314
the trusted root metadata file (version N), and (2) a threshold of keys
1315
1315
specified in the new root metadata file being validated (version N+1). If
1316
1316
version N+1 is not signed as required, discard it, abort the update cycle,
1317
1317
and report the signature failure. On the next update cycle, begin at step
1318
1318
[[ #update-root]] and version N of the root metadata file.
1319
1319
1320
- 1 . ** Check for a rollback attack.** The version number of the trusted
1320
+ 5 . ** Check for a rollback attack.** The version number of the trusted
1321
1321
root metadata file (version N) MUST be less than or equal to the version
1322
1322
number of the new root metadata file (version N+1). Effectively, this means
1323
1323
checking that the version number signed in the new root metadata file is
@@ -1326,24 +1326,24 @@ it in the next step.
1326
1326
rollback attack. On the next update cycle, begin at step [[ #update-root]]
1327
1327
and version N of the root metadata file.
1328
1328
1329
- 1 . Note that the expiration of the new (intermediate) root metadata
1329
+ 6 . Note that the expiration of the new (intermediate) root metadata
1330
1330
file does not matter yet, because we will check for it in step 5.3.10.
1331
1331
1332
- 1 . ** Set the trusted root metadata file** to the new root metadata
1332
+ 7 . ** Set the trusted root metadata file** to the new root metadata
1333
1333
file.
1334
1334
1335
- 1 . ** Persist root metadata.** The client MUST write the file to
1335
+ 8 . ** Persist root metadata.** The client MUST write the file to
1336
1336
non-volatile storage as FILENAME.EXT (e.g. root.json).
1337
1337
1338
- 1 . Repeat steps 5.3.1 to 5.3.8
1338
+ 9 . Repeat steps 5.3.1 to 5.3.8
1339
1339
1340
- 1 . ** Check for a freeze attack.** The expiration timestamp in the
1340
+ 10 . ** Check for a freeze attack.** The expiration timestamp in the
1341
1341
trusted root metadata file MUST be higher than the fixed update start time.
1342
1342
If the trusted root metadata file has expired, abort the update cycle,
1343
1343
report the potential freeze attack. On the next update cycle, begin at step
1344
1344
5.1 and version N of the root metadata file.
1345
1345
1346
- 1 . ** If the timestamp and / or snapshot keys have been rotated, then delete the
1346
+ 11 . ** If the timestamp and / or snapshot keys have been rotated, then delete the
1347
1347
trusted timestamp and snapshot metadata files.** This is done
1348
1348
in order to recover from fast-forward attacks after the repository has been
1349
1349
compromised and recovered. A _ fast-forward attack_ happens when attackers
@@ -1353,7 +1353,7 @@ it in the next step.
1353
1353
paper] ( https://theupdateframework.io/papers/prevention-rollback-attacks-atc2017.pdf )
1354
1354
for more details.
1355
1355
1356
- 1 . ** Set whether consistent snapshots are used as per the trusted**
1356
+ 12 . ** Set whether consistent snapshots are used as per the trusted**
1357
1357
root metadata file (see [[ #file-formats-root]] ).
1358
1358
1359
1359
## Update the timestamp role ## {#update-timestamp}
@@ -1364,32 +1364,32 @@ it in the next step.
1364
1364
used to download the timestamp metadata file is of the fixed form FILENAME.EXT
1365
1365
(e.g., timestamp.json).
1366
1366
1367
- 1 . ** Check for an arbitrary software attack.** The new timestamp
1367
+ 2 . ** Check for an arbitrary software attack.** The new timestamp
1368
1368
metadata file MUST have been signed by a threshold of keys specified in the
1369
1369
trusted root metadata file. If the new timestamp metadata file is not
1370
1370
properly signed, discard it, abort the update cycle, and report the signature
1371
1371
failure.
1372
1372
1373
- 1 . ** Check for a rollback attack.**
1373
+ 3 . ** Check for a rollback attack.**
1374
1374
1375
1375
1 . The version number of the trusted timestamp metadata file, if
1376
1376
any, MUST be less than or equal to the version number of the new timestamp
1377
1377
metadata file. If the new timestamp metadata file is older than the
1378
1378
trusted timestamp metadata file, discard it, abort the update cycle, and
1379
1379
report the potential rollback attack.
1380
1380
1381
- 1 . The version number of the snapshot metadata file in the
1381
+ 2 . The version number of the snapshot metadata file in the
1382
1382
trusted timestamp metadata file, if any, MUST be less than or equal to its
1383
1383
version number in the new timestamp metadata file. If not, discard the new
1384
1384
timestamp metadata file, abort the update cycle, and report the failure.
1385
1385
1386
- 1 . ** Check for a freeze attack.** The expiration timestamp in the
1386
+ 4 . ** Check for a freeze attack.** The expiration timestamp in the
1387
1387
new timestamp metadata file MUST be higher than the fixed update start time.
1388
1388
If so, the new timestamp metadata file becomes the trusted timestamp
1389
1389
metadata file. If the new timestamp metadata file has expired, discard it,
1390
1390
abort the update cycle, and report the potential freeze attack.
1391
1391
1392
- 1 . ** Persist timestamp metadata** . The client MUST write the file
1392
+ 5 . ** Persist timestamp metadata** . The client MUST write the file
1393
1393
to non-volatile storage as FILENAME.EXT (e.g. timestamp.json).
1394
1394
1395
1395
## Update the snapshot role ## {#update-snapshot}
@@ -1405,25 +1405,25 @@ it in the next step.
1405
1405
the version number of the snapshot metadata file listed in the timestamp
1406
1406
metadata file.
1407
1407
1408
- 1 . ** Check against timestamp role's snapshot hash** . The hashes
1408
+ 2 . ** Check against timestamp role's snapshot hash** . The hashes
1409
1409
of the new snapshot metadata file MUST match the hashes, if any, listed in
1410
1410
the trusted timestamp metadata. This is done, in part, to prevent a
1411
1411
mix-and-match attack by man-in-the-middle attackers. If the hashes do not
1412
1412
match, discard the new snapshot metadata, abort the update cycle, and report
1413
1413
the failure.
1414
1414
1415
- 1 . ** Check for an arbitrary software attack** . The new snapshot
1415
+ 3 . ** Check for an arbitrary software attack** . The new snapshot
1416
1416
metadata file MUST have been signed by a threshold of keys specified in the
1417
1417
trusted root metadata file. If the new snapshot metadata file is not signed
1418
1418
as required, discard it, abort the update cycle, and report the signature
1419
1419
failure.
1420
1420
1421
- 1 . ** Check against timestamp role's snapshot version** . The version
1421
+ 4 . ** Check against timestamp role's snapshot version** . The version
1422
1422
number of the new snapshot metadata file MUST match the version number listed
1423
1423
in the trusted timestamp metadata. If the versions do not match, discard the
1424
1424
new snapshot metadata, abort the update cycle, and report the failure.
1425
1425
1426
- 1 . ** Check for a rollback attack** . The version number of the targets
1426
+ 5 . ** Check for a rollback attack** . The version number of the targets
1427
1427
metadata file, and all delegated targets metadata files, if any, in the
1428
1428
trusted snapshot metadata file, if any, MUST be less than or equal to its
1429
1429
version number in the new snapshot metadata file. Furthermore, any targets
@@ -1432,14 +1432,14 @@ it in the next step.
1432
1432
these conditions are not met, discard the new snapshot metadata file, abort
1433
1433
the update cycle, and report the failure.
1434
1434
1435
- 1 . ** Check for a freeze attack** . The expiration timestamp in the
1435
+ 6 . ** Check for a freeze attack** . The expiration timestamp in the
1436
1436
new snapshot metadata file MUST be higher than the fixed update start time.
1437
1437
If so, the new snapshot metadata file becomes the trusted snapshot metadata
1438
1438
file. If the new snapshot metadata file is expired, discard it, abort the
1439
1439
update cycle, and report the potential freeze attack.
1440
1440
1441
1441
1442
- 1 . ** Persist snapshot metadata** . The client MUST write the file to
1442
+ 7 . ** Persist snapshot metadata** . The client MUST write the file to
1443
1443
non-volatile storage as FILENAME.EXT (e.g. snapshot.json).
1444
1444
1445
1445
## Update the targets role ## {#update-targets}
@@ -1454,33 +1454,33 @@ it in the next step.
1454
1454
42.targets.json), where VERSION_NUMBER is the version number of the targets
1455
1455
metadata file listed in the snapshot metadata file.
1456
1456
1457
- 1 . ** Check against snapshot role's targets hash** . The hashes
1457
+ 2 . ** Check against snapshot role's targets hash** . The hashes
1458
1458
of the new targets metadata file MUST match the hashes, if any, listed in the
1459
1459
trusted snapshot metadata. This is done, in part, to prevent a mix-and-match
1460
1460
attack by man-in-the-middle attackers. If the new targets metadata file does
1461
1461
not match, discard the new target metadata, abort the update cycle, and
1462
1462
report the failure.
1463
1463
1464
- 1 . ** Check for an arbitrary software attack** . The new targets
1464
+ 3 . ** Check for an arbitrary software attack** . The new targets
1465
1465
metadata file MUST have been signed by a threshold of keys specified in the
1466
1466
trusted root metadata file. If the new targets metadata file is not signed
1467
1467
as required, discard it, abort the update cycle, and report the failure.
1468
1468
1469
- 1 . ** Check against snapshot role's targets version** . The version
1469
+ 4 . ** Check against snapshot role's targets version** . The version
1470
1470
number of the new targets metadata file MUST match the version number listed
1471
1471
in the trusted snapshot metadata. If the versions do not match, discard it,
1472
1472
abort the update cycle, and report the failure.
1473
1473
1474
- 1 . ** Check for a freeze attack** . The expiration timestamp in the
1474
+ 5 . ** Check for a freeze attack** . The expiration timestamp in the
1475
1475
new targets metadata file MUST be higher than the fixed update start time.
1476
1476
If so, the new targets metadata file becomes the trusted targets metadata
1477
1477
file. If the new targets metadata file is expired, discard it, abort the
1478
1478
update cycle, and report the potential freeze attack.
1479
1479
1480
- 1 . ** Persist targets metadata** . The client MUST write the file to
1480
+ 6 . ** Persist targets metadata** . The client MUST write the file to
1481
1481
non-volatile storage as FILENAME.EXT (e.g. targets.json).
1482
1482
1483
- 1 . ** Perform a pre-order depth-first search for metadata about the
1483
+ 7 . ** Perform a pre-order depth-first search for metadata about the
1484
1484
desired target, beginning with the top-level targets role.** Note: If
1485
1485
any metadata requested in steps 5.6.7.1 - 5.6.7.2 cannot be downloaded nor
1486
1486
validated, end the search and report that the target cannot be found.
@@ -1492,18 +1492,18 @@ it in the next step.
1492
1492
bandwidth or time). Otherwise, if this role contains metadata about the
1493
1493
desired target, then go to step [[ #fetch-target]] .
1494
1494
1495
- 1 . Otherwise, recursively search the list of delegations in
1495
+ 2 . Otherwise, recursively search the list of delegations in
1496
1496
order of appearance.
1497
1497
1498
1498
1 . If the current delegation is a multi-role delegation,
1499
1499
recursively visit each role, and check that each has signed exactly the
1500
1500
same non-custom metadata (i.e., length and hashes) about the target (or
1501
1501
the lack of any such metadata).
1502
1502
1503
- 1 . If the current delegation is a terminating delegation,
1503
+ 2 . If the current delegation is a terminating delegation,
1504
1504
then jump to step [[ #fetch-target]] .
1505
1505
1506
- 1 . Otherwise, if the current delegation is a
1506
+ 3 . Otherwise, if the current delegation is a
1507
1507
non-terminating delegation, continue processing the next delegation, if
1508
1508
any. Stop the search, and jump to step [[ #fetch-target]] as soon as a delegation
1509
1509
returns a result.
@@ -1512,10 +1512,10 @@ it in the next step.
1512
1512
1513
1513
1 . ** Verify the desired target against its targets metadata** .
1514
1514
1515
- 1 . If there is no targets metadata about this target, abort the
1515
+ 2 . If there is no targets metadata about this target, abort the
1516
1516
update cycle and report that there is no such target.
1517
1517
1518
- 1 . Otherwise, download the target (up to the number of bytes
1518
+ 3 . Otherwise, download the target (up to the number of bytes
1519
1519
specified in the targets metadata), and verify that its hashes match the
1520
1520
targets metadata. (We download up to this number of bytes, because in some
1521
1521
cases, the exact number is unknown. This may happen, for example, if an
0 commit comments