Understanding ASN.1 Integer PER Encoding

Consider this Wireshark trace for the R2Q registration request for h225:

enter image description here

as you can see, Wireshark decodes requestSeqNum

as 25601, but the byte representation is 0x6400, which is 25600. I looked in the ASN.1 PER encoding rules, but I cannot find the reason why the value should have increased from 1. My question is, does wireshark decode correctly, and if so, where can I find this in the spec?

ASN.1 code:

RequestSeqNum       ::= INTEGER (1..65535)

      

In fact, Wireshark consistently adds 1 to requestSeqNum

all h225 messages.

+3


source to share


1 answer


Nothing,

found it in Spec :



11.5.7.3 (Two octet case.) If "range" is greater than or equal to 257 and less than or equal to 64K, then the value ("n" - "lb") shall be encoded in a two octet bitfield (octet aligned in ALIGNED) as a non-negative binary integer encoding as specified in 11.3.

lb (lower bound) in this case is 1, which explains my question. I was looking for the wrong place in the spec, I am having reading headaches :)

+1


source







All Articles