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.

Type ASN.1 class Encoding form Tag value
BIT STRING UNIVERSAL Primitive 00000011
BOOLEAN UNIVERSAL Primitive 00000001
INTEGER UNIVERSAL Primitive 00000010
NULL UNIVERSAL Primitive 00000101
BMPString UNIVERSAL Primitive 00011110
IA5String UNIVERSAL Primitive 00010110
PrintableString UNIVERSAL Primitive 00010011
TeletexString UNIVERSAL Primitive 00010100
UTF8String UNIVERSAL Primitive 00001100
SEQUENCE UNIVERSAL Constructed 00110000
SEQUENCE OF UNIVERSAL Constructed 00110000
SET UNIVERSAL Constructed 00110001
SET OF UNIVERSAL Constructed 00110001

DER Transfer Syntax

Encoded Length and Value Bytes