Why use DER rather than BER?

I was not around when this decision was made, but I am curious why it was
decided that we should do DER encoding and decoding rather than the more
natural BER.  Since DER is a proper subset of BER, the statement that you
need to have both a DER and a BER decoder seems to be wrong.  A BER decoder
would successfully decode DER with no problems.  I do not know of any
security reasons why the document should prefer DER to BER.  It is not like
we care that there is a single encoding for a specific value or not.  We are
not signing the output at all.  The current requirement of having DER
decoders means that there are going to be some private keys that were
exported from a random source that will not import into the WebCrypto world
since they are BER encoded (as per the spec) and thus cannot be successfully
parsed.

I don't necessarily want to change the decisions, but it would seem that
much of Ryan's objections disappear if we allow for BER decoders.  This
would not make any requirements on encoders - they could still be required
to be DER if it was desired.

Jim

Received on Thursday, 31 March 2016 00:56:05 UTC