Re: [Sidrops] I-D Action: draft-ietf-sidrops-rpki-rsc-07.txt

Russ Housley <housley@vigilsec.com> Fri, 20 May 2022 12:14 UTC

Return-Path: <housley@vigilsec.com>
X-Original-To: sidrops@ietfa.amsl.com
Delivered-To: sidrops@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id AD02AC157B54 for <sidrops@ietfa.amsl.com>; Fri, 20 May 2022 05:14:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_NONE=0.001] autolearn=unavailable autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ue7r271olah1 for <sidrops@ietfa.amsl.com>; Fri, 20 May 2022 05:14:32 -0700 (PDT)
Received: from mail3.g24.pair.com (mail3.g24.pair.com [66.39.134.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5AA75C157B53 for <sidrops@ietf.org>; Fri, 20 May 2022 05:14:32 -0700 (PDT)
Received: from mail3.g24.pair.com (localhost [127.0.0.1]) by mail3.g24.pair.com (Postfix) with ESMTP id 0B40118F28D; Fri, 20 May 2022 08:14:31 -0400 (EDT)
Received: from [10.0.1.2] (pfs.iad.rg.net [198.180.150.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail3.g24.pair.com (Postfix) with ESMTPSA id E695F18EE31; Fri, 20 May 2022 08:14:30 -0400 (EDT)
From: Russ Housley <housley@vigilsec.com>
Message-Id: <80AD7E72-1F42-4314-B0A8-69819904F2EB@vigilsec.com>
Content-Type: multipart/signed; boundary="Apple-Mail=_FD2212EC-2ADB-4F7B-8A78-1D1A4DD68598"; protocol="application/pgp-signature"; micalg="pgp-sha256"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\))
Date: Fri, 20 May 2022 08:14:30 -0400
In-Reply-To: <20220520012253.zu4abj7kotvg3m3z@benm-laptop>
Cc: Randy Bush <randy@psg.com>, Job Snijders <job=40fastly.com@dmarc.ietf.org>, "sidrops@ietf.org" <sidrops@ietf.org>
To: Ben Maddison <benm=40workonline.africa@dmarc.ietf.org>
References: <165298105049.28270.14685971986743868185@ietfa.amsl.com> <YoZ/bsYUeHpCW3Mc@snel> <D55CE24C-36E2-4976-84BB-BDB19E0E2CC2@vigilsec.com> <DB9P190MB10839201BF38E8D1BCD485BBC0D09@DB9P190MB1083.EURP190.PROD.OUTLOOK.COM> <3BDB58DF-0431-4676-9606-611C129A4B0B@vigilsec.com> <m2o7ztfe4d.wl-randy@psg.com> <20220520012253.zu4abj7kotvg3m3z@benm-laptop>
X-Mailer: Apple Mail (2.3445.104.21)
Archived-At: <https://mailarchive.ietf.org/arch/msg/sidrops/lLQK1Mkur5C9dQB5w0yowPBbHMs>
Subject: Re: [Sidrops] I-D Action: draft-ietf-sidrops-rpki-rsc-07.txt
X-BeenThere: sidrops@ietf.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: A list for the SIDR Operations WG <sidrops.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/sidrops>, <mailto:sidrops-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/sidrops/>
List-Post: <mailto:sidrops@ietf.org>
List-Help: <mailto:sidrops-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/sidrops>, <mailto:sidrops-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 20 May 2022 12:14:34 -0000

Ben:

>> 
>>> Sorry that I was not clear.  Since the goal is to align with RFC 3779,
>>> we should use the same definition as was used there, which is OCTET
>>> STRING (SIZE (2..3)).
>> 
>> this makes more sense to me, as i do not see a win in having rules that
>> apply on wednesdays and fridays and not on other days of the week.  one
>> wants to be able to write tools that are not complicated unnecesarily.
>> 
> I think I am explaining the intent poorly. I will try again.
> 
> The intent is not to align with the ASN.1 definitions of 3779, but with
> the DER wire-format produced by implementations of 3779.
> 
> The previous version of the i-d used types imported from 3779 such
> that the ASN.1 correctly expressed the constraints that we were after
> (no rdi, no inherit, no empty SEQ OF, etc).
> 
> However, we received feedback from implementors that the structures that
> contained the imported types (called AsList and IPList in -06) were
> hostile to code-reuse for implementations dependent on openssl/libressl,
> because of the API exposed by these libraries.
> 
> This resulted in large amounts of almost-duplicate code for these
> implementors.
> 
> Initially, we discussed using ASIdentifiers and IPAddrBlocks (from 3779)
> directly in the RSC module, in order to permit re-use. This would have
> had the significant (in my opinion) downside of requiring the stricter
> constraints to be enumerated *only* in the prose of the draft, despite
> being easily expressible in ASN.1.
> 
> Instead, we identified an ASN.1 construction that represents a strict
> subset of the equivalent 3779 types *when encoded in DER*, whilst still
> expressing the desired constraints.
> 
> Thus any (DER encoded) data conforming to the -07 specification can be
> decoded using an implementation of 3779.
> Similarly, any data encoded using an existing 3779 implementation will
> fail to decode using the -07 module only to the extent that the
> RSC-specific constraints are violated.
> 
> This, I believe, provides the optimal flexibility to implementors.
> Either:
> A) re-use an existing 3779 library, adding constraint-checks by
> hand as necessary, or
> B) generate code directly from the -07 module, and get the correct
> constraint-checking for free (modulo the quality of the ASN.1 compiler
> used)
> 
> The goal is explicitly to deviate from 3779 at the ASN.1 level, whilst
> remaining compatible with 3779 at the DER-encoded bytes level.
> 
> In the specific case of the addressFamily field, allowing the SAFI-byte
> in the ASN.1, but then requiring that it MUST be absent in normative
> text (as is the case in other RPKI RFCs, e.g. 6487) would run contrary
> to the above goals.
> Implementors would be forced to do the constraint check by hand, even if
> they were generating the other constraints from the ASN.1 definitions.
> 
> Hope that makes more sense?

Not for me.  As you explain, you want compatibility with the library.  It produces a 2 octet value.  That is compatible with OCTET STRING (SIZE (2..3)).

I do not want someone to encode a value with the ASN.1 in RFC 3779 and then have a decode failure by an implementation that uses this ASN.1.

You can meet both of these goals...

Russ