ISO/IEC 8824-1:2008
(Main)Information technology - Abstract Syntax Notation One (ASN.1): Specification of basic notation - Part 1:
Information technology - Abstract Syntax Notation One (ASN.1): Specification of basic notation - Part 1:
ISO/IEC 8824-1:2008 specifies a standard notation called Abstract Syntax Notation One (ASN.1) that is used for the definition of data types, values, and constraints on data types. ISO/IEC 8824-1:2008 defines a number of simple types, with their tags, and specifies a notation for referencing these types and for specifying values of these types; defines mechanisms for constructing new types from more basic types, and specifies a notation for defining such types and assigning them tags, and for specifying values of these types; defines character sets (by reference to other ITU-T Recommendations and International Standards) for use within ASN.1. ISO/IEC 8824-1:2008 can be applied whenever it is necessary to define the abstract syntax of information. ISO/IEC 8824-1:2008 is referenced by other standards which define encoding rules for the ASN.1 types.
Technologies de l'information — Notation de syntaxe abstraite numéro un (ASN.1): Spécification de la notation de base — Partie 1:
General Information
Relations
Frequently Asked Questions
ISO/IEC 8824-1:2008 is a standard published by the International Organization for Standardization (ISO). Its full title is "Information technology - Abstract Syntax Notation One (ASN.1): Specification of basic notation - Part 1:". This standard covers: ISO/IEC 8824-1:2008 specifies a standard notation called Abstract Syntax Notation One (ASN.1) that is used for the definition of data types, values, and constraints on data types. ISO/IEC 8824-1:2008 defines a number of simple types, with their tags, and specifies a notation for referencing these types and for specifying values of these types; defines mechanisms for constructing new types from more basic types, and specifies a notation for defining such types and assigning them tags, and for specifying values of these types; defines character sets (by reference to other ITU-T Recommendations and International Standards) for use within ASN.1. ISO/IEC 8824-1:2008 can be applied whenever it is necessary to define the abstract syntax of information. ISO/IEC 8824-1:2008 is referenced by other standards which define encoding rules for the ASN.1 types.
ISO/IEC 8824-1:2008 specifies a standard notation called Abstract Syntax Notation One (ASN.1) that is used for the definition of data types, values, and constraints on data types. ISO/IEC 8824-1:2008 defines a number of simple types, with their tags, and specifies a notation for referencing these types and for specifying values of these types; defines mechanisms for constructing new types from more basic types, and specifies a notation for defining such types and assigning them tags, and for specifying values of these types; defines character sets (by reference to other ITU-T Recommendations and International Standards) for use within ASN.1. ISO/IEC 8824-1:2008 can be applied whenever it is necessary to define the abstract syntax of information. ISO/IEC 8824-1:2008 is referenced by other standards which define encoding rules for the ASN.1 types.
ISO/IEC 8824-1:2008 is classified under the following ICS (International Classification for Standards) categories: 35.100.60 - Presentation layer. The ICS classification helps identify the subject area and facilitates finding related standards.
ISO/IEC 8824-1:2008 has the following relationships with other standards: It is inter standard links to ISO/IEC 8824-1:2015, ISO/IEC 8824-1:2002/Amd 2:2005, ISO/IEC 8824-1:2002/Amd 4:2008, ISO/IEC 8824-1:2002, ISO/IEC 8824-1:2002/Amd 1:2004, ISO/IEC 8824-1:2002/Amd 3:2006. Understanding these relationships helps ensure you are using the most current and applicable version of the standard.
You can purchase ISO/IEC 8824-1:2008 directly from iTeh Standards. The document is available in PDF format and is delivered instantly after payment. Add the standard to your cart and complete the secure checkout process. iTeh Standards is an authorized distributor of ISO standards.
Standards Content (Sample)
INTERNATIONAL ISO/IEC
STANDARD 8824-1
Fourth edition
2008-12-15
Information technology — Abstract
Syntax Notation One (ASN.1):
Specification of basic notation
Technologies de l'information — Notation de syntaxe abstraite numéro
un (ASN.1): Spécification de la notation de base
Reference number
©
ISO/IEC 2008
PDF disclaimer
This PDF file may contain embedded typefaces. In accordance with Adobe's licensing policy, this file may be printed or viewed but
shall not be edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In
downloading this file, parties accept therein the responsibility of not infringing Adobe's licensing policy. The ISO Central Secretariat
accepts no liability in this area.
Adobe is a trademark of Adobe Systems Incorporated.
Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation
parameters were optimized for printing. Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In
the unlikely event that a problem relating to it is found, please inform the Central Secretariat at the address given below.
© ISO/IEC 2008
All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means,
electronic or mechanical, including photocopying and microfilm, without permission in writing from either ISO at the address below or
ISO's member body in the country of the requester.
ISO copyright office
Case postale 56 CH-1211 Geneva 20
Tel. + 41 22 749 01 11
Fax + 41 22 749 09 47
E-mail copyright@iso.org
Web www.iso.org
Published by ISO in 2009
Published in Switzerland
ii © ISO/IEC 2008 – All rights reserved
CONTENTS
Page
Foreword .viii
Introduction.ix
1 Scope. 1
2 Normative references . 1
2.1 Identical Recommendations | International Standards . 1
2.2 Additional references . 2
3 Definitions. 2
3.1 International Object Identifier tree specification .2
3.2 Information object specification . 2
3.3 Constraint specification. 3
3.4 Parameterization of ASN.1 specification . 3
3.5 Structure for identification of organizations . 3
3.6 Universal Multiple-Octet Coded Character Set (UCS) . 3
3.7 Representation of dates and times. 3
3.8 Additional definitions . 4
4 Abbreviations . 9
5 Notation. 10
5.1 General. 10
5.2 Productions . 10
5.3 The alternative collections . 10
5.4 Non-spacing indicator. 10
5.5 Example of a production . 10
5.6 Layout . 11
5.7 Recursion . 11
5.8 References to permitted sequences of lexical items. 11
5.9 References to a lexical item . 11
5.10 Short-hand notations . 11
5.11 Value references and the typing of values . 12
6 The ASN.1 model of type extension . 12
7 Extensibility requirements on encoding rules . 13
8 Tags. 13
9 Encoding instructions. 14
10 Use of the ASN.1 notation . 15
11 The ASN.1 character set. 15
12 ASN.1 lexical items. 17
12.1 General rules . 17
12.2 Type references. 17
12.3 Identifiers . 17
12.4 Value references. 18
12.5 Module references. 18
12.6 Comments . 18
12.7 Empty lexical item . 18
12.8 Numbers. 18
12.9 Real numbers. 18
12.10 Binary strings . 19
12.11 XML binary string item . 19
12.12 Hexadecimal strings. 19
© ISO/IEC 2008 – All rights reserved iii
12.13 XML hexadecimal string item. 19
12.14 Character strings . 19
12.15 XML character string item. 20
12.16 The simple character string lexical item. 22
12.17 Time value character strings . 22
12.18 XML time value character string item .22
12.19 The property and setting names lexical item. 22
12.20 Assignment lexical item. 22
12.21 Range separator. 22
12.22 Ellipsis. 23
12.23 Left version brackets. 23
12.24 Right version brackets. 23
12.25 Encoding references. 23
12.26 Integer-valued Unicode labels. 23
12.27 Non-integer Unicode labels . 23
12.28 XML end tag start item . 23
12.29 XML single tag end item. 24
12.30 XML boolean true item. 24
12.31 XML boolean extended-true item . 24
12.32 XML boolean false item. 24
12.33 XML boolean extended-false item. 24
12.34 XML real not-a-number item . 24
12.35 XML real infinity item. 25
12.36 XML tag names for ASN.1 types. 25
12.37 Single character lexical items. 26
12.38 Reserved words. 27
13 Module definition. 27
14 Referencing type and value definitions . 31
15 Notation to support references to ASN.1 components . 33
16 Assigning types and values . 34
17 Definition of types and values. 35
18 Notation for the boolean type. 38
19 Notation for the integer type . 39
20 Notation for the enumerated type. 40
21 Notation for the real type. 41
22 Notation for the bitstring type . 42
23 Notation for the octetstring type. 44
24 Notation for the null type . 45
25 Notation for sequence types . 45
26 Notation for sequence-of types. 48
27 Notation for set types . 51
28 Notation for set-of types. 52
29 Notation for choice types . 52
30 Notation for selection types. 54
31 Notation for prefixed types . 55
31.1 General. 55
31.2 The tagged type. 55
31.3 The encoding prefixed type. 56
32 Notation for the object identifier type . 57
33 Notation for the relative object identifier type . 58
iv © ISO/IEC 2008 – All rights reserved
34 Notation for the OID internationalized resource identifier type.60
35 Notation for the relative OID internationalized resource identifier type. 60
36 Notation for the embedded-pdv type. 61
37 Notation for the external type. 63
38 The time type. 64
38.1 General. 64
38.2 Time properties and settings of time abstract values . 64
38.3 Basic value notation and XML value notation for time abstract values with specified property
settings . 68
38.4 Useful time types. 72
39 The character string types. 74
40 Notation for character string types . 74
41 Definition of restricted character string types . 75
42 Naming characters, collections and property category sets. 79
43 Canonical order of characters. 82
44 Definition of unrestricted character string types . 83
45 Notation for types defined in clauses 46 to 48 . 84
46 Generalized time. 84
47 Universal time . 86
48 The object descriptor type . 86
49 Constrained types . 87
50 Element set specification. 88
51 Subtype elements. 90
51.1 General. 90
51.2 Single value. 92
51.3 Contained subtype. 92
51.4 Value range . 92
51.5 Size constraint. 92
51.6 Type constraint. 93
51.7 Permitted alphabet. 93
51.8 Inner subtyping . 93
51.9 Pattern constraint. 95
51.10 Property settings. 95
51.11 Duration range . 96
51.12 Time point range . 96
51.13 Recurrence range. 97
52 The extension marker . 97
53 The exception identifier. 99
54 Encoding control sections . 99
Annex A ASN.1 regular expressions. 101
A.1 Definition . 101
A.2 Metacharacters . 101
Annex B The defined time types . 105
B.1 General. 105
B.2 The ASN.1 defined time types module . 105
Annex C Rules for type and value Compatibility. 110
C.1 The need for the value mapping concept (tutorial introduction). 110
C.2 Value mappings. 112
C.3 Identical type definitions. 113
C.4 Specification of value mappings . 115
© ISO/IEC 2008 – All rights reserved v
C.5 Additional value mappings defined for the character string types. 115
C.6 Specific type and value compatibility requirements . 116
C.7 Examples. 117
Annex D Assigned object identifier and OID internationalized resource identifier values. 119
D.1 Values assigned in this Recommendation | International Standard. 119
D.2 Object identifiers in the ASN.1 and encoding rules standards. 119
Annex E Encoding references . 121
Annex F Assignment and use of arcs in the International Object Identifier tree. 122
F.1 General. 122
F.2 Use of the International Object Identifier tree by the object identifier (OBJECT IDENTIFIER)
type . 122
F.3 Use of the International Object Identifier tree by the OID internationalized resource identifier
(OID-IRI) type .122
Annex G Examples and hints . 123
G.1 Example of a personnel record. 123
G.1.1 Informal description of Personnel Record . 123
G.1.2 ASN.1 description of the record structure. 123
G.1.3 ASN.1 description of a record value. 124
G.2 Guidelines for use of the notation . 124
G.2.1 Boolean . 125
G.2.2 Integer . 125
G.2.3 Enumerated . 125
G.2.4 Real . 126
G.2.5 Bit string. 127
G.2.6 Octet string. 128
G.2.7 UniversalString, BMPString and UTF8String . 129
G.2.8 CHARACTER STRING . 129
G.2.9 Null . 130
G.2.10 Sequence and sequence-of . 130
G.2.11 Set and set-of. 132
G.2.12 Tagged.134
G.2.13 Choice . 135
G.2.14 Selection type. 137
G.2.16 Embedded-pdv . 138
G.2.17 External . 138
G.2.18 Instance-of. 138
G.2.19 Object identifier . 139
G.2.20 OID internationalized resource identifier. 139
G.2.21 Relative object identifier. 139
G.3 Value notation and property settings (TIME type and useful time types). 140
G.3.1 Date. 140
G.3.2 Time of day . 140
G.3.3 Date and time of day . 141
G.3.4 Time interval . 141
G.3.5 Recurring interval . 142
G.4 Identifying abstract syntaxes. 142
G.5 Subtypes. 143
Annex H Tutorial annex on ASN.1 character strings. 147
H.1 Character string support in ASN.1. 147
H.2 The UniversalString, UTF8String and BMPString types. 147
H.3 On ISO/IEC 10646 conformance requirements . 148
H.4 Recommendations for ASN.1 users on ISO/IEC 10646 conformance . 148
H.5 Adopted subsets as parameters of the abstract syntax. 149
H.6 The CHARACTER STRING type . 149
Annex I Tutorial annex on the ASN.1 model of type extension. 150
I.1 Overview. 150
vi © ISO/IEC 2008 – All rights reserved
I.2 Meaning of version numbers. 151
I.3 Requirements on encoding rules . 152
I.4 Combination of (possibly extensible) constraints . 152
I.4.1 Model .152
I.4.2 Serial application of constraints. 152
I.4.3 Use of set arithmetic. 153
I.4.4 Use of the Contained Subtype notation. 154
Annex J Tutorial annex on the TIME type . 155
J.1 The collections of ASN.1 types for times and dates . 155
J.2 ISO 8601 key concepts . 155
J.3 Abstract values of the TIME type. 156
J.4 Time properties of the time abstract values. 157
J.5 Value notation. 157
J.6 Use of the ASN.1 subtype notation. 158
J.7 The property settings subtype notation . 158
Annex K Analyzing TIME type value notation . 160
K.1 General. 160
K.2 Analyzing the full string . 160
K.3 Analysis of a string containing an interval. 161
K.4 Analysis of a string containing a date . 161
K.5 Analysis of a string containing a year . 162
K.6 Analysis of a string containing a century.162
K.7 Analysis of a string containing a time. 162
K.8 Analysis of a string containing a simple time . 163
Annex L Summary of the ASN.1 notation . 164
© ISO/IEC 2008 – All rights reserved vii
Foreword
ISO (the International Organization for Standardization) and IEC (the International Electrotechnical
Commission) form the specialized system for worldwide standardization. National bodies that are members of
ISO or IEC participate in the development of International Standards through technical committees
established by the respective organization to deal with particular fields of technical activity. ISO and IEC
technical committees collaborate in fields of mutual interest. Other international organizations, governmental
and non-governmental, in liaison with ISO and IEC, also take part in the work. In the field of information
technology, ISO and IEC have established a joint technical committee, ISO/IEC JTC 1.
International Standards are drafted in accordance with the rules given in the ISO/IEC Directives, Part 2.
The main task of the joint technical committee is to prepare International Standards. Draft International
Standards adopted by the joint technical committee are circulated to national bodies for voting. Publication as
an International Standard requires approval by at least 75 % of the national bodies casting a vote.
Attention is drawn to the possibility that some of the elements of this document may be the subject of patent
rights. ISO and IEC shall not be held responsible for identifying any or all such patent rights.
ISO/IEC 8824-1 was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology,
Subcommittee SC 6, Telecommunications and information exchange between systems, in collaboration with
ITU-T. The identical text is published as ITU-T Rec. X.680 (11/2008).
This fourth edition cancels and replaces the third edition (ISO/IEC 8824-1:2002), which has been
technically revised. It also incorporates the Amendments ISO/IEC 8824-1:2002/Amd.1:2004,
ISO/IEC 8824-1:2002/Amd.2:2005, ISO/IEC 8824-1:2002/Amd.3:2006 and ISO/IEC 8824-1:2002/Amd.4:2008,
and the Technical Corrigendum ISO/IEC 8824-1:2002/Cor.1:2006.
ISO/IEC 8824 consists of the following parts, under the general title Information technology — Abstract Syntax
Notation One (ASN.1):
— Part 1: Specification of basic notation
— Part 2: Information object specification
— Part 3: Constraint specification
— Part 4: Parameterization of ASN.1 specifications
viii © ISO/IEC 2008 – All rights reserved
Introduction
This Recommendation | International Standard presents a standard notation for the definition of data types and values.
A data type (or type for short) is a category of information (for example, numeric, textual, still image or video
information). A data value (or value for short) is an instance of such a type. This Recommendation | International
Standard defines several basic types and their corresponding values, and rules for combining them into more complex
types and values.
In some protocol architectures, each message is specified as the binary value of a sequence of octets. However,
standards-writers need to define quite complex data types to carry their messages, without concern for their binary
representation. In order to specify these data types, they require a notation that does not necessarily determine the
representation of each value. ASN.1 is such a notation. This notation is supplemented by the specification of one or
more algorithms called encoding rules that determine the value of the octets that carry the application semantics (called
the transfer syntax). ITU-T Rec. X.690 | ISO/IEC 8825-1, ITU-T Rec. X.691 | ISO/IEC 8825-2 and ITU-T Rec. X.693
| ISO/IEC 8825-4 specify three families of standardized encoding rules, called Basic Encoding Rules (BER), Packed
Encoding Rules (PER), and XML Encoding Rules (XER).
Some users wish to redefine their legacy protocols using ASN.1, but cannot use standardized encoding rules because
they need to retain their existing binary representations. Other users wish to have more complete control over the exact
layout of the bits on the wire (the transfer syntax). These requirements are addressed by ITU-T Rec. X.692 |
ISO/IEC 8825-3 which specifies an Encoding Control Notation (ECN) for ASN.1. ECN enables designers to formally
specify the abstract syntax of a protocol using ASN.1, but to then (if they so wish) take complete or partial control of
the bits on the wire by writing an accompanying ECN specification (which may reference standardized Encoding Rules
for some parts of the encoding).
A very general technique for defining a complicated type at the abstract level is to define a small number of simple
types by defining all possible values of the simple types, then combining these simple types in various ways. Some of
the ways of defining new types are as follows:
a) given an (ordered) list of existing types, a value can be formed as an (ordered) sequence of values, one
from each of the existing types; the collection of all possible values obtained in this way is a new type (if
the existing types in the list are all distinct, this mechanism can be extended to allow omission of some
values from the list);
b) given an unordered set of (distinct) existing types, a value can be formed as an (unordered) set of values,
one from each of the existing types; the collection of all possible unordered sets of values obtained in
this way is a new type (the mechanism can again be extended to allow omission of some values);
c) given a single existing type, a value can be formed as an (ordered) list or (unordered) set of zero, one or
more values of the existing type; the collection of all possible lists or sets of values obtained in this way
is a new type;
d) given a list of (distinct) types, a value can be chosen from any one of them; the set of all possible values
obtained in this way is a new type;
e) given a type, a new type can be formed as a subset of it by using some structure or order relationship
among the values.
An important aspect of combining types in this way is that encoding rules should recognize the combining constructs,
providing unambiguous encodings of the collection of values of the basic types. Thus, every basic type defined using
the notation specified in this Recommendation | International Standard is assigned a tag to aid in the unambiguous
encoding of values.
Tags are mainly intended for machine use, and are not essential for the human notation defined in this Recommendation
| International Standard. Where, however, it is necessary to require that certain types be distinct, this is expressed by
requiring that they have distinct tags. The allocation of tags is therefore an important part of the use of this notation, but
(since 1994) it is possible to specify the automatic allocation of tags.
NOTE 1 – Within this Recommendation | International Standard, tag values are assigned to all simple types and construction
mechanisms. The restrictions placed on the use of the notation ensure that tags can be used in transfer for unambiguous
identification of values.
It is also possible to assign encoding instructions to a type in order to affect the encoding of that type. This can be done
either by a type prefix placed before a type definition or use of a type reference, or by an encoding control section
placed at the end of an ASN.1 module. The generic syntax of type prefixes and encoding control sections is specified in
this Recommendation | International Standard, and includes an encoding reference to identify the encoding rules that
© ISO/IEC 2008 – All rights reserved ix
are modified by the encoding instruction. The semantics and detailed syntax of encoding instructions are specified in
the encoding rules Recommendation | International Standard identified by the encoding reference.
An ASN.1 specification will initially be produced with a set of fully defined ASN.1 types. At a later stage, however, it
may be necessary to change those types (usually by the addition of extra components in a sequence or set type). If this
is to be possible in such a way that implementations using the old type definitions can interwork with implementations
using the new type definitions in a defined way, encoding rules need to provide appropriate support. The ASN.1
notation supports the inclusion of an extension marker on a number of types. This signals to encoding rules the
intention of the designer that this type is one of a series of related types (i.e., versions of the same initial type) called an
extension series, and that the encoding rules are required to enable information transfer between implementations using
different types that are related by being part of the same extension series.
Clauses 11 to 33 (inclusive) define the simple types supported by ASN.1, and specify the notation to be used for
referencing simple types and for defining new types using them. Clauses 11 to 33 also specify notations
...








Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.
Loading comments...