Re: [saag] ASN.1 vs. DER Encoding

Benjamin Kaduk <kaduk@mit.edu> Tue, 26 March 2019 21:56 UTC

Return-Path: <kaduk@mit.edu>
X-Original-To: saag@ietfa.amsl.com
Delivered-To: saag@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 38B5A1203B6 for <saag@ietfa.amsl.com>; Tue, 26 Mar 2019 14:56:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 fJ6jkaZ7a8wT for <saag@ietfa.amsl.com>; Tue, 26 Mar 2019 14:56:32 -0700 (PDT)
Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5ABA61203AD for <saag@ietf.org>; Tue, 26 Mar 2019 14:56:32 -0700 (PDT)
Received: from kduck.mit.edu (24-107-191-124.dhcp.stls.mo.charter.com [24.107.191.124]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x2QLuQf7003009 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Mar 2019 17:56:28 -0400
Date: Tue, 26 Mar 2019 16:56:26 -0500
From: Benjamin Kaduk <kaduk@mit.edu>
To: Nico Williams <nico@cryptonector.com>
Cc: "Dr. Pala" <madwolf@openca.org>, "saag@ietf.org" <saag@ietf.org>
Message-ID: <20190326215626.GS86501@kduck.mit.edu>
References: <20190326164951.GX4211@localhost> <20190326214816.GB4211@localhost>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <20190326214816.GB4211@localhost>
User-Agent: Mutt/1.10.1 (2018-07-13)
Archived-At: <https://mailarchive.ietf.org/arch/msg/saag/0dcvvWKUliqV0qzaxHYyBkQ9r6Y>
Subject: Re: [saag] ASN.1 vs. DER Encoding
X-BeenThere: saag@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Security Area Advisory Group <saag.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/saag>, <mailto:saag-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/saag/>
List-Post: <mailto:saag@ietf.org>
List-Help: <mailto:saag-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/saag>, <mailto:saag-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 26 Mar 2019 21:56:34 -0000

On Tue, Mar 26, 2019 at 04:48:18PM -0500, Nico Williams wrote:
> I wrote earlier that:
> 
> > And then they (rightly!) hate BER/DER/CER, so they propose inventing
> > something new, often badly.  In this field, there is nothing new.  I'm
> > sure even flatbuffers isn't new.
> > 
> > I say "rightly" because TLV encodings are just terrible.  We really do
> > need non-TLV encodings (see below).
> 
> Now to back up that assertion:
> 
> 1) TLV encodings are bloated by nature due to being highly redundant.

Before I dig in too far to the rest, just to check: you're limiting to TLV
encodings that are nested and still do TLV at every level of the hierarchy?
I can't tell if you don't like things that are more like "a flat array of
things, each of which has tag, length, and (usually not nested) value.

-Ben