The following sections provide brief descriptions and examples of the ASN.1 fundamental concepts.
ASN.1 defines a group of primitive types for describing simple things like integers, and a group of more complex types, including record-like structures, among others. You can either use these predefined types or define new types. The names of all types in ASN.1 must begin with an uppercase letter. Most types defined by ASN.1 are written in all uppercase. Type names may contain letters, digits, or hyphens, but may not end with a hyphen nor contain two consecutive hyphens. Note that, unlike many programming languages, type names may not contain underscores.
The following table lists the ASN.1 types and their UNIVERSAL class tags in alphabetical order:
The following table lists the ASN.1 types and their UNIVERSAL class tags by category:
|Character String Types|
To inform a receiver about the type of the value it will encounter so that the value could be correctly decoded, each ASN.1 type is associated with a tag. A tag is a number enclosed in square brackets that appears before a type (for example, " INTEGER"). See ASN.1 Tags to learn about EXPLICIT, IMPLICIT, and AUTOMATIC tagging, how tagged types are encoded, and more.
A constraint can be applied on any ASN.1 type to restrict its possible set of values. For more information, see the following constraints:
The ASN.1 encoding rules define how messages should be encoded for transmission, independently of machine type, programming language, or representation within an application program. Each set of "encoding rules" has specific characteristics, such as compactness or decoding speed, which make it best suited for particular environments: