Re: [Trans] What logs are storing (was: The RFC6979 requirement in RFC6962-bis is bad)

Al Cutter <al@google.com> Tue, 09 May 2017 18:29 UTC

Return-Path: <alcutter@google.com>
X-Original-To: trans@ietfa.amsl.com
Delivered-To: trans@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DFD43127B31 for <trans@ietfa.amsl.com>; Tue, 9 May 2017 11:29:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.701
X-Spam-Level:
X-Spam-Status: No, score=-2.701 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7PWVD_EZ7taF for <trans@ietfa.amsl.com>; Tue, 9 May 2017 11:28:57 -0700 (PDT)
Received: from mail-yw0-x22d.google.com (mail-yw0-x22d.google.com [IPv6:2607:f8b0:4002:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AA362129516 for <trans@ietf.org>; Tue, 9 May 2017 11:28:55 -0700 (PDT)
Received: by mail-yw0-x22d.google.com with SMTP id l135so4799700ywb.2 for <trans@ietf.org>; Tue, 09 May 2017 11:28:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5wrcJvflOCn20QN3AcB2lYZCIiJPxHG+fAtIotlacjc=; b=UZrwe11Ln0T23ZcmFHvkjl9roBoDgWW0q1w5KoA18fdbCGjKgqgs72JoxMwDKr180H RvoeGZ5ZSSiygoC2GcTnVVF6r/M4EBFaOed+fNwJgo/Dt8K/KZWjUUyuDsgWuQ7TAacW 49KWXa8K5mGVIIDdTpp6IzdE+AkTwzVZfLardIV7NSePGBgVbAauJ/eTUrr+YHVoeAyO OqRtvTj0f0YWO0i21Dx6fPB/dE4OpxfG3e4u4I3jlmDvDtf03AkPYmCcAmc1axDMtGsw IeZdPKxijYPZQ3w6ll1EwipSKVkiXtHGhHJUZeqcYuAKSmImTtH1VjDVpq5TqsfRXXO9 6T7Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5wrcJvflOCn20QN3AcB2lYZCIiJPxHG+fAtIotlacjc=; b=er6sGZZ84b4p5KxCQT+RWHQb3c00Aplz+GEfIJ0jJLM418GBckd0yYSl1OnT7oMvAn xLsTrcWa9gmwwvISTkAS7G7iiygljD9UUZ4CL3z50xc40OncH75t1T9Tr4RJHROv5LQh Cbtb5E4w7MXrQqNwA3+uH2mcM/h8pgNHgk1n3iNY+vC1tDdTPOtm72h8aQI184Fna94z iWqNKxreLCEnvwNaLIZCUZbXXhmkf8qobF7OrVWxT//v8TIWrUjw8SBOUFZkwkYETKQt 1AWlHAFCWqLn57wurTC0yfzk0k81YtFuvG+0riuvXCWlpX92DoyFzsttcpB+lKTnNkmq Bweg==
X-Gm-Message-State: AODbwcA8kJJEaryC4cIrdNx+ECGOIynxFpfHbmFrN5q5wS/YKj4+xayV WFz8xVehhft6HcidN8wtjVnawSjFHDRH
X-Received: by 10.129.138.131 with SMTP id a125mr1163878ywg.277.1494354534656; Tue, 09 May 2017 11:28:54 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.37.48.215 with HTTP; Tue, 9 May 2017 11:28:54 -0700 (PDT)
In-Reply-To: <CALzYgEe=cD1TMWh5H0bERTSNVAFjzGQ=N4xOL6oLfbQHPvZ_Cg@mail.gmail.com>
References: <CAFewVt5z3sq-Occ1VaHeNeBvt1yyCM_3_nssZSu2f_PBEL4SFQ@mail.gmail.com> <20170508111141.2ad103252b01cf48b5e988c8@andrewayer.name> <87pofjj6xd.fsf_-_@nordberg.se> <20170508161443.be44c605e67bec0feeb50e3a@andrewayer.name> <CALzYgEe=cD1TMWh5H0bERTSNVAFjzGQ=N4xOL6oLfbQHPvZ_Cg@mail.gmail.com>
From: Al Cutter <al@google.com>
Date: Tue, 09 May 2017 19:28:54 +0100
Message-ID: <CACM=_OdeG+i6puK5R0r1DFcaSp7=yhRgF2zguuGpGNYdF=f1nQ@mail.gmail.com>
To: Eran Messeri <eranm@google.com>
Cc: Andrew Ayer <agwa@andrewayer.name>, "trans@ietf.org" <trans@ietf.org>, Linus Nordberg <linus@sunet.se>
Content-Type: multipart/alternative; boundary="94eb2c0816d835a005054f1b872d"
Archived-At: <https://mailarchive.ietf.org/arch/msg/trans/DQYeipmMvZdBezoXEvroN2dwrn4>
Subject: Re: [Trans] What logs are storing (was: The RFC6979 requirement in RFC6962-bis is bad)
X-BeenThere: trans@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Public Notary Transparency working group discussion list <trans.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/trans>, <mailto:trans-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/trans/>
List-Post: <mailto:trans@ietf.org>
List-Help: <mailto:trans-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/trans>, <mailto:trans-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 09 May 2017 18:29:05 -0000

On Tue, May 9, 2017 at 6:37 PM, Eran Messeri <eranm@google.com> wrote:

> The downsides with storing signatures (for SCTs and STHs), which is an
> additional storage requirement for something that can be generated
> on-the-fly:
> * Storage costs and processing: Logs have to use highly-reliable storage,
> so every piece of data stored costs more and requires more processing to be
> verified.
>

TBH the cost of running a log is mostly going to be opex, the overhead of
storing an extra few tens of GB for a really big log like Pilot are
probably not going to be that noticeable.


> * Potential corruptions: What would a log do if it finds out it stores a
> corrupted signature? It could continue operation by re-signing without
> problems, unlike a corruption of the list of entries, where it's clear it's
> unhealthy (a safety measure in some log implementations is to hash all
> entries up to the last-issued STH and verify root hash, before adding new
> entries and producing a new one).
>

This is an interesting one...
Recalculating the root of a large tree from the leaf images is a kinda*
sequential operation but verifying the signatures over SCTs+leaves can be
as obscenely parallel as your storage permits. (*Not entirely true, you can
recurse and go wide of course, but that's considerably more complicated
than existing implementations I'm aware of which mostly tend to use a
compact Merkle tree approach.)
Also, unless the corruption of your signature and/or corresponding leaf
entry caused precisely one of them to be invalid DER, you don't really have
any idea which part is wrong, so simply re-signing and continuing operation
would probably not be wise.


>
> This is a viable solution to the problem of deterministic signatures,
> though, so it should be mentioned in -bis.
> How about requiring returning the same signature for the same SCT / STH,
> without requiring the use of deterministic signature schemes?
>

At least for SCTs this is not a good idea; if you require this, then by
implication you also require a strongly consistent global queue with
deduping for putting the to-be-sequenced leaves into. That's certainly one
way of building a log, but there are others, and not everyone's got Spanner
:)

Incidentally this is why RFC6962 says  'the log ... MAY return the same SCT
as it returned before'; I'd imagine most log implementations will generally
do this because it makes sense from the operators' PoV of controlling
growth, but there may be situations when they can't guarantee it.


>
> On Tue, May 9, 2017 at 12:14 AM, Andrew Ayer <agwa@andrewayer.name> wrote:
>
>> On Tue, 09 May 2017 00:54:38 +0200
>> Linus Nordberg <linus@sunet.se> wrote:
>>
>> > Andrew Ayer <agwa@andrewayer.name> wrote
>> > Mon, 8 May 2017 11:11:41 -0700:
>> >
>> > > 3. When producing a new STH or SCT, sign it, store the signature,
>> > > and serve the stored signature instead of re-signing on-the-fly
>> > > every time the log needs to serve the STH or SCT.  Since the log
>> > > already needs to store information about STHs and SCTs, also
>> > > storing the signature should not be burdensome.
>> >
>> > Why do logs already need to store information about SCTs?
>>
>> Technically it's not required, but practically speaking logs need to
>> return an SCT for an existing entry when someone submits an
>> already-logged certificate (otherwise the log could be spammed into
>> oblivion).  To construct that SCT, the log needs to know the timestamp
>> of the existing entry.  A logical place to store the signature would be
>> alongside the timestamp.
>>
>> > Do logs already need to store information about STHs because of the
>> > proposed get-sths API [0][1][2] or something else?
>>
>> Even without the get-sths API, the log needs to store the timestamp of
>> the current STH.  That would be a logical place to store the signature.
>>
>> Regards,
>> Andrew
>>
>> _______________________________________________
>> Trans mailing list
>> Trans@ietf.org
>> https://www.ietf.org/mailman/listinfo/trans
>>
>
>
> _______________________________________________
> Trans mailing list
> Trans@ietf.org
> https://www.ietf.org/mailman/listinfo/trans
>
>