Re: [secdir] [Last-Call] Secdir last call review of draft-ietf-netconf-crypto-types-20

Kent Watsen <kent+ietf@watsen.net> Fri, 27 August 2021 14:53 UTC

Return-Path: <0100017b8819bf19-1f20d528-72e4-462c-884a-6c29eff0769b-000000@amazonses.watsen.net>
X-Original-To: secdir@ietfa.amsl.com
Delivered-To: secdir@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6A28E3A088A; Fri, 27 Aug 2021 07:53:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 GOTQ0n9UMIGX; Fri, 27 Aug 2021 07:53:20 -0700 (PDT)
Received: from a48-95.smtp-out.amazonses.com (a48-95.smtp-out.amazonses.com [54.240.48.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 173233A088C; Fri, 27 Aug 2021 07:53:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1630075994; h=From:Message-Id:Content-Type:Mime-Version:Subject:Date:In-Reply-To:Cc:To:References:Feedback-ID; bh=Uu/ONjl7dl7hWoksXtnjx/UeTEwG5YasRHnS0hzF/C4=; b=aW/eA3gkN6CNF8x0YAR8W+pvy74y9RZaE2fdPQQJexU/N+7LJhJJoeGZ9V1q+we7 BV4fdQwIXLr+XdH/cl8dgRVBFOje9ifYELFDTq/KwiHctYOzM8gbfd9LImwjIdCXxdI l2SoG3SfNOSbruMbTZLw7ILxfIT4soHelgfiQ0+s=
From: Kent Watsen <kent+ietf@watsen.net>
Message-ID: <0100017b8819bf19-1f20d528-72e4-462c-884a-6c29eff0769b-000000@email.amazonses.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_17EAF07D-2366-4962-B625-7E97D33BF5B2"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\))
Date: Fri, 27 Aug 2021 14:53:14 +0000
In-Reply-To: <162982978380.3381.17549750696257276827@ietfa.amsl.com>
Cc: secdir@ietf.org, draft-ietf-netconf-crypto-types.all@ietf.org, "netconf@ietf.org" <netconf@ietf.org>
To: Valery Smyslov <valery@smyslov.net>
References: <162982978380.3381.17549750696257276827@ietfa.amsl.com>
X-Mailer: Apple Mail (2.3654.120.0.1.13)
Feedback-ID: 1.us-east-1.DKmIRZFhhsBhtmFMNikgwZUWVrODEw9qVcPhqJEI2DA=:AmazonSES
X-SES-Outgoing: 2021.08.27-54.240.48.95
Archived-At: <https://mailarchive.ietf.org/arch/msg/secdir/jIJRzxUQE-BvjGJiKM2fHfWnd4c>
Subject: Re: [secdir] [Last-Call] Secdir last call review of draft-ietf-netconf-crypto-types-20
X-BeenThere: secdir@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Security Area Directorate <secdir.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/secdir>, <mailto:secdir-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/secdir/>
List-Post: <mailto:secdir@ietf.org>
List-Help: <mailto:secdir-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/secdir>, <mailto:secdir-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 27 Aug 2021 14:53:26 -0000

[removing “last-call” alias]


Hello Valery.  

Thank you for your SecDir review, it is very much appreciated and never too late!

More comments below.

Thanks,
Kent


> On Aug 24, 2021, at 2:29 PM, Valery Smyslov via Datatracker <noreply@ietf.org> wrote:
> 
> Reviewer: Valery Smyslov
> Review result: Has Issues
> 
> I have reviewed this document as part of the security directorate's ongoing
> effort to review all IETF documents being processed by the IESG.  These
> comments were written primarily for the benefit of the security area directors.
> Document editors and WG chairs should treat these comments just like any other
> last call comments.
> 
> When I was re-assigned to review this draft the indicated deadline was already
> missed by 8 months, so I don't know how relevant the review is. I reviewed
> the latest -20 version of the draft instead of -18, that was requested.

Perfect.


> The draft defines common YANG data types and groupings useful for cryptography.
> I din't try to check the YANG module itself. 
> 
> Issues:
> 
> Shouldn't a Privacy Considerations section be added to the draft?
> The draft defines quite a lot of privacy-sensitive information (like certificates)
> with no restriction on read access (as far as I understand).


Both the "trust-anchor-cert-grouping” and “end-entity-cert-grouping” groupings have "nacm:default-deny-write” that, to your point, does not restrict reads.  That said, only management protocols having mutual authentication (e.g., SSH and/or TLS based transport) can access the data.  

Is your concern that the certificate’s content would be visible to the administrators?  Is your comment on end-entity certificates (containing personally-identifying information), more than trust-anchor-certificates?


> Section 3.5.
> While I understand and support the idea, expressed in this section, I think that
> the way it is expressed makes it difficult to follow in practice. In general, it's
> not always obvious how to estimate the "strength" of the underlying secure transport.
> For this reason it's not clear for me how it is supposed to "compare" the 
> "strength" of the transport with the "strength" of the keys being transported.

I saw language like this once in a DoD setting.  I agree that it is difficult to implement in practice.  I used “SHOULD” (not MUST) to buy some leeway for implementations to be compliant.  Makes sense?

FWIW, my YANG-driven server is able to remember what key the client used for authentication (e.g., RSA 2048) and register a callback to test that no greater keys (e.g., 3072 or 4096) are configured by that client.  Additional logic would be needed to prevent a low-strength client from *reading* a high-strength key configured by another client…though the issue can be alternatively resolved by configuring the TLS-stack to prevent low-strength algorithms.


> In addition, the requirement, that "Implementations SHOULD fail the write-request if ever
> the strength of the private key is greater then the strength of the
> underlying transport" looks wrong to me. You don't need to have
> 1024 bits transport protocol strength to transfer 1024 bit key, since
> even for say 256 bits it's infeasible to break.

IDK about this.  Again, I saw this constraint once in a DoD setting.  


> I think that the better approach would be to advise using strong
> ciphersuites for transport protocols defined in corresponding RFCs.
> For example, for TLS 1.3 there are ciphersuites marked as "recommended",
> that were evaluated by IETF crypto community.

I added this sentence:

	Implementations SHOULD configure allowed transport 
	algorithms to include only those meeting local
	policy (e.g., listed as "recommended" by the IETF).

Good?


> Section 3.6:
>   For instance, AES
>   using "EBC" SHOULD NOT be used to encrypt passwords, whereas "CBC"
>   mode is okay since it a unique initialization vector (IV) should be
>   used for each run.
> 
> Not only IV for CBC should be unique, it should be unpredictable (random or pseudo-random).
> I also think that lowercase "should" here must be uppercase, or even MUST.

Replaced “unique” with “unpredictable”
Replaced “should” with MUST.


> Typos, nits:
> 
> Section 3.6: 
>   In order to thwart rainbow attacks, algorithms that result in a
>   unique output for the same input SHOULD be used. 
> 
> s/SHOULD/SHOULD NOT

Egads - fixed!


>   For instance, AES
>   using "EBC" SHOULD NOT be used to encrypt passwords, whereas "CBC"
>   mode is okay since it a unique initialization vector (IV) should be
>   used for each run.
> 
> s/EBC/ECB
> s/it//
> I believe "okay' is a bit of slang, isn't it?

Fixed, now reads:

	In order to thwart rainbow attacks, algorithms that result
	in a unique output for the same input SHOULD NOT be used.
	For instance, AES using "ECB" SHOULD NOT be used to
	encrypt passwords, whereas "CBC" mode is permissible
	since an unpredictable initialization vector (IV) MUST be
	used for each use.</t>


> Section 3.8:
>   Since the module in this document only define groupings, these
>   considerations are primarily for the designers of other modules that
>   use these groupings.
> 
> s/define/defines

Fixed!



Kent, as author