-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion of TAP 16: Snapshot Merkle trees #134
Comments
Merkle tree implementations are susceptible to a second pre-image attack (see, for example, here or here). Fortunately, there is a well-known fix (as implemented in Certificate Transparency): differentiating between leaf nodes and internal nodes in the tree by prepending different byte values for each node type to the hash data of the node. With TAP 16, how can help implementors avoid opening themselves up to this kind of attack? Especially given that we are trying to avoid specifying the Merkle tree algorithm as part of the TUF specification. Is this an argument for including the algorithm in the specification (where we could specify the need for different byte prefixes for internal and lead nodes), rather than as part of an implementation's POUF? I recognise that auditors help here detect this second preimage attack against the Merkle tree. However, as above, the TAP doesn't appear to have decided whether auditors are required or not. |
I hesitate to specify the exact algorithm, as there was some interest in using Verkle trees, or other variations. It also fits with the overall 'no judgement' philosophy of TUF. That being said, I think the TAP should mention this attack, and perhaps other details about Merkle trees. This may also be a good fit for the secondary literature discussed in theupdateframework/specification#91. |
Some additional issues/questions for consideration based on my final review before hitting approve:
|
(just leaving notes for future now that I'm reading this again) the TAP "security analysis" section should talk about the increased attack surface and increased client complexity -- I'm still not totally convinced adding this into TUF as is, is the right move. If the repository can use (and switching between) all the different delegation models as it wishes, the clients have the classic TLS handshake issue: a compromised/malicious repository can just choose the delegation mechanism that it has found a client bug in. We might want to consider calling this a different protocol (that only supports merkle delegation). Alternatively -- and I'm hand waving now -- we could consider making it possible for TUF root role to explicitly limit the features that are allowed in this repository (making it impossible to modify this selection with just lower level keys): in practice this could be a string array in the root payload that limits which features are allowed |
I agree. Right now, it's not obvious to a client which TAP(s), if any, a repo supports at all. |
TAP says
I'm not sure if this tries to say that leaf_contents value matches the |
On Client interaction with auditors:
I understand we would like this to happen but this cannot be a "must" for clients:
|
Things I believe are missing from TAP:
The main issue on that list seems to be that clients cannot download a consistent snapshot of the repository as the merkle node API is not consistent as far as I can tell. Maybe I've misunderstood something? |
I don't claim to have really crunched the numbers but just to provide a reason why this should be looked at, a quick estimate: Assumptions:
Comparisonbaselinenumber of requests: Today installers like pip do ~3 requests (pip version check, index download, package download) bandwidth: TODO Traditional TUFnumber of requests: A TUF-enabled installer would do 9 requests (baseline + 6 tuf metadata downloads) bandwidth: TODO (snapshot is very large, the 3 levels of targets metadata are significant) merkle-TUFnumber of requests: A merkle-TUF enabled client would do ~66 requests (baseline + traditional TUF + 3 merkle verifications, each requiring ~19 downloads) bandwidth: TODO (nothing very large, the 3 levels of targets metadata are significant) merkle-TUF with optimizationsHere we assume repository makes complete "inclusion proofs" available to clients (this is not in current TAP) number of requests: A optimized-merkle-TUF enabled client would do ~12 requests (baseline + traditional TUF + 3 merkle inclusion proofs) bandwidth: TODO (nothing very large, the 3 levels of targets metadata are significant) |
This is a thread to discuss snapshot Merkle trees, introduced in #125.
Pull requests relating to TAP 16: #133
Outstanding issues and questions relating to this TAP (from @joshuagl in #125 (comment))
The text was updated successfully, but these errors were encountered: