PKISolutions / Asn1Editor.WPF

Graphical WPF-based Abstract Syntax Notation One (ASN.1) DER editor
Microsoft Public License
189 stars 59 forks source link

High tag number form of identifier octets are not supported #11

Open halemmerich opened 5 years ago

halemmerich commented 5 years ago

The second octet of the tag is interpreted as a length, which leads to a incomplete display of the file and wrong parsing of the contents.

Example file

If bits 1-5 are all 1 in the first octet, there are 1 or more octets possible encoding the tag number. The MSB in all of these octets is set to 1 except 0 for the last octet of the tag number.

Crypt32 commented 5 years ago

If bits 1-5 are all 1 in the first octet, there are 1 or more octets possible encoding the tag number.

I don't think it is true for DER encoding. I'm not supporting BER at this moment.

halemmerich commented 5 years ago

Thanks for your reply. ITU-T X.690 2002 describes the multi octet tags in chapter 8.1.2.4. I could not find any restrictions regarding identifier octets in chapters 9-11 (CER/DER). It seems there are only rules for encodings of specific data types and ordering of constructed types. The encoding is unambiguous which should be ok for DER.