Encoded Tag Bytes

The Tag field in a TLV triplet identifies the type of the data structure being sent between computers. For example, the tag for an integer is 0x02, and the tag for an object identifier is 0x06. Although multiple bytes are permitted, none of the data types used by the Certificate Enrollment API require more than one. The following illustration shows the breakdown of a Tag value. Bits 7 and 6 identify the ASN.1 tagging class. There are four available classes, but the Certificate Enrollment API uses data types that belong only to the UNIVERSAL class. Bit 5 identifies whether the encoding form is primitive or constructed. Basic and string types are encoded by using primitive forms, constructed types by using a constructed form. For more information, see ASN.1 Type System. Bits 4 through 0 contain the tag number.

DER TLV tag byte

The following table lists the data types supported by the Certificate Enrollment API, the encoding form used, and the tag value.

TypeASN.1 classEncoding formTag value
BIT STRINGUNIVERSALPrimitive

00000011

(0x03)

BOOLEANUNIVERSALPrimitive

00000001

(0x01)

INTEGERUNIVERSALPrimitive

00000010

(0x02)

NULLUNIVERSALPrimitive

00000101

(0x05)

OBJECT IDENTIFIERUNIVERSALPrimitive

00000110

(0x06)

OCTET STRINGUNIVERSALPrimitive

00000100

(0x04)

BMPStringUNIVERSALPrimitive

00011110

(0x1E)

IA5StringUNIVERSALPrimitive

00010110

(0x16)

PrintableStringUNIVERSALPrimitive

00010011

(0x13)

TeletexStringUNIVERSALPrimitive

00010100

(0x14)

UTF8StringUNIVERSALPrimitive

00001100

(0x0C)

SEQUENCEUNIVERSALConstructed

00110000

(0x30)

SEQUENCE OFUNIVERSALConstructed

00110000

(0x30)

SETUNIVERSALConstructed

00110001

(0x31)

SET OFUNIVERSALConstructed

00110001

(0x31)

 

Related topics

DER Transfer Syntax
Encoded Length and Value Bytes

 

 

Community Additions

ADD
Show: