Re: [netconf] crypto-types fallback strategy

"Rob Wilton (rwilton)" <rwilton@cisco.com> Tue, 17 September 2019 15:37 UTC

Return-Path: <rwilton@cisco.com>
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 A5015120045 for <netconf@ietfa.amsl.com>; Tue, 17 Sep 2019 08:37:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.499
X-Spam-Level:
X-Spam-Status: No, score=-14.499 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_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com header.b=jzamzgkP; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=c0tSDUrD
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 8woBJj-2dadV for <netconf@ietfa.amsl.com>; Tue, 17 Sep 2019 08:36:59 -0700 (PDT)
Received: from rcdn-iport-6.cisco.com (rcdn-iport-6.cisco.com [173.37.86.77]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9B9011200D8 for <netconf@ietf.org>; Tue, 17 Sep 2019 08:36:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=36414; q=dns/txt; s=iport; t=1568734619; x=1569944219; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=+cDbtbEleinEEwYKunCo5oJP4jdhqJqJx0zaItyXM8w=; b=jzamzgkPwH279I0v9fux5gCrxlm/dWXCG7TdYx0p9OozF84VgDQef9qp W43iXL9euoZaf0j/GiFOf0e7NzYvPILofAm87wsVkoQFxrMan2EQCpFMG 8gn9sI6tfTaG7CtTStdXMo7I6edkSQfKwyhcKTh94b8Gdam5xC0FXfqVY k=;
IronPort-PHdr: 9a23:Wcrh7xc18onkoTO6xy99lPH1lGMj4e+mNxMJ6pchl7NFe7ii+JKnJkHE+PFxlwGRD57D5adCjOzb++D7VGoM7IzJkUhKcYcEFnpnwd4TgxRmBceEDUPhK/u/dTM7GNhFUndu/mqwNg5eH8OtL1A=
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0ApAABk/IBd/49dJa1dCRoBAQEBAQIBAQEBBwIBAQEBgVYCAQEBAQsBgRUvJCwDbVYgBAsqCoQXg0cDineCXH6IZ44NglIDVAkBAQEMAQEtAgEBhD8CF4JlIzcGDgIDCQEBBAEBAQIBBQRthS4MhUoBAQEBAxIRChMBATcBDwIBCBEEAQEhAQkCAgIfER0IAgQOBQgagwGBHU0DHQECoy4CgTiIYXOBMoJ9AQEFhRQNC4IXCYE0AYo0gUMYgUA/gRFGghc1PoIaggAsFYJ0MoImj1GFJSSIeY4fQQqCIpEBhBuCNYdHjx6PQohcjnACBAIEBQIOAQEFgWgigVhwFYMngkILAReDT4pTc4EpjioBgSIBAQ
X-IronPort-AV: E=Sophos;i="5.64,517,1559520000"; d="scan'208,217";a="632403432"
Received: from rcdn-core-7.cisco.com ([173.37.93.143]) by rcdn-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 17 Sep 2019 15:36:57 +0000
Received: from XCH-ALN-004.cisco.com (xch-aln-004.cisco.com [173.36.7.14]) by rcdn-core-7.cisco.com (8.15.2/8.15.2) with ESMTPS id x8HFavdZ012041 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 17 Sep 2019 15:36:57 GMT
Received: from xhs-rtp-001.cisco.com (64.101.210.228) by XCH-ALN-004.cisco.com (173.36.7.14) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 17 Sep 2019 10:36:57 -0500
Received: from xhs-rcd-003.cisco.com (173.37.227.248) by xhs-rtp-001.cisco.com (64.101.210.228) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 17 Sep 2019 11:36:56 -0400
Received: from NAM02-CY1-obe.outbound.protection.outlook.com (72.163.14.9) by xhs-rcd-003.cisco.com (173.37.227.248) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 17 Sep 2019 10:36:56 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fw9VYpJ2fzIHUMjPAZlW3ZYF5z+c7Lxl/IQggtA3nrizzWXcGD/VbR2TAwAYAPFWU2hsBpD8/g4QnkXrR4xD8vI6LGKtmuZ/eKSABCrdva6W4De7GUpR0CLz/peAZYe34wqnY0q7PGvwikoqs+y+SStK+y9XIc57phmjkaI0fsCy+pIEld/AkB34dK4OuOhasmkYe3va6/feV8Gl615YA/VCn61kRshIOY+PLyzBcbC5feiSRslEnpvT/694kHl+TDJ1fmzi/JR9uVrq5qLEBQENEJrw/XH17doxlQh/LTQtmCg1mJ/iKE+jKLByW5cwWW5W+TBd5LhEaGCEz9ugkQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+cDbtbEleinEEwYKunCo5oJP4jdhqJqJx0zaItyXM8w=; b=bF1kIaEgYJkO4kg2VotHH7xyNeyBM2IxTQNZ+j+GL0K5g51QmdGhHR9dyMPkxKPAzlbcmPNixX2zJauoOn7OiRMhvvXcjs61p/r8W6RjbulOACdclOHgGIf4frTmJHfD0eGkDrNwj0Fvj9B9kW4NVGhIQLq0Wk+Dy9TKIIytnRcnxdnh3AimaO1XBiDSQxml4QRqPYJxAfTGtiBhJX7ut3ygQoNG6pVIWOiGSKzJbTaemul/deW5RKa3wreDi56P0rM6RJYtjMAvZ8icG533lhriKc1pTZO9pxmphxy6waNdVvwS5sqQICY3WKPqJPCNaL4U371DI+0OlkqYWxU04w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cisco.com; dmarc=pass action=none header.from=cisco.com; dkim=pass header.d=cisco.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+cDbtbEleinEEwYKunCo5oJP4jdhqJqJx0zaItyXM8w=; b=c0tSDUrDKPMZz3uxCRNTO3u5AMgUADgNyeXsQ3veOCoQvOMyamoZHkoCn+NoXqxKSFBRtvip3ztybO6j1mFm4jfD0H27aJRtU97sxUIIWsj45+2XWwDQec85z+gVZgqFWQuiTao6G/UYlCQkJaPlJMpun9pe4db2c0owezB+oTc=
Received: from MN2PR11MB4366.namprd11.prod.outlook.com (52.135.38.209) by MN2PR11MB3744.namprd11.prod.outlook.com (20.178.253.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2263.23; Tue, 17 Sep 2019 15:36:55 +0000
Received: from MN2PR11MB4366.namprd11.prod.outlook.com ([fe80::6db3:f4c:467b:30f6]) by MN2PR11MB4366.namprd11.prod.outlook.com ([fe80::6db3:f4c:467b:30f6%7]) with mapi id 15.20.2263.023; Tue, 17 Sep 2019 15:36:55 +0000
From: "Rob Wilton (rwilton)" <rwilton@cisco.com>
To: Kent Watsen <kent+ietf@watsen.net>
CC: "netconf@ietf.org" <netconf@ietf.org>, Russ Housley <housley@vigilsec.com>, Rifaat Shekh-Yusef <rifaat.ietf@gmail.com>, Sean Turner <sean@sn3rd.com>
Thread-Topic: [netconf] crypto-types fallback strategy
Thread-Index: AQHVaNxVu0aQE+n/K0iPwVgOy8FH/KcpQIdQgAVLFQCAARKfAIAAVxYAgAAFC6A=
Date: Tue, 17 Sep 2019 15:36:55 +0000
Message-ID: <MN2PR11MB43669CA5E57F7D4695214E31B58F0@MN2PR11MB4366.namprd11.prod.outlook.com>
References: <0100016d21ee2101-fb4f3288-1975-4a7d-a499-cb42ff8d9e14-000000@email.amazonses.com> <MN2PR11MB4366AE6CF9E03B15EBEA3A39B5B30@MN2PR11MB4366.namprd11.prod.outlook.com> <0100016d3afa694e-ce58ee3a-792f-4c0e-89bb-83d0128a5194-000000@email.amazonses.com> <MN2PR11MB4366F63419F6BD4EF106766FB58F0@MN2PR11MB4366.namprd11.prod.outlook.com> <0100016d3f9ba629-c9560411-e18a-4416-a1c7-f66040928d07-000000@email.amazonses.com>
In-Reply-To: <0100016d3f9ba629-c9560411-e18a-4416-a1c7-f66040928d07-000000@email.amazonses.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=rwilton@cisco.com;
x-originating-ip: [173.38.220.61]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: a905c76c-9f9a-4588-ea74-08d73b84deb7
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600167)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:MN2PR11MB3744;
x-ms-traffictypediagnostic: MN2PR11MB3744:
x-microsoft-antispam-prvs: <MN2PR11MB3744A3DA806C626E15DE16CEB58F0@MN2PR11MB3744.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 01630974C0
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(366004)(346002)(39860400002)(136003)(376002)(199004)(189003)(51444003)(14454004)(25786009)(256004)(316002)(3846002)(9326002)(76116006)(76176011)(99286004)(66066001)(11346002)(446003)(7696005)(102836004)(476003)(33656002)(5660300002)(478600001)(7736002)(6506007)(53546011)(186003)(74316002)(2906002)(790700001)(54906003)(6246003)(71190400001)(14444005)(4326008)(486006)(6116002)(64756008)(26005)(86362001)(8936002)(6436002)(52536014)(6306002)(81156014)(54896002)(8676002)(9686003)(66946007)(229853002)(66476007)(66446008)(66556008)(81166006)(55016002)(71200400001); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR11MB3744; H:MN2PR11MB4366.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: cisco.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: etlJGMrGgnPg6iKxkFR2DMD3dWYhLQwl7tYdxNM1+KnKkEgRtDTN8CfeqwOUxXW22d8PDDJNdbJ7ENyoYHJq8em5thzAG0OhcyviIX2FKLFpoenHSHfnGGvwj0YXV7iSdhSkYnrAbL03z332hK+TDaaPZhin1FyiA5IJ1mXvx4lpZCfcq+jT2kYUPdLknhO0/RIDgZlGFd6Fp8Of1fxp2Zi+DMsZIRtRn3Zxq0R7Ww/D5xhnPMnzuaAiF8s0SgLlTxE0EdFw412X5l7FDgoQfbVMQcQIFiENvjMq8Dzxds/uj1A8MAokP3RuoXiL7Jq0/nZcJLVhBbCx1OyvkhLr2lHeQ1EMAQx4sxyinJlJsje7FeM2yr65qKIHU7UwgzuCvDnu0DHYZPiS2VeXFL0PdsPILNNesqCuiO77SAWl66g=
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_MN2PR11MB43669CA5E57F7D4695214E31B58F0MN2PR11MB4366namp_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: a905c76c-9f9a-4588-ea74-08d73b84deb7
X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2019 15:36:55.2882 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: v3otR6Ly11Fit+Boe9kVxQXg7B2ZX+sTmUIXMsePmCdYzkCUGsewQ3ZNj4W60SNSuktPIgpqOSE981EaKSTQQA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3744
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.36.7.14, xch-aln-004.cisco.com
X-Outbound-Node: rcdn-core-7.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/9ViPFbzVdSkoc1buCn7Vt6i3RGQ>
Subject: Re: [netconf] crypto-types fallback strategy
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, 17 Sep 2019 15:37:03 -0000

Hi Kent,

Please see inline …

From: Kent Watsen <kent+ietf@watsen.net>
Sent: 17 September 2019 15:24
To: Rob Wilton (rwilton) <rwilton@cisco.com>
Cc: netconf@ietf.org; Russ Housley <housley@vigilsec.com>; Rifaat Shekh-Yusef <rifaat.ietf@gmail.com>; Sean Turner <sean@sn3rd.com>
Subject: Re: [netconf] crypto-types fallback strategy

Hi Rob (also Rich and Juergen)

[RW]
The full numerical OID string is unique, but very hard to be interpreted by a human.  The human readable OID name (e.g. for just the last element) is not unique.

I agree with Juergen, in that I think that using OIDs as names for encryption protocols is probably a mistake and tying us into the past.

I was somewhat expecting that response ;)

