Subject: Re: A standard encoding for Certification Paths

From: Jeff Nisewanger <[email-masked]>
Date: Thu, 5 Apr 2001 18:49:28 -0700 (PDT)

Polar Humenn writes:
> I believe the lowest common denominator for a sequence of certificates is
> exactly that, a stream of ASN.1 Certificate encodings.
> 

Dean Povey writes:
> Degenerate PKCS#7/CMS SignedData indeed seems to be the most common
> method to pass around cert paths, which although something of an
> insanity is a small insanity in a very large universe of insanities.
> SEQUENCE OF Certificate is also not uncommon, and Polar's method of
> just streaming the Certificates without wrapping them up in a higher
> level ASN.1 structure is the way it is done in SSL/TLS.

	It is true that TLS does not use a higher level ASN.1 structure
but it also doesn't literally stream or concatenate the DER encoded
certificates together. Instead, it wraps the individual DER certificate
encodings into a sequence using its own TLS encoding scheme.  The peer TLS
implementation then decodes and unwraps the individual DER encoded
certificates in the chain and then perhaps hands the individual DER
encodings to an X.509 toolkit.

	Jeff

---

From: Eric Rescorla <[email-masked]>
Date: 05 Apr 2001 20:28:28 -0700

> encodings to an X.509 toolkit.
Quite so. Any other approach would require that the TLS toolkit
be able to itself parse ASN.1. This would be very inconvenient.

Note that from an encoding perspective a BER encoding of a
SEQUENCE or SET OF certificates can be formed by concatenating them and
then adding the tag and length. DER of SET OF is slightly trickier
because you have to sort them but then again you rarely have
to encode DER. Certainly you never do for S/MIME which is generally
BER encoded.

-Ekr

---

From: "David P. Kemp" <[email-masked]>
Date: Fri, 06 Apr 2001 09:14:56 -0400

> be able to itself parse ASN.1. This would be very inconvenient.

Perhaps "distasteful" to those of a certain philosophical bent, but
certainly not "inconvenient".  The amount of code required to take
a bytestream of BER/DER* objects and return a list of Length-Value's
pointing to each object is trivial, and the API for such code is
as simple as, say, strtok().

* Note, an X.509 certificate is encoded using BER, even though the
to-be-signed portion is DER.