Re: What ASN.1 got right

Michael Thomas <> Tue, 02 March 2021 18:38 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 2C9F63A0C57 for <>; Tue, 2 Mar 2021 10:38:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.749
X-Spam-Status: No, score=-1.749 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id N5IHE14kpeJ4 for <>; Tue, 2 Mar 2021 10:38:19 -0800 (PST)
Received: from ( [IPv6:2607:f8b0:4864:20::1029]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id EEDB73A0C56 for <>; Tue, 2 Mar 2021 10:38:18 -0800 (PST)
Received: by with SMTP id e9so2617957pjj.0 for <>; Tue, 02 Mar 2021 10:38:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=fluffulence; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=0fJv+KoX3y4++fLO9B9B9zyJYhGECbNDuqWZUoZ8DP0=; b=dyEg2XODw7K69ech76OVGUKUnjpfM5SteGQPhIjs2vt5ksArVIVLZH08AgJRUHk902 S4Eidkc4SvmhHnqy8EbHqKt7F+A9on/ePT3r4vJtEcqhLdkg7IrukZU6JwvB9Sfui0u5 UaYZIFmxUGgVRuODCAN7m7fzEr67b7yAjdS+daijgq+0tfdJ4SJdyZKDkdKsQBj5YADg 1nuSSLIowrQ6PANu6+rOyPn+t+Q5vwEVgmfgCIDHf85fpep5OzNL8B8U6ZQqCpJmlCrB KvPi1ee3nJfR1qFhSTOvtsrONSrd03QRsBX9Mwlw6EE7STsis0v1vGvRVdtHAauJZkyY p6xQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=0fJv+KoX3y4++fLO9B9B9zyJYhGECbNDuqWZUoZ8DP0=; b=oult/7cGb6OkCZN46ffAcjSyfJYBWYrWHphRUsuAPbY99g3IoK82CA29+Uht0F3xhZ u/KE4SkTwv7KjmY7IhbSdltCZNeNE80LWJU/g79Q1hMfiu/srnVshfOzw6raclzFcrMT kNHEXknIEsO9BBVR6cmQTAXIAVSGxJ6d0O4trZXjjKAd3z48bS1yCWSVL26IxuWBrCM9 yjSkiYmw+eWgjpJO1TH3+zPgdoA2qznsnLnQQPzkNmo6ucIkjJI30FkIHcaNPuuyztn9 wOKsTsCRnH89h4esg/ZQdSdAbuT0puTRDJzJzY9pAjRvHV7s9FeKnvk+ZbV0yfgkm+Fo EWQQ==
X-Gm-Message-State: AOAM531pBkKd24oHGGdxeSuMud8Bri7WoRcvHHfUM6wOO+Isjcd/ZYWC lItl92QDdyRWRMnjQ6E0GwN2PR31Q36LHw==
X-Google-Smtp-Source: ABdhPJx6G4t8Uusgh/ZsQ8miQEiGKL/noccPEBUV8b2eXQFuWSKPTSLTchfRWJJTPBDS/6UFJasvSQ==
X-Received: by 2002:a17:90b:164c:: with SMTP id il12mr5902817pjb.32.1614710297524; Tue, 02 Mar 2021 10:38:17 -0800 (PST)
Received: from mike-mac.lan ([]) by with ESMTPSA id v123sm22217359pfc.63.2021. (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Mar 2021 10:38:17 -0800 (PST)
Subject: Re: What ASN.1 got right
To: Phillip Hallam-Baker <>
Cc: IETF Discussion Mailing List <>
References: <20210302010731.GL30153@localhost> <> <>
From: Michael Thomas <>
Message-ID: <>
Date: Tue, 2 Mar 2021 10:38:15 -0800
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.8.0
MIME-Version: 1.0
In-Reply-To: <>
Content-Type: multipart/alternative; boundary="------------AAF1B2AC94F5DA1B4D4C08D0"
Content-Language: en-US
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 18:38:21 -0000

On 3/1/21 9:28 PM, Phillip Hallam-Baker wrote:
> Thing about the WebPKI is that everyone seems to hate it just as much 
> today as when we originally proposed it 25 years ago. All the things 
> people keep saying were better were on the table then as well. We 
> could have a discussion about why DNSSEC is no better but that won't 
> get us anywhere.
> None of the systems on the table in 1995 is going to work and if you 
> want to understand why go get a machine that SHIPPED with Windows 95, 
> boot it and see what we had to work with.
> PKIX and the WebPKI were built for 30MHz machines with 32 bit 
> processors and 4MB of memory.
> If you want a decent PKI for user authentication you need to be 
> willing to do Internet2 for PKI and do some blue sky research.
> There aren't many folk doing that at the moment as BitPonzi has sucked 
> all the air out of the room.
> Its not ASN.1 that is the problem. Its actually Public Key crypto 
> isn't enough, you need threshold. But we are getting rid of the ASN.1 
> as well for two reasons. First, nobody is going to use our stuff if we 
> force them to do ASN.1. Second, nobody is paying me to do my stuff 
> right now but once I have it working in JSON/JSON-B, I can probably 
> find some ASN.1 aficionados to give me a consulting gig to write an 
> ASN.1 version.

TLS is water under the bridge. We got the mess of disjoint trust anchors 
and who should be trustworthy or not, but somehow it mostly works. My 
beef is with the collateral damage of that choice. ASN.1 instantly makes 
figuring out what's going on much harder. Instead of more(1) I have to 
do some arcane openssl incantation to view the contents of a 
certificate. And instead of just directly using a public key to bind to 
an identity, I have to figure out how and what CA to issue a 
certificate, blah blah blah, instantly making a simple concept far, far 
harder. And don't even get me started on business models.

Look at the complexity difference between DKIM vs. STIR which are doing 
approximately the same thing (or at least should be). I would say that 
part of STIR's failing is that they got sucked down the X.509 rathole 
requiring special root CA's so they could assert things about e.164 
addresses instead of doing the far more obvious thing that DKIM did 
which was to assign responsibility for messages to the domains sending 
them. It's not directly X.509's fault they solved the wrong problem, but 
it absolutely didn't help because it set up the mindset where solving 
the wrong problem seemed like a tractable problem when in fact it is not.


> On Mon, Mar 1, 2021 at 8:18 PM Michael Thomas < 
> <>> wrote:
>     The combination of ASN.1 and X.509 has done irreparable harm to
>     identity
>     on the internet. X.509 provides exactly one benefit: the ability to
>     verify offline that almost nobody cares about anymore. They have
>     needlessly obfuscated the contents in the case of ASN.1, and the
>     name/key binding in the case of X.509. Every security newbie
>     immediately
>     assumes that if you want to use an asymmetric key that you need X.509
>     and hence ASN.1. That is not the case and that tail has wagged way
>     too
>     many dogs.
>     The best you can say is that X.509 bootstrapped TLS, but it would
>     have
>     been a way better world had it been bootstrapped by DNS.
>     Mike, yuck.
>     On 3/1/21 5:07 PM, Nico Williams wrote:
>     > As an ASN.1 implementor, I can tell you things I, like many of
>     you, hate
>     > about ASN.1:
>     >
>     >   - ugly syntax (made uglier by having tags as optional lexical
>     elements)
>     >
>     >   - ugly OIDs (should have been URNs or URN-like)
>     >
>     >   - BER/DER/CER and all TLV encodings in the world (protocol
>     buffers, I'm
>     >     looking at you too) are awful
>     >
>     >   - the fact that the specs were, for a long time, non-free,
>     which led to
>     >     a dearth of open source tooling that still persists somewhat
>     (though
>     >     not as bad as it used to be)
>     >
>     >   - the fact that for years people hand-rolled their codecs due
>     to the
>     >     previous item, and so created many bugs
>     >
>     >   - X.400/X.500, which are not part of ASN.1, of course, but closely
>     >     related -- especially X.500 style naming!
>     >
>     > Having recently implemented automatic open type decoding
>     handling X.681/
>     > X.682/X.683 (see RFCs 6025 for some insight, and 5912 for real
>     examples
>     > that I'm making use of), I can tell you that ASN.1 got some things
>     > right:
>     >
>     >   - rich formalisms ("constraints")
>     >
>     >   - separation of syntax and encoding rules
>     >
>     > The fact that there are many encoding rules for ASN.1, of almost
>     every
>     > kind (binary TLV, binaray non-TLV, and textual, including XML- and
>     > JSON-based rules) proves the last point.  I can't help but see
>     how XDR,
>     > NDR, and flatbuffers, among many other encodings out there,
>     could easily
>     > be used with ASN.1.  (E.g., what XDR and NDR call "pointers" are
>     just
>     > optional fields in ASN.1.)
>     >
>     > The fact that one can implement automatic open type decoding
>     using ASN.1
>     > formalisms and those already published in, e.g., RFC 5912[*]
>     proves the
>     > utility of those formalisms.  I now get to see certificates and many
>     > other things in all their "glorious" detail as JSON, including all
>     > extensions and what not, and that's made possible by these
>     formalisms.
>     >
>     > I beg the next person to re-invent this darned wheel to please
>     educate
>     > themselves as to what came before.  Among many lessons you
>     should learn,
>     > learn that some things can't be monetized well enough, or at
>     all, or can
>     > only be monetized in exchange for limiting their adoption, so
>     figure out
>     > what your goals are, then align pricing and licensing with those.
>     >
>     > And since open types appear to be unavoidable, but also always a
>     pain if
>     > you don't have the metaschema to express the metadata needed to
>     automate
>     > their handling, don't forget to cover that.
>     >
>     > XML, of course, with namespaces and references, has a reasonable
>     > approach to open types as well.  It's not just ASN.1 that gets that
>     > right well enough.
>     >
>     > Nico
>     >
>     > [*] A big thank you to RFC 5912's authors, though sadly one of
>     them has
>     >      passed.
>     >