Correct ASN.1 encoding
am 01.04.2006 14:11:57 von Dazza TCan someone please confirm for me the correct way to encode an empty
IMPLICIT OPTIONAL tagged value.
As far as I know it should *always* be omitted under both BER and DER
encodings, but I can't lay my hands on something official that confirms it
(and so settle an argument).
In this example, `ThisOne' is empty:
Foo ::= SEQUENCE {
version INTEGER,
extra[0] IMPLICIT ThisOne OPTIONAL,
}
ThisOne ::= SET OF Bar
So should the encoding be
(A) 30 03 02 01 01
or
(B) 30 05 02 01 01 A0 00
Is (B) ever permissible?