Re: [lamps] On the need for standardization of software-based interoperable private keys [was: Re: draft-ietf-lamps-samples: PKCS12 expertise needed (including objects for comparison)]

Ryan Sleevi <ryan-ietf@sleevi.com> Thu, 05 August 2021 16:43 UTC

Return-Path: <ryan.sleevi@gmail.com>
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 3AF153A18EE for <spasm@ietfa.amsl.com>; Thu, 5 Aug 2021 09:43:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.645
X-Spam-Level:
X-Spam-Status: No, score=-1.645 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
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 ZiUsoBvKya5O for <spasm@ietfa.amsl.com>; Thu, 5 Aug 2021 09:43:36 -0700 (PDT)
Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (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 20C963A18F9 for <spasm@ietf.org>; Thu, 5 Aug 2021 09:43:35 -0700 (PDT)
Received: by mail-pj1-f54.google.com with SMTP id nh14so10252606pjb.2 for <spasm@ietf.org>; Thu, 05 Aug 2021 09:43:35 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vDJXqqgxIgDvRhbHop1dadnBqf27U1B++Kisvq8uMNc=; b=VxHmaVu0abVdjAB5MuNHIzoeTHtDs3AmO73KhycS/zb0ka/3gx5ggx+SQGxpeOOEly vAugCbeZGknEDKlyiYcwEWHd5HpACE/c1TphWZviv7jZ+Suq4vG1XUK7TFHyWHAFGLg0 HmvEWa522Xh6a3lGXMVJ62HBOCcbhKNpbk25qyX55TIfDOa2JuPFmNRsp2gVUB20kqA7 7OAdbvIAdh4rh3Dv3P0PGqwO1CK1dlVBR9eRC6jzoDFJkWKUKWEh4ZCnd2O3tgsuaK74 YoE+KXlEkgjtSLdHcXvOcPJte/udsZ/OMQIzOxXyrdGj0p4er6bYoSgqOvTa8NQwt4Kj U/Rw==
X-Gm-Message-State: AOAM5318k0Wc4zpVpV7wZAu0MIsWPiT1ZlCzkC+XDsOOm0I6wqEKzrZv 5+uGfUrvgKEy8vmEUfWCMgsQ983ze/s=
X-Google-Smtp-Source: ABdhPJzalzHlrXBjWFS3DShA4mXI4teTPywkUQhWCJ3Vr4izaOAd7y1Igs6p8QwK3GvBD6e/HEGiCA==
X-Received: by 2002:a17:902:cece:b029:12c:72bb:4d64 with SMTP id d14-20020a170902ceceb029012c72bb4d64mr4660868plg.56.1628181814237; Thu, 05 Aug 2021 09:43:34 -0700 (PDT)
Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com. [209.85.216.44]) by smtp.gmail.com with ESMTPSA id x25sm7285499pfq.28.2021.08.05.09.43.33 for <spasm@ietf.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Aug 2021 09:43:33 -0700 (PDT)
Received: by mail-pj1-f44.google.com with SMTP id b1-20020a17090a8001b029017700de3903so9447274pjn.1 for <spasm@ietf.org>; Thu, 05 Aug 2021 09:43:33 -0700 (PDT)
X-Received: by 2002:a17:90a:d3d0:: with SMTP id d16mr911167pjw.103.1628181813744; Thu, 05 Aug 2021 09:43:33 -0700 (PDT)
MIME-Version: 1.0
References: <87czr0ww0d.fsf@fifthhorseman.net> <FF939B28-528B-47F9-9C0C-6585D1B02FBE@vigilsec.com> <87mtq3ukk0.fsf@fifthhorseman.net> <CAErg=HHQMZ1jk+bVxA=MzVvW+9ucie7bu-N6O8Asnp0V8Rf9Bg@mail.gmail.com> <30546.1627850836@localhost> <CAErg=HHKL-E5yT0UnPKcLfMQU41iDg7GGgjsSXs3eRg8daJRkg@mail.gmail.com> <87wnp347iu.fsf@fifthhorseman.net> <1388.1627996026@localhost> <87pmuu42hf.fsf@fifthhorseman.net> <20862.1628113377@localhost> <656985A5-BED4-4BA8-9233-B3C93966016C@ll.mit.edu> <877dh03x35.fsf@fifthhorseman.net> <722a1f15-8ac8-54f2-3c7a-14c7ed92c6ef@cs.tcd.ie> <SA2PR22MB2537BB784F2327052238317FE8F29@SA2PR22MB2537.namprd22.prod.outlook.com> <FAEBE63D-1CCC-4F76-B064-BD2DD4F02357@redhoundsoftware.com> <f0ac754b-18c4-8fdb-fff3-4d8675a9cefb@sandelman.ca> <156EE38A-6688-435C-9191-8D577EDCA251@redhoundsoftware.com> <9843.1628180697@localhost> <2213A8F8-D7DA-458A-96A8-1EC9A43FE900@redhoundsoftware.com>
In-Reply-To: <2213A8F8-D7DA-458A-96A8-1EC9A43FE900@redhoundsoftware.com>
From: Ryan Sleevi <ryan-ietf@sleevi.com>
Date: Thu, 05 Aug 2021 12:43:22 -0400
X-Gmail-Original-Message-ID: <CAErg=HFgA6DA0CKfjOOY8JhmxaTuVNUfvxWZSzTp-1tRu8NN9w@mail.gmail.com>
Message-ID: <CAErg=HFgA6DA0CKfjOOY8JhmxaTuVNUfvxWZSzTp-1tRu8NN9w@mail.gmail.com>
To: Carl Wallace <carl@redhoundsoftware.com>
Cc: Michael Richardson <mcr+ietf@sandelman.ca>, SPASM <spasm@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000a35dec05c8d29ed5"
Archived-At: <https://mailarchive.ietf.org/arch/msg/spasm/6CE9FR1TxpW4iFX47UPUd0JzlME>
Subject: Re: [lamps] On the need for standardization of software-based interoperable private keys [was: Re: draft-ietf-lamps-samples: PKCS12 expertise needed (including objects for comparison)]
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: Thu, 05 Aug 2021 16:43:49 -0000

On Thu, Aug 5, 2021 at 12:32 PM Carl Wallace <carl@redhoundsoftware.com>
wrote:

> [CW] I was not suggesting that but instead that a message be encrypted for
> each of your end points. I'm not sure why we are clinging to one encryption
> key per person. <snip>


Agreed.

In the parallel discussion being had by Michael Richardson and Rich Salz (
https://mailarchive.ietf.org/arch/msg/spasm/puyG9qwhxAQRBGbh8WIFxSZuPDQ/ ),
Michael asks

If we can get the legacy guys to open up their code, why fix PKCS12 if they
> could just move to PKCS8? (or PKCS1 or...?)
>

And I think that closely relates to the point you're making here.
Specifying an interoperable profile for PKCS#12 is a lot of effort, from a
specification side, and doesn't really address the implementation problem
of needing to support, for better or worse, existing keys. That is, it
seems we'll still have legacy producing bad-legacy, and then we'll have new
producing new-good, but implementations will end up needing to support both
paths, because in order for folks to adopt new-good, they'll want to bring
things in from old-legacy. The result of this is that, from an implementer
perspective, supporting/enforcing new-good is purely more work for them,
minimally at the production side (encoding), but if the goal is to reduce
the many mistakes of PKCS#12, then also at consumption side (decoding).

While it's true that old-legacy should be able to accept new-good, by
virtue of DER being compatible with BER, the inverse doesn't hold.

So Michael's question about activation energy is entirely relevant to what
I believe you're getting at, which is: If we're going to do anything,
should we be doing something tangibly better, and leaving this whole
silliness in the past? And yeah, I agree, we can do better, by reducing the
amount of key slinging that is happening, and being comfortable with the
existence of multiple keys. Protocols such as WebAuthN are designed around
this concept, as are the hardware tokens implementing it; the notion of
many keys (a key for origin/application), rather than trying to have One
Key to Rule Them All.

That still has the state change issue of old-legacy to new-good, but makes
it clearer that we're moving to a different system, which ends up being
more explicit that, yes, there are interoperability issues with old/new
expected, because they're unavoidable either way.

As it relates to the question of "Well, how do we deal with legacy", I
remain very much of the opinion of PKCS#8 being "good enough" as a format,
as it's what PKCS#12 uses under the hood still. So every PKCS#12 consumer
has the ability to consume PKCS#8 functionally, and that eliminates a huge
swath of complexity issues, so that works. The question of slinging keys
around becomes something dealt with at the protocol level, rather than the
format level, such as by accepting that a single entity may have many keys.
Yes, key management is hard, but that doesn't mean we should accept that
the solution is to put all of our proverbial eggs in one key basket. That
doesn't simplify the complexity, it just rearranges it (to key protection
and revocation).