Asn1Editor.WPF icon indicating copy to clipboard operation
Asn1Editor.WPF copied to clipboard

High tag number form of identifier octets are not supported

Open halemmerich opened this issue 4 years ago • 2 comments

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.

halemmerich avatar Aug 13 '19 13:08 halemmerich

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.

Crypt32 avatar Aug 13 '19 14:08 Crypt32

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.

halemmerich avatar Aug 13 '19 14:08 halemmerich