theupdateframework / specification

The Update Framework specification
https://theupdateframework.github.io/specification/
Other
368 stars 54 forks source link

root version comparison still unclear #240

Open jku opened 2 years ago

jku commented 2 years ago

This text has been modified a lot (see #209 for latest) but the root update section of client workflow is still difficult for new readers:

5. Check for a rollback attack. The version number of the trusted root metadata file (version N) MUST be less than the version number of the new root metadata file (version N+1). Effectively, this means checking that the version number signed in the new root metadata file is indeed N+1. If the version of the new root metadata file is less than the version of the trusted metadata file, discard it, abort the update cycle, and report the rollback attack. In case they are equal, again discard the new root metadata, but proceed the update cycle with the already trusted root metadata.

This is still very long and not super clear. Examples:

Why don't we just say that only accepted version is N+1, everything else should be an error (because we tried to download N+1 and were given something else)?

mnm678 commented 2 years ago

Related to #150 (we should make sure it's fixed there)

lukpueh commented 2 years ago

Also related to first item in #235