Fine, now we're aligned to the need to define something for the "algorithm" field.

[RW]
OK


[RW]
Oops, my comment about should have been identities rather than identifiers!

I think that it is helpful that identities are extensible and can easily be constructed in a modular way.  E.g. defining identities in different YANG modules, and/or putting them under if-feature allows implementations to choose which ones they actually support.

In ietf-crypto-types I would define the base identities for:



hash-algorithm, asymmetric-key-algorithm, mac-algorithm, encryption-algorithm, encryption-and-mac-algorithm, signature-algorithm, key-exchange-algorithm

Note, as an aside, I am I also wondering whether the “encryption-and-mac-algorithm” identity should derive from both “mac-algorithm” and “encryption-algorithm”?  Or perhaps it doesn’t need to be defined at all, and the actual identities can just derive from two base identities?

I then suggest that we put different identities into different YANG modules, perhaps something roughly like:

·        Ietf-crypto-sha-types.yang for the SHA hash identities (RFC 6234)

·        Ietf-crypto-rsa-types for RSA asymmetric-key-algorithm (RC 8017)

·        Ietf-crypto-elliptic-curve-types for the Elliptic Curve based algorithms (RFC 6090, 5480, 8422)

·        Ietf-crypto-mac-types – I’m not really sure how to organize the MAC algorithm types, or even if they need to be defined now.

