[netconf] algorithms in crypto-types

Kent Watsen <kent+ietf@watsen.net> Tue, 09 July 2019 22:00 UTC

Return-Path: <0100016bd8c03b78-f8458a02-ea7d-4a0d-bebe-8ee8af9afc1b-000000@amazonses.watsen.net>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A0B8A1201CB for <netconf@ietfa.amsl.com>; Tue, 9 Jul 2019 15:00:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=amazonses.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 lhO4xzOblJXc for <netconf@ietfa.amsl.com>; Tue, 9 Jul 2019 15:00:07 -0700 (PDT)
Received: from a8-83.smtp-out.amazonses.com (a8-83.smtp-out.amazonses.com [54.240.8.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2CE021201B8 for <netconf@ietf.org>; Tue, 9 Jul 2019 15:00:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1562709605; h=From:Content-Type:Mime-Version:Subject:Date:References:To:In-Reply-To:Message-Id:Feedback-ID; bh=8zffM/AoOFukFnCvT//NRMYnrOylcjHK1Etiu6wCt4g=; b=V52+myercUe+gzD0dM4vMbFa7nTyWKp6c68wbmjy0zTcwAmLl0Ioo1+EjDccaIJA TYVlqjHQB+PmHtIeKP7W1hOKgUby9Mqx5H6ltrAXJBJXhUOQXznzgLZwrRvZWQVMsFx U2arWCjcrCpq4JNnwH0PK4V3Oz5c85WpogXmUWfg=
From: Kent Watsen <kent+ietf@watsen.net>
Content-Type: multipart/alternative; boundary="Apple-Mail=_05CECC08-A779-46F8-84FF-C06ADAE81EB3"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
Date: Tue, 09 Jul 2019 22:00:05 +0000
References: <C02846B1344F344EB4FAA6FA7AF481F13E7B118B@dggemm511-mbx.china.huawei.com> <20190625.084508.905200182299290020.mbj@tail-f.com> <0100016b8f701d10-02dff612-5c5f-4ed3-938d-8b9f25679996-000000@email.amazonses.com> <20190625.224243.332607515244909664.mbj@tail-f.com> <0100016b9640a87c-b6e29e8c-0db0-4f15-bb58-887fc48c81d0-000000@email.amazonses.com> <C02846B1344F344EB4FAA6FA7AF481F13E7B45A1@dggemm511-mbx.china.huawei.com> <20303ff0c07346c7ae7cf1200502ecfe@huawei.com> <077201d5318e$5ed91620$4001a8c0@gateway.2wire.net> <C02846B1344F344EB4FAA6FA7AF481F13E7BFE93@dggemm511-mbx.china.huawei.com> <93e01a1014194663a9b262554030506e@huawei.com>
To: "netconf@ietf.org" <netconf@ietf.org>
In-Reply-To: <93e01a1014194663a9b262554030506e@huawei.com>
Message-ID: <0100016bd8c03b78-f8458a02-ea7d-4a0d-bebe-8ee8af9afc1b-000000@email.amazonses.com>
X-Mailer: Apple Mail (2.3445.104.11)
X-SES-Outgoing: 2019.07.09-54.240.8.83
Feedback-ID: 1.us-east-1.DKmIRZFhhsBhtmFMNikgwZUWVrODEw9qVcPhqJEI2DA=:AmazonSES
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/lePBMIQr3HVfFMIy3avzKSKQUCs>
Subject: [netconf] algorithms in crypto-types
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 09 Jul 2019 22:00:10 -0000

This message proposes an approach for how to support algorithms that is quite different than in the current draft.

But, first, let me preface this by saying I continue to believe the current approach is ideal (as in idealistic), but fear that it may be trying to solve a problem that should be solved by the crypto community, not us (and hence not very practical).    To be ensure this is the case, the Chairs need to reach out to the Security Directorate for guidance.  With luck, a representative will be up to speed and able to attend our session Monday morning.  Stay tuned.

That being the case, I'd like to suggest an alternative approach, which is for ietf-crypto-types to define even more ASN.1 types, specifically, ASN.1 types for public and private keys.   But, first, let me explain how I came to think of this idea.  As mentioned before, I'm implementing ietf-restconf-server and when I got to the point of needing to populate values for the public and private key nodes, I took a shortcut of just storing the DER-encoded ASN.1 values provided by a utility such as OpenSSL.  Of course, ietf-restconf-server is primarily about HTTP over TLS, and hence it's common a create keys in the process of generating the PKI hierarchies needed to support TLS trust-anchor and end-entity certificates.   I was just being lazy at the time but, after awhile stewing on it, I'm wondering if this might not be an idea worth standardizing.

To be clear, the idea is to define the public/private key nodes as being ASN.1 types and, in doing so, inherit the algorithm identities used by ASN.1, thus negating the need to define any YANG-level identities.

Framing this idea a little more, if we were to do this:

1) ietf-crypto-types might be better titled ietf-asn1-types.  Already the module defines many ASN.1 types (listed below) and, after adding a few more ASN.1 types for the public and private key structures, and removing the identities/enumerations for the algorithms, all the typedefs would there be ASN.1 based.   [Here are the current ASN.1 types defined in the current module: x509, crl, cms, data-content-cms, signed-data-cms, enveloped-data-cms, digested-data-cms, encrypted-data-cms, authenticated-data-cms, trust-anchor-cert-x509, end-entity-cert-x509, trust-anchor-cert-cms, and end-entity-cert-cms.]

2) the solution in the suite of client-server drafts would be very much ASN.1 oriented.  This would be (for the most part) splendid for TLS-based protocols, but not very helpful for other protocols, notably SSH (unless using the X.509 extensions per RFC 6187).   It sounds limiting but, let's be honest, TLS is the basis for most protocols and hence this would be a 90% solution.  Further, when thinking about ietf-truststore, it's fairly uncommon to use trust-anchors with SSH.  And, for ietf-keystore, I'm unsure at this point to what extent keystores are used to protect SSH private keys - I've never seen a TPM/HSM used to protect an SSH key, unless the key were encrypted (as in the latest keystore draft), or was an X.509 end-entity certificate (per RFC 6187, albeit I don't know any vendor that supports RFC 6187 today).

3) this approach would do little to help the other WGs (e.g., SACM) with their YANG modeling endeavors.  Note that the reason my co-authors from Huawei were attracted to helping us with this effort was because they want to embrace-and-extend it for other work.  I'm not up-to-speed on that, and thus look to them to share more about the landscape in which this module fits.


Kent // contributor