ASN.1 message Payload
Abstract Syntax Notation One, abbreviated ASN.1, is anotation for describing abstract types and values.
1.BER传输语法的格式一直是TLV三元组<Type,Length, Value>.
T是Tag,L是整个类型的长度,V是类型的Value,它还可以是TLV或TLV组合
2.BER传输语法是基于八位组大端编码的,高八位在左。
3.Tag是一个或若干个八位组
There are four classes of tag:
Universal, for types whose meaning is the same in all applications; these types are only defined in X.208.Application, for types whose meaning is specific to an application, such as X.500 directory services; types in two different applications may have the same application-specific tag and different meanings.
Private, for types whose meaning is specific to a given enterprise.
Context-specific, for types whose meaning is specific to a given structured type; context-specific tags are used to distinguish between component types with the same underlying tag within the context of a given structured type, and component types in two different structured types may have the same tag and different meanings.
(1).UniversalTag类型(值是0-30):
第七、六位指明Tag的类型,UniversalTag类型用00表示;第五位指明该类型以primitive方式编码还是constructed方式编码。
Tagvalue值是基本类型的Tag的值,例如INTEGER的Tag值是2,SEQUENCE型类Tag值是16:
ASN.1中定义的UNIVERSAL类Tag
-
Tag
类型
0
BER保留
1
BOOLEAN
2
INTEGER
3
BIT STRING
4
OCTET STRING
5
NULL
6
OBJECT IDENTIFIER
7
ObjectDescripion
8
EXTERNAL,INSTANCE OF
9
REAL
10
ENUMERATED
11
EMBEDDED PDV
12
UFT8String