Skip to content

Commit 2585a4e

Browse files
Explain why we check hashes before signatures (#142)
* explain why we check hashes before signatures Signed-off-by: Trishank Karthik Kuppusamy <trishank.kuppusamy@datadoghq.com> bump version * Update tuf-spec.md Co-authored-by: Joshua Lock <jlock@vmware.com> * Update tuf-spec.md Co-authored-by: Joshua Lock <jlock@vmware.com> Co-authored-by: Joshua Lock <jlock@vmware.com>
1 parent 534aa36 commit 2585a4e

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

tuf-spec.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Boilerplate: copyright no, conformance no
1616
Local Boilerplate: header yes
1717
Markup Shorthands: css no, markdown yes
1818
Metadata Include: This version off, Abstract off
19-
Text Macro: VERSION 1.0.24
19+
Text Macro: VERSION 1.0.25
2020
</pre>
2121

2222
Note: We strive to make the specification easy to implement, so if you come
@@ -1399,9 +1399,11 @@ it in the next step.
13991399
2. **Check against timestamp role's snapshot hash**. The hashes
14001400
of the new snapshot metadata file MUST match the hashes, if any, listed in
14011401
the trusted timestamp metadata. This is done, in part, to prevent a
1402-
mix-and-match attack by man-in-the-middle attackers. If the hashes do not
1403-
match, discard the new snapshot metadata, abort the update cycle, and report
1404-
the failure.
1402+
mix-and-match attack by man-in-the-middle attackers. It is safe to check the
1403+
hashes before the signatures, because the hashes come from the timestamp
1404+
role, which we have already verified in the previous step; it is also a quick
1405+
way to reject bad metadata. If the hashes do not match, discard the
1406+
new snapshot metadata, abort the update cycle, and report the failure.
14051407

14061408
3. **Check for an arbitrary software attack**. The new snapshot
14071409
metadata file MUST have been signed by a threshold of keys specified in the
@@ -1448,9 +1450,11 @@ it in the next step.
14481450
2. **Check against snapshot role's targets hash**. The hashes
14491451
of the new targets metadata file MUST match the hashes, if any, listed in the
14501452
trusted snapshot metadata. This is done, in part, to prevent a mix-and-match
1451-
attack by man-in-the-middle attackers. If the new targets metadata file does
1452-
not match, discard the new target metadata, abort the update cycle, and
1453-
report the failure.
1453+
attack by man-in-the-middle attackers. It is safe to check the hashes before
1454+
the signatures, because the hashes come from the snapshot role, which we have
1455+
already verified in the previous step; it is also a quick way to reject bad
1456+
metadata. If the new targets metadata file does not match, discard the new
1457+
target metadata, abort the update cycle, and report the failure.
14541458

14551459
3. **Check for an arbitrary software attack**. The new targets
14561460
metadata file MUST have been signed by a threshold of keys specified in the

0 commit comments

Comments
 (0)