Re: [lamps] LAMPS sample keys and certificates

Daniel Kahn Gillmor <dkg@fifthhorseman.net> Tue, 19 November 2019 01:21 UTC

Return-Path: <dkg@fifthhorseman.net>
X-Original-To: spasm@ietfa.amsl.com
Delivered-To: spasm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9F76E12004A for <spasm@ietfa.amsl.com>; Mon, 18 Nov 2019 17:21:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=fifthhorseman.net header.b=n88cqF6t; dkim=pass (2048-bit key) header.d=fifthhorseman.net header.b=tmfUo2jF
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 qdYRP7p-nzZa for <spasm@ietfa.amsl.com>; Mon, 18 Nov 2019 17:21:16 -0800 (PST)
Received: from che.mayfirst.org (che.mayfirst.org [IPv6:2001:470:1:116::7]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 24E75120025 for <spasm@ietf.org>; Mon, 18 Nov 2019 17:21:16 -0800 (PST)
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1574126475; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=bOTwi3ZYJ/Xs8hZeGnwEajsB49gIj2GfW2raJqU5jRY=; b=n88cqF6tOeAmW1ELAgMNLQAUkS85lDcFj9W8YFdTVJuigbLT3IQqoRX7 C70YZ3IMMRzQPq7j7AXOesFs9GE9Ag==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1574126475; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=bOTwi3ZYJ/Xs8hZeGnwEajsB49gIj2GfW2raJqU5jRY=; b=tmfUo2jFc5vVcx/e6CipdsPyrv3qKK10lo3KoIiohvNJDHRBnysyjJCy /Api8w0GNlRMkaXJ5Fl1UrSVBVjk76gxZz9I4l/x6TKSpXFv/kOXagtj8z qCRCgCM3Z28vl4qNvZDl412hKPEa4Ym+0IKZCZOn43tqfpPc65dLdyWgRy 5BBgXM6TpCioq++oml7QWzeWlju8+kozwGc/ArlcvWNwtyUfIHCoaynkPD Cx5V3fJjUdfTtg1NT/xQNkP2hlzhvDkFOtnqB5NxS/KWvuqAF8UnYAuARk M9i7Z4OavQ+0efCUgAmYUAXc7M9ClFUj04EXOlokh7DJ2v4zottF3g==
Received: from fifthhorseman.net (dhcp-8c89.meeting.ietf.org [31.133.140.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id D3C94F9A5; Mon, 18 Nov 2019 20:21:13 -0500 (EST)
Received: by fifthhorseman.net (Postfix, from userid 1000) id B9CFC203CD; Tue, 19 Nov 2019 09:21:08 +0800 (+08)
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Ryan Sleevi <ryan-ietf@sleevi.com>
Cc: LAMPS WG <spasm@ietf.org>
In-Reply-To: <CAErg=HFkRcdx+Eo7OMn=sesq-kE36O4gjnv4FeSWRMXTAfU=hg@mail.gmail.com>
References: <878sodm0j3.fsf@fifthhorseman.net> <CAErg=HFkRcdx+Eo7OMn=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xGwJ+D0hCw==
Date: Tue, 19 Nov 2019 09:21:08 +0800
Message-ID: <8736ekmzjv.fsf@fifthhorseman.net>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha256"; protocol="application/pgp-signature"
Archived-At: <https://mailarchive.ietf.org/arch/msg/spasm/LTCc6fNxKKjVMwdoCAQtggUDimI>
Subject: Re: [lamps] LAMPS sample keys and certificates
X-BeenThere: spasm@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "This is a venue for discussion of doing Some Pkix And SMime \(spasm\) work." <spasm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/spasm>, <mailto:spasm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/spasm/>
List-Post: <mailto:spasm@ietf.org>
List-Help: <mailto:spasm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/spasm>, <mailto:spasm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Nov 2019 01:21:18 -0000

Hi Ryan--

thanks for the supportive note and the interesting pointers.

On Mon 2019-11-18 18:32:22 -0500, Ryan Sleevi wrote:

> One of the challenges with such approaches is ensuring deterministic
> outputs as well as negative cases. I noticed your approach, using certtool,
> makes it a bit difficult on both of those dimensions. That is, the encoding
> may change due to the version or certtool, and that it’s (rightfully)
> increasingly hard to have good tools do bad things.

sure, the approach for building the examples is present but i was
intending this document would ultimately exist as a document with static
objects, rather than a programmatic test suite.

that is, it's (hopefully) input to a test suite, but not a test suite
itself.

I haven't even contemplated negative cases here, as you rightly observe.

I confess i was surprised in searching the IETF's archive of I-Ds that
there was no such set of simple positive examples, so this is an attempt
to just fix that gap, rather than trying to provide a programmatic or
exhaustive corpus.

> In the spirit of how many in the TLS-WG have found tools like BoGo (
>  https://github.com/google/boringssl/blob/master/ssl/test/PORTING.md
>  ) helpful in building consensus and interop, and at the risk of suggesting
> a blue bikeshed, have you considered adopting something similar in tooling?

I really like the idea of doing this, but it's more ambitious than i was
intending this draft to be.  I certainly wouldn't block someone from
trying to do it, of course!

> Over in Chrome, one of the tools we use for both positive and negative
> testing, with deterministic output, is
> https://github.com/google/der-ascii . I realize the complexities of CMS and
> BER make this a more nuanced situation, but I highlight as a possible
> foundation to build deterministic “good” inputs, as well as
> “mangled-but-well-formed” and “garbage-but-reflective-of-real-world”
> scenarios.

good point!  none of what i've done in this draft is sophisticated
enough to warrant der-ascii right now, but i'll put it in my toolbox for
future experimentation.

Regards,

        --dkg