Re: Limits, symbols and bytevectors, ASN.1 branding
Alaric Snell-Pym 26 Sep 2019 08:56 UTC
On 26/09/2019 09:23, Lassi Kortela wrote:
>> After that, the content of each ASN.1 LER object is one of three things:
>
> This comes across like nitpicking but there's a deeper point behind it:
> I'd change the name "LER" to something else. I know it's consistent with
> other ASN.1 names like BER and DER,
Weelllll not quite IMHO...
In ASN.1, BER, DER, CER, PER and XER are different encodings for values
defined by ASN.1 models. Given the ASN.1 definition of the value type,
automated tools can make converters between *ER. The "ER" stands for
"Encoding Rules" in all cases.
BER/DER/CER are a family; BER is the Basic Encoding Rules which give a
bunch of encoder's options about the order of fields and different ways
of saying the same thing, and CER and DER are just two different levels
of canonicalisation, subsetting/constraining BER in order to make things
like cryptographic hashes of the encoded data semantically meaningful as
hashes of the logical value therein.
PER is the Packed Encoding Rules; the encoding/decoding algorithm (or,
to be more precise, the algorithm required to convert an ASN.1 type
specification into an encoder/decoder, which are then quite simple) is
more complicated in order to try and make it as information-dense as
practical without using compression techniques. This was done because
people complained that BER - with all its length prefixes and type tags
on things even when they are constrained by the schema, so that tools
can make some attempt at processing them without access to the schema -
was wasteful (back in the days when link bandwidth was a lot more
expensive than it is now).
XER is the XML Encoding Rules, which writes ASN.1 values as XML.
So "LER", to me at least, implies an ASN.1 encoding rule that writes
arbitrary ASN.1 values as Lisp, presumably as s-expressions!
Whereas what I think John is describing is more of a mapping from an
s-expression subset into a schemaless BER encoding with pre-assigned
type tags.
> The name "ASN.1" itself is oddly cool for something that was presumably
> birthed in large conference rooms. It sounds like Formula 1, itself a
> cool name for an auto-racing contest. They did something right :)
Having sat in those conference rooms... yeah, I agree :-D
--
Alaric Snell-Pym (M7KIT)
http://www.snell-pym.org.uk/alaric/