Re: [netconf] ietf crypto types - permanently hidden

Balázs Kovács <balazs.kovacs@ericsson.com> Fri, 31 May 2019 07:40 UTC

Return-Path: <balazs.kovacs@ericsson.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 094DF12001B for <netconf@ietfa.amsl.com>; Fri, 31 May 2019 00:40:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.031
X-Spam-Level:
X-Spam-Status: No, score=-1.031 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FROM_EXCESS_BASE64=0.979, HTML_MESSAGE=0.001, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.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 EBGWUs85h9QJ for <netconf@ietfa.amsl.com>; Fri, 31 May 2019 00:40:18 -0700 (PDT)
Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02on062a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe07::62a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6A95A12007A for <netconf@ietf.org>; Fri, 31 May 2019 00:40:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jOeinxqijIsai2XewEDoJB3HOZfsA3iFnGiJ+05Etyg=; b=riXuKtw2DNi5K+x+ewujvN/h3A37HXD4fD/LQuHePLjRcHCZla00uR+8USNaYQl9LxCAsHz/NhPO4D+2DivCTuaAUo2GFHBBZsYQ9UWCRuWHOd8F0GyLGmw2kT3MkhI0wfTjKaP8N0EFu6dChAw9Uq9a7N7FvhuR3AV6+3LMcew=
Received: from VI1PR07MB4735.eurprd07.prod.outlook.com (20.177.57.146) by VI1PR07MB4944.eurprd07.prod.outlook.com (20.177.201.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.4; Fri, 31 May 2019 07:40:15 +0000
Received: from VI1PR07MB4735.eurprd07.prod.outlook.com ([fe80::95e8:7ebf:d9f5:d887]) by VI1PR07MB4735.eurprd07.prod.outlook.com ([fe80::95e8:7ebf:d9f5:d887%7]) with mapi id 15.20.1943.016; Fri, 31 May 2019 07:40:15 +0000
From: Balázs Kovács <balazs.kovacs@ericsson.com>
To: Kent Watsen <kent@watsen.net>
CC: "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [netconf] ietf crypto types - permanently hidden
Thread-Index: AdTf8DCbvspujhISQkyURJOX9ReFpALufsOAAAVM5oADthG5oAAICCMAAAQfJ4AABQvugADqJOIAAAiERYAAKAZY4AABZSwAAAGYSwAABxXrgAA8jwUAAB/0SoAAJqYTgAAFKLEAAAT2BoAACbL7AAAASZ0AAL8j1gAAAX72AAASqQQAABHnTAAArPS3AAKWLDUAARaMhaAACnm1AAAjjAdg
Date: Fri, 31 May 2019 07:40:15 +0000
Message-ID: <VI1PR07MB47351DBAC8B0C8EB8A6309D283190@VI1PR07MB4735.eurprd07.prod.outlook.com>
References: <0100016a7e7a9e54-d4987061-96d8-49f3-a2bf-36b98851b3a3-000000@email.amazonses.com> <0100016a7e822689-e6fdbdbe-ba84-43e1-aefe-47196fe692e3-000000@email.amazonses.com> <e6930b6e52a642bda9f1bd76731ce9c3@XCH-RCD-007.cisco.com> <20190507.141926.1879619200930898148.mbj@tail-f.com> <0100016a942528d9-f65afd2a-2cc7-451d-93d8-788495f6a13a-000000@email.amazonses.com> <20190508054622.rz64qmxdhbx53x4g@anna.jacobs.jacobs-university.de> <0100016aa7b06b97-15f7703f-58b7-40a9-8afe-a54dd2b809e2-000000@email.amazonses.com> <0100016aeb7ee1aa-93dbb2f2-f4ff-432f-9a26-a10abb96b03b-000000@email.amazonses.com> <VI1PR07MB4735A8741475AB48FC53FACD83180@VI1PR07MB4735.eurprd07.prod.outlook.com> <0100016b09177be4-ad12ed9f-ddc5-4c13-9470-39b2768513cb-000000@email.amazonses.com>
In-Reply-To: <0100016b09177be4-ad12ed9f-ddc5-4c13-9470-39b2768513cb-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=balazs.kovacs@ericsson.com;
x-originating-ip: [89.135.192.225]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 52a84743-f0f0-455a-1e24-08d6e59b3903
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:VI1PR07MB4944;
x-ms-traffictypediagnostic: VI1PR07MB4944:
x-microsoft-antispam-prvs: <VI1PR07MB4944886F1F19E7E0F6964E6783190@VI1PR07MB4944.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 00540983E2
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(136003)(346002)(376002)(396003)(366004)(189003)(199004)(51444003)(99286004)(790700001)(316002)(6306002)(71200400001)(6116002)(71190400001)(76116006)(3846002)(52536014)(7696005)(14444005)(33656002)(256004)(66556008)(66476007)(8676002)(7736002)(74316002)(66946007)(53546011)(476003)(6916009)(81156014)(81166006)(8936002)(66446008)(64756008)(9686003)(5660300002)(54896002)(85182001)(76176011)(6506007)(73956011)(102836004)(6436002)(68736007)(486006)(186003)(6246003)(85202003)(66066001)(25786009)(2906002)(14454004)(508600001)(66574012)(11346002)(446003)(53936002)(229853002)(55016002)(4326008)(86362001)(26005)(9326002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR07MB4944; H:VI1PR07MB4735.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: ViplALUyPRFrBmKuef/JUGbVIFUKG5Kexz4/v9eytJDozghEa7CJP4zkYuRZj1w2K6bpWHB+vbJgiNllXaeX2FBMHWQ8FLolIG86lgycCaSAdOtHa4JC19Q1G1NgQO795/EzTzWUPftzR5Q31tlgt5PmaI/udihMDVEY00eywkrPWDbd60fSq7vzM760wM4H8XBSbZsmIxULiTm/nbKOP3WQgLS3GLQ+0dAuIVSuLSJiXOgQ7Fn3k3nyhdMGnW3DhyMwlG5RRnXiMR1EQ7iXA5MKdVgTb7bBX6iqSCCAcsWm7UBrLo98A4sICJxBG8XCDU4a7HBW4DnOHB3YtYFxU6c/ODbnNBVTKdj+SOYorgdNvtW+pKYspYCjNlf5AzkRcBlN66JA1br+sl+47SOb92w0EdqGnQ7SnT2ocTF4JGY=
Content-Type: multipart/alternative; boundary="_000_VI1PR07MB47351DBAC8B0C8EB8A6309D283190VI1PR07MB4735eurp_"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 52a84743-f0f0-455a-1e24-08d6e59b3903
X-MS-Exchange-CrossTenant-originalarrivaltime: 31 May 2019 07:40:15.8451 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: balazs.kovacs@ericsson.com
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB4944
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/WV0rKdbUOCThcOFfEMMZgitATmg>
Subject: Re: [netconf] ietf crypto types - permanently hidden
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: Fri, 31 May 2019 07:40:22 -0000

Hi Kent,

Also validation of required input and output seems more complicated to me.

How so?

The ‘value-to-be-generated’ “action” would require both the private-key and public-key set to the same, plus the algorithm be configured. Besides, if there is a must statement on any of these, does the must statement consider the ‘input’ or the ‘output’ values? I got a bit confused while thinking on these.

 I’m also thinking do we need the ‘generate-and-not-hide’ and the ‘install-and-hide’ use cases?

Actually, I view  ‘generate-and-not-hide’ as a very common case.  That is, ask the system to generate the key (because clients are lazy and security best practice), and let standard NACM rules protect the key.   I think that systems supporting user-generated "hidden" keys will be somewhat rare, to the extent that there should feature statements enabling servers to indicate if they support the ability or not.

Maybe generate-and-not-hide would be widespread, but it is not my preferred choice of key handling due to that it opens up to the client to manage the key blob after first generation. So maybe all of these should be optional with features?


we have:

   leaf private-key {
     nacm:default-deny-all;
     type union {
       type binary;
       type string {
         pattern
           '<permanently-hidden>'
         + '|<encrypted by="*">[A-Za-z0-9+/]+[=]{1,3}'
       }


This removes the "verbs" (as you call them) and thus leaves open possibility for either "verbs" or action statements to be added in some future revision.   This subset still supports the critical use-case of a manufacturer-generated private key for a secure device identifier (i.e., IDevID).    Unfortunately, it does not support the security best practice use-case of having the device generate the private key.  The IESG (Security Directorate) may or may not be okay with this (obviously the shepherd would have to bring it to their attention), but perhaps it's worth testing their resolve and see what happens?

If so, can you clarify the configuration use case of client configuring <permanently-hidden>, does that produce a valid end-result? Or would that be only an output pattern created as the result of a ‘generate-hidden-key’ action that may be added by an implementation augmenting the model?
Regarding ‘encrypted by’, would that be only used when the device allows to back up encrypted keys to later restore it to same device (or any other that may get hold of the same encryption key in some way)?

Br,
Balazs


From: Kent Watsen <kent@watsen.net>
Sent: Thursday, May 30, 2019 4:14 PM
To: Balázs Kovács <balazs.kovacs@ericsson.com>
Cc: netconf@ietf.org
Subject: Re: [netconf] ietf crypto types - permanently hidden


Hi Balazs,

In case of crypt-hash, I can accept the extension of the crypt(3) schemes with a $0$ that sort of represents a hash() action, since it matches the original crypt(3) syntax.

In this case, I find it awkward to tell what to do with the data (verbs) as prefixes of the data.

Agreed, but we seem to be at an impasse and I thought this approach could get us over the line.



I personally preferred actions better for this purpose.

It is my preference to use actions as well, but there's pushback there.  Maybe we could claim that the pushback is "in the rough" and press ahead regardless, but I'd rather avoid that if possible.



I assume that this representation also does not change the matter of “actions” affecting configuration (see ‘output’ values).

You mean, exploring this solution leaves the "is it possible for actions to affect configuration" as unresolved?  - correct, that discussion would remain open.



Also validation of required input and output seems more complicated to me.

How so?


The generate action returning the name of the key or optionally creating configuration sounded so far the closest match to me.

Understood.



 I’m also thinking do we need the ‘generate-and-not-hide’ and the ‘install-and-hide’ use cases?

Actually, I view  ‘generate-and-not-hide’ as a very common case.  That is, ask the system to generate the key (because clients are lazy and security best practice), and let standard NACM rules protect the key.   I think that systems supporting user-generated "hidden" keys will be somewhat rare, to the extent that there should feature statements enabling servers to indicate if they support the ability or not.


---

I'm growing weary of this discussion.  Perhaps we should do even less for the first release of the crypto-types module.  That is, instead of:

   leaf private-key {
     nacm:default-deny-all;
     type union {
       type binary;
       type string {
         pattern
           '<permanently-hidden>'
         + '|<encrypted by="*">[A-Za-z0-9+/]+[=]{1,3}'
         + '|<value-to-be-generated(-and-hidden)?>'
         + '|<value-to-be-hidden>[A-Za-z0-9+/]+[=]{1,3}';
       }

we have:

   leaf private-key {
     nacm:default-deny-all;
     type union {
       type binary;
       type string {
         pattern
           '<permanently-hidden>'
         + '|<encrypted by="*">[A-Za-z0-9+/]+[=]{1,3}'
       }


This removes the "verbs" (as you call them) and thus leaves open possibility for either "verbs" or action statements to be added in some future revision.   This subset still supports the critical use-case of a manufacturer-generated private key for a secure device identifier (i.e., IDevID).    Unfortunately, it does not support the security best practice use-case of having the device generate the private key.  The IESG (Security Directorate) may or may not be okay with this (obviously the shepherd would have to bring it to their attention), but perhaps it's worth testing their resolve and see what happens?


Kent // contributor