·        Ietf-crypto-aes-types – AES encryption types (RFC 4309)

·        Ietf-crypto-ssh-types – das-sha1, rsaasa-pkcs1-sha1 (RFC 4253)

·        Ietf-crypto-tls-types – (RFC 8446)

·        Ietf-cyprto-dhe-types – Diffier Hellman key exchange (RFC 7919).  Actually, the key-exchanges algorithm types might need to be split up a bit further.

The key step is that I would say that NETCONF should only standardizes the ones that we need now.  For the others, we could potentially create the YANG modules and either hand this off to the security groups, or work whether them to standardize these through the appropriate WGs.

This is a good path forward: flip back to identities and only define the identities hierarchies needed now.  Having multiple modules make sense (they'd all still be defined in the crypto-types draft).  Only possible discussion point is if these should be "iana-" modules rather than "ietf-" modules?   [The hope being that, if maintained by IANA, it might be possible to get auto-updates].
[RW]
IANA might be OK, I’m not sure.

My original thought was that if a new security RFC is written then it could hopefully also define a YANG module that defines the new identities related to that security protocol.  But that may well depend on the scope of the RFC.

E.g. looking at say draft-ietf-curdle-ssh-ed25519-ed448-11.txt, that has just been approved by the IESG, it would seem that this could probably just update iana-crypto-ssh-types with some new identities.  But other documents might need to introduce new categories (i.e. new crypto types modules) altogether, which I think is OK.





Perhaps we can do both, say that the field is parsed according to its "algorithm" value, but for now, all algorithm identifiers happen to point to ASN.1 structures.
[RW]
Yes, in essence I think that is what I’m suggesting.

Sounds good.




 If this is really common, then an identity for “ASN.1 encoded” could also be defined and inherited by crypto type identities above.  I think that this depends on how useful it is to programmatically know that they are encoded in ASN.1

Just knowing that it is ASN.1 encoded isn't enough, unless we say all ASN.1 encoded keys must be a OneSymmetricKey or OneAsymmetricKey (i.e., option 'B2' from before).


  Otherwise, the description statement needs to say something like "This identity indicates that the 'private-key' node is a DER-encoded RSAPrivateKey and 'public-key' is a DER-encoded RSAPublicKey."   Personally, I think this is okay.
[RW]
OK, so this is where I am beyond the boundary of my knowledge, and don’t really know how keys are programmatically used, but my hunch is that "This identity indicates that the 'private-key' node is a DER-encoded RSAPrivateKey and 'public-key' is a DER-encoded RSAPublicKey” sounds like the right option.  I think that we want the keys to be in whatever form applications can most readily use them without having to perform an arbitrary conversion.

Thanks,
Rob



An alternative to this may be to use a "choice" statement for "private-key" whereby one of the options is "asn1".



Kent // contributor