Re: What ASN.1 got right

Theodore Ts'o <> Tue, 02 March 2021 04:45 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 69EE83A0EC6 for <>; Mon, 1 Mar 2021 20:45:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id pHMwdZzWAz-j for <>; Mon, 1 Mar 2021 20:45:16 -0800 (PST)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 1F0D23A0EC3 for <>; Mon, 1 Mar 2021 20:45:15 -0800 (PST)
Received: from ( []) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by (8.14.7/8.12.4) with ESMTP id 1224jDZc003395 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 1 Mar 2021 23:45:14 -0500
Received: by (Postfix, from userid 15806) id 663B015C3A88; Mon, 1 Mar 2021 23:45:13 -0500 (EST)
Date: Mon, 1 Mar 2021 23:45:13 -0500
From: "Theodore Ts'o" <>
To: Keith Moore <>
Subject: Re: What ASN.1 got right
Message-ID: <>
References: <20210302010731.GL30153@localhost> <04f601d70f04$404c5870$c0e50950$> <>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <>
Archived-At: <>
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IETF-Discussion <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 02 Mar 2021 04:45:17 -0000

On Mon, Mar 01, 2021 at 11:09:31PM -0500, Keith Moore wrote:
> There's something I used to call "ASN.1 disease", but it applies equally to
> XDR, some uses of XML, and a lot of other systems used to define data
> structures used in communications.
> The basic problem is that if you give people the ability to generate and
> require arbitrarily complex type-checked data structures, protocol designers
> will use that ability to create overly complex structures.   This in turn
> makes protocols and implementations much more brittle and less interoperable
> than they should be.   Every non-optional field must be specified and
> checked whether it is needed or not, it's more difficult to extend such
> protocols when needed, and implementation bugs that break things at a level
> which is hard to work around are far too common.

There's another side effect which this often enables (although
arguably this is the fault of the working group / standards committee)
which is that it becomes easier to settle disagreements by adding
large numbers of optional fields / substructures.  If you are using
fixed-length encodings, such as what is found in, say PPP, you can
still have extensibility, but since it's painful to create the
ASCII-art packet formats, I theorize this acts as a check against
unneceessary protocol complexity.

ASN.1-specified protocols tend to be far more complex, because it's
*easier* to create complexity, and this results in implementors having
to agree on profiles which are the subset of the protocol that
implementations _actually_ implement, and if there are different
profiles with different subset, there goes any hope of

						 - Ted