-
Notifications
You must be signed in to change notification settings - Fork 2
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
Different LeafHash
and Signature
returned when submitting the same certificate
#38
Comments
Spot on, thanks! tl;dr: the SCT is recreated for every returned entry with a different timestamp, even if the index doesn't change: Line 316 in 4fb2c2e
Right now, Tessera deduplication implementations store an index, not an SCT, so we can't support this use-case without changing this. It turns out that all these implementations leave in the static-ct repo for now so all good. This will have an impact on the size of the deduplication database though. Longer answer The index of the entry though, should be deduplicated, and the log should not grow further, as you've noticed. It's not great, and goes against Chrome's policy:
In the scenario you've observed, the SCTFE dooes not add a new certificate entry to the log. But also, this Chrome log policy statement, is not 100% clear, and might not apply to static-ct-api log. The goal here is to make sure that Certifcates can be verified for inclusion re-using the As surprising as it sounds, I don't think that it goes against neither RFC6962, and https://c2sp.org/static-ct-api. But maybe we should tighten https://c2sp.org/static-ct-api around this. RFC6962 says that you MUST integrate the certificate that was mentioned in the SCT. Note that this is about the certificate, which itself does not contain the SCT. In other words, an SCT means that you MUST integrate this certificate within the MMD, but you MAY use a different timestamp in the entry. What's interesting with static-ct, is that the index in the SCT is not binding, you could return a fake index, and it would still implement the specs. Obviously, the following behaviours, even if I don't believe they violate any standards, aren't very helpful:
We should probably make specs explicit about these behaviours. Or maybe policies are better suited for this. |
I do not agree with this conclusion :) It will be impossible to prove inclusion for any entry with an SCT whose timestamp doesn't match the one the corresponding pre-certificate was logged with: the timestamp is part of the
I think 6962 is pretty clear about it, and I'm fairly sure does not suggest anywhere that you may use different timestamps in returned SCTs from those you write to the log. In fact, Section 3.4 explicitly says it's the same timestamp:
I would argue this is, in fact, binding: the log has issued a signed statement that says "[the precert corresponding to] this cert was logged at time There would be no need to sign this statement if it weren't binding. The Static CT spec says:
i.e. leaf Otherwise, auditors hold a signed promise yet are not able to construct a proof which shows that the SCT was honoured.
The first is clearly a violation of 6962 - Section 7.3:
The 2nd and 3rd violate the Static CT spec lines I quoted above. Fortunately, I imagine it should be a fairly easy fix - either adding |
I think we agree on the spirit: there MUST be a matching entry for every returned
Agreed! Fetching the entry at The rest of this conversation is just about being very precise around wording in the policy, RFC, and static-ct-api specs to understand what space they leave. I believe that today, they leave room for misinterpretation, and that's what I meant to highlight in the Chrome Policy
This one is explicit about adding a new entry in the log for every distinct SCT. The goal is to allow for SCT inclusion checking for RFC6962 APIs. It's not 100% clear about what "SCT can be verified" means, and also note that it was added to the policy recently, but let's alleviate that. RFC6962As opposed to the Chrome Policy, I cannot find anything in RFC6962 that says that the timestamp of the SCT returned by add-pre-chain must be integrated in the log, i.e that there MUST be an entry per SCT. Do you know if it's said anywhere? I'd be interested to see this, because I was surprised not to find it in the RFC. If only, RFC6962 says that
The only thing I could find that would explicitly convey the right meaning is in the It conveys the right spirit and I hope everybody gets that this is the spirit... but I couldn't find any formal specification of this spirit. As you point out, the only way to integrate a certificate is to put it in a
static-ct-api
This statement is validated by the workflow above. One can find the precert corresponding to this cert at index I within T+MMD: it can find be found immediately. Going back to the quotes in your comment:
I think static-ct-api could be explicit about this. Right now, I don't believe it is. Everybody has the same understanding, so it should not be a problem to add this. |
Existing Behaviour
The dedup was enabled. The checkpoint increased by 1.
LeafHash
andSignature
returned should be the same when the same certificate is submitted.Expected Behaviour
LeafHash
andSignature
returned should be the same when the same certificate is submitted.Logs
The text was updated successfully, but these errors were encountered: