Hi Eran,
On Mon, Jul 21, 2014 at 10:37:24AM +0100, 'Eran Messeri' via certificate-transparency wrote:
> The problem is the unbounded space requirements for running a log.
In a nutshell, yes. More precisely, the likely geometric increase in log
size due to the need to keep all data forever.
> Seems like there's agreement that pruning trees which contain only expired
> certificates is desirable.
Indeed.
> One proposed solution is to build into the tree structure a way to prune an
> existing tree so that only the hash of the expired subtree is stored.
Correct.
> Another possible solution is log roll-over: Stop logging in a log that
> contains mostly old certs, add a new log, turn down the old log when it
> only contains expired certificates.
I think that's a reasonable summary.
> I favour the second solution (log roll-over) because:
> * Building in a way to prune sub-trees would add complexity to the log
> implementation
I'd debate the assertion that it necessarily *must* increase implementation
complexity. I first thought of the idea of log trimming during my log
server implementation simply because I noticed that it would be utterly
trivial to add such a feature. Other implementations may find it difficult
to implement, but that shouldn't be a determining factor.
> and may add a new class of attacks.
There is definitely a possibility that trimming a tree *may* introduce a way
to attack the integrity of a merkle tree -- I couldn't find much useful
literature on the subject of trimming merkle trees. I can't find any
problems with it, but I make no claims of being competent to analyse
anything even vaguely cryptographically-related.
> I'll happily be
> convinced this is not a concern if someone analyses this proposal properly..
There's two concerns here -- implementation complexity and attacks. I
assume you're referring to the attack concern here. Can you give some
indication of what a "proper analysis" would look like?
> * Log roll-over can be done more gradually than removing root certificate
> from the trust store. It can be done over the span of a long time.
Increasing the span of time over which a log is in the process of "being
retired" doesn't really help anyone -- it increases the amount of time that
the old log has to be kept online (because the log entry with the last
expiry determines how long the log has to survive for, and any additional
entry will likely have a longer expiry than what's already in the log).
> Additionally, rather than making log clients understand HTTP redirect, log
> submitters can be made to understand redirects.
I place "log submitters" in the "log clients" set. Also, the set of log
submitters will likely be large and diverse -- potentially more diverse than
the set of log verifiers. Log submitters will be all CAs (both for precerts
and OCSP response-embedded SCTs), but also any number of server admins who
wish to obtain SCTs for submission via TLS extension. Log verifiers will,
for the most part, be browsers.
> * Another thing which is necessary regardless of this problem, is the
> ability to "finalize" a log: Mark that a log is not to be trusted anymore
> past a given STH (in case of a log compromise, for example). Having this
> mechanism in-place will also ease log roll-over (since you could keep a log
> alive but prevent new submissions into it using this mechanism, before
> turning it completely off).
* If a log is untrustworthy, it needs to be switched off (or removed from
the trust store of log verifiers), not marked read-only. If a log has
been compromised, I don't want to have to trust *any* of it (how do I know
the problem really started with the entry the log is asserting is the
first untrustworthy one?).
* To make the finalization "provably secure", you'd need to add it to the
log itself. However, that's a separate entry type as well, and monitors
would need to know to verify that the "finalized" log entry is the last
one in the log. More complexity.
* Stopping a log from being able to accept new submissions is easy -- just
return a 403 to all POSTs. As I understand it, a log submitter isn't
going to check /get-sth to see if the log is "alive" before posting an
entry. As I understand it, that was something that was raised on the
trans list (although it was in the context of hitting /get-roots before
/get-sth) as something that log submitters (or at least one of them)
explicitly *didn't* want to have to do.
* "Finalizing" a log isn't going to stop monitors, et al from needing to
check the log regularly. Since the finalization data is under the control
of the log operator, they could (concievably) "unlock" the log and add
entries, if they were malicious (or came under the control of a malicious
party).
> * IMHO keeping a read-only log up is much easier than keeping a live log
> up, since there is no longer a requirement to maintain data integrity of
> submitted certificates, so read-only logs can be served from "cheaper"
> storage.
*All* of the data served up by the resources accessed via GET can be served
from static files, whether or not you're running a read-only log or a
read-write log. The use of query params makes it non-trivial, but it is
possible. You only need to rewrite a subset of the files when you're doing
a log rebuild, too. I'm pretty sure I could write an entire log server
using "make" and a small CGI for /add-{pre-,}chain -- or at least "rake".
/me adds that to the "rainy day" todo list
For a read-only log, you still need that periodic run, too. The STH must be
regenerated within the MMD. This means that the private key for the log
must be kept available, and some sort of code execution environment. Sure,
you only have to recalculate a signature over a fixed hash, but you had to
calculate all the tree hashes previously, and anyone who isn't caching all
those tree hashes for a log in regular operation is going to have a sad, sad
time of it anyway.
All in all, I don't see how making a log read-only buys you any practical
benefit from an operational point of view, except for the fact that you can
turn it off a few years later. The practical issues of notifying everyone
of a log's pending retirement are still an issue, too.
- Matt