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

Viktor Dukhovni <ietf-dane@dukhovni.org> Tue, 26 March 2019 20:01 UTC

Return-Path: <ietf-dane@dukhovni.org>
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 0EBBC120A7F for <saag@ietfa.amsl.com>; Tue, 26 Mar 2019 13:01:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.201
X-Spam-Level:
X-Spam-Status: No, score=-4.201 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, 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 FUgAB4UIXPBl for <saag@ietfa.amsl.com>; Tue, 26 Mar 2019 13:01:14 -0700 (PDT)
Received: from straasha.imrryr.org (straasha.imrryr.org [100.2.39.101]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CACF2120A7C for <saag@ietf.org>; Tue, 26 Mar 2019 13:01:04 -0700 (PDT)
Received: by straasha.imrryr.org (Postfix, from userid 1001) id 9F890319E9E; Tue, 26 Mar 2019 16:01:03 -0400 (EDT)
Date: Tue, 26 Mar 2019 16:01:03 -0400
From: Viktor Dukhovni <ietf-dane@dukhovni.org>
To: saag@ietf.org
Message-ID: <20190326200103.GR3822@straasha.imrryr.org>
Reply-To: saag@ietf.org
References: <21dec229-5b5c-8d52-6817-edac2e39ceec@openca.org> <20198.1553629138@dooku.sandelman.ca>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <20198.1553629138@dooku.sandelman.ca>
User-Agent: Mutt/1.11.1 (2018-12-01)
Archived-At: <https://mailarchive.ietf.org/arch/msg/saag/p3LenIfWfXatpIm1Ut2s6InA-yc>
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 20:01:16 -0000

On Tue, Mar 26, 2019 at 08:38:58PM +0100, Michael Richardson wrote:

> Almost nobody uses encoders/decoders that
> generate code from ASN.1 today, it's all hand-coded...

The exceptions are notable and praiseworthy.  Heimdal's (Kerberos
and X.509) ASN.1 codecs are generated by an ASN.1 compiler from the
ASN.1 module definitions.

> This is why we hate DER, and we like CDDL/CBOR.

Whatever the abstract syntax, the real solution is probably more
widely available/used compilers.  Hand-rolled codecs will have more
(frequent and subtle) bugs.

-- 
	Viktor.