ISO/IEC 8825:1990
(Main)Information technology — Open Systems Interconnection — Specification of Basic Encoding Rules for Abstract Syntax Notation One (ASN.1)
Information technology — Open Systems Interconnection — Specification of Basic Encoding Rules for Abstract Syntax Notation One (ASN.1)
Specifies a set of basic encoding rules that may be used to derive the specification of a transfer syntax for values of types defined using the notation specified in ISO/IEC 8824. These basic encoding rules are used at the time of communication (by the presentation service provider when required by a presentation context). Annex A gives an example of encodings, Annex B indicates the assignment of object identifier values.
Technologies de l'information — Interconnexion de systèmes ouverts — Spécification de règles de base pour coder la notation de syntaxe abstraite numéro UNE (ASN.1)
General Information
Relations
Standards Content (Sample)
INTERNATIONAL
ISO/IEC
STANDARD
8825
Second edition
19904245
Information technology - Open Systems
Interconnection
- Specification of Basic
Encoding Rules for Abstract Syntax Notation
One (ASN.l)
Technologies de /‘Information
- lnterconnexion de syst&mes ouverts -
Spkcification de rkgles de base pour coder Ia notation de syntaxe abstraite numtko
UNE (ASN. 7)
Reference number
ISO/IEC 8825 : 1990 (E)
---------------------- Page: 1 ----------------------
ISO/IEC 8825:1990(E)
Contents
.
Scope .
Normative references 1
...................................................
.
Definitions .
.2
Abbreviations and notation .
2
4.1 Abbreviations .
2
4.2 Notation .
.
5 Conformance .
.2
6 General rules for encoding .
2
6.1 Structure of an encoding .
6.2 Identifier octets . 2
6.3 Lengthoctets 3
.................................
6.4 Contents octets . . 4
6.5 End-of-contents octets : : : : : : : : : : : : . 4
7 Encoding of a boolean value . .5
Encoding of an integer value . .5
8
Encoding of an enumerated value . .5
9
Encoding of a real value .
10 .5
.6
Encoding of a bitstring value .
11
12 Encoding of an octetstring value . .7
13 Encoding of a null value . .7
14 Encoding of a sequence value . .7
15 Encoding of a sequence-of value . 7
16 Encoding of a set value .
.7
17 Encoding of a set-of value .8
..............................................
0 ISO/IEC 1990
All rights reserved. NO part of this publication may be reproduced or utilized in any form or by any
means, electronie or mechanical, including photocopying and microfilm, without Permission in
writing from the publisher.
ISO/IEC Copyright Office l Case postale 56 l CH-1211 Geneve 20 l Switzerland
Printed in Switzerland
ii
---------------------- Page: 2 ----------------------
ISO/IEC 8825 : 1990(E)
18 Encoding of a choice value
............................................. .8
19 Encoding of a selection value
........................................... .8
20 Encoding of a tagged value
............................................. .8
21 EncodingofavalueoftheANYtype. .8
....................................
22 Encoding of an Object identifier value
..................................... .8
23 Encoding for values of the Character string types .9
............................
24 Encoding for values of the ASN.1 useful types
.............................. .9
25 Use in transfer Syntax definition
.......................................... 10
Annexes
A Exampleofencodings .12
...............................................
A.l ASN.l description of the record structure 12
.................
A.2 ASN.l description of a record value 12
....................
A.3 Representation of this record value 12
....................
B Assignment of Object identifier values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
c Illustration of real value encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
---------------------- Page: 3 ----------------------
ISO/IEC 8825 : 1990(E)
Foreword
ISO (the International Organization for Standardization) and IEC (the International
Electrotechnical Commission) form the specialized System for worldwide standardiz-
ation. 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. 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.
International Standard ISO/IEC 8825 was prepared by Joint Technical Committee
ISO/IEC JTC 1, Information technology.
This second edition cancels and replaces the first edition (ISO 8825 : 1987), which has
been technically revised.
Annexes A, B and C are for information only.
iv
---------------------- Page: 4 ----------------------
ISO/IEC 8825 : 1990(E)
Introduction
ISO/IEC 8824 (Specification of Abstract Syntax Notation One) specifies a notation for
the definition of abstract syntaxes, enabling application layer Standards to define the
types of information they need to transfer using the presentation Service. lt also
specifies a notation for the specification of values of a defined type.
This International Standard defines a set of encoding rules that may be applied to
values of types defined using the notation specified in ISO/IEC 8824. Application of
these encoding rules produces a transfer Syntax for such values. lt is implicit in the
specification of these encoding rules that they are also to be used for decoding.
There may be more than one set of encoding rules that tan be applied to values of
types that are defined using the notation of ISO/IEC 8824. This International Standard
defines one set of encoding rules, called basic encoding rules.
This International Standard is technically aligned with CCITT Recommendation
X.209(1988).
Annex A gives examples of the application of the encoding rules. lt is not part of this
International Standard.
Annex B summarizes th e assignment of Object identif ier * values made in this lnter-
national Standard and is not part of th is International Sta ndard.
Annex C gives examples of applying the rules encoding reals. lt is not part of this
for
International Standard.
---------------------- Page: 5 ----------------------
This page intentionally left blank
---------------------- Page: 6 ----------------------
INTERNATIONAL STANDARD lSO/IEC 8825 : 1990 (E)
Information technology - Open Systems
lnterconnection - Specification of Basic Encoding
Rules for Abstract Syntax Notation One (ASN.1)
1 Scope 3 Definitions
This International Standard specifies a set of basic encoding For the purposes of this International Standard the definitions
rules that may be used to derive the specification of a transfer of ISO 7498, of ISOAEC 8824 and the following definitions
Syntax for values of types defined using the notation specified
aPPlYm
in ISO/IEC 8824. These basic encoding rules are also to be
applied for decoding such a transfer Syntax in Order to identify 3.1 dynamic conformance: A Statement of the require-
the data values being transferred. ment for an implementation to adhere to the behaviour pres-
cribed by this International Standard in an instance of
These basic encoding rules are used at the time of communi- communication.
cation (by the presentation Service provider when required
by a presentation context). 3.2 static conformance: A Statement of the requirement
for support by an implementation of a valid set of features
from among those defined by this International Standard.
2 Normative references
3.3 data value: Information specified as the value of a
type; the type and the value are defined using ASN.1.
The following Standards contain provisions which, through
reference in this text, constitute provisions of this Interna-
3.4. encoding (of a data value): The complete sequence
tional Standard. At the time of publication, the editions indi-
of octets used to represent the data value.
cated were valid. All Standards are subject to revision, and
Parties to agreements based on this International Standard
NOTE - Some CCITT Recommendations use the term “data ele-
are encouraged to investigate the possibility of applying the
ment” for this sequence of octets, but the term is not used in this
most recent editions of the Standards indicated below. Mem-
International Standard, as other International Standards use it to
bers of IEC and ISO maintain registers of currently valid In-
mean “data value”.
ternational Standards
3.5 identifier octets: Part of a data value encoding
ISO 2022: 1986, Information processing - ISO 7-bit and 8-
bit coded Character sets - Code extension techniques.
which is used to identify the type of the value.
ISO 2375: 1985, Data processing - Procedure for registra- Part of a data value encoding follow-
3.6 length octets:
tion of escape sequences.
ing the identifier octets which is used to determine the end
of the encoding.
ISO 6093: 1985, Information processing - Representation
of numerical values in Character strings for information inter-
3.7 end-of-contents octets: Part of a data value encod-
Change.
ing, occurring at its end, which is used to determine the end
of the encoding.
ISO 7498:1984, Information processing Systems - Open
Systems lnterconnection - Basic Reference Model. NOTE - Not all encodings require end-of-contentsoctets.
Information processing Systems - Open 3.8 contents octets: That part of a data value encoding
ISO 8823: 1988,
Systems lnterconection - Connection-oriented presentation which represents a particular value, to distinguish it from
other values of the same type.
protocol specification.
3.9 primitive encoding: A data value encoding in which
ISO/IEC 8824:1990, Information technology - Open
the contents octets directly represent the value.
Systems In terconnec tion - Specifica tion of Abstrac t Syntax
Notation One (ASN. 7).
3.10 constructed encoding: A data value encoding in
which the contents octets are the complete encoding of one
CCITT X.209 (1988), Specification of Basic Encoding
or more other data values.
Rufes for Abstract Syntax Notation One (ASN. 1).
1
---------------------- Page: 7 ----------------------
ISO/IEC 8825 : 1990(E)
IDENTIFIER
LENGTH OCTETS CONTENTS OCTETS
OCTETS
i
I
The number of octets
in the contents octets
(see 6.3.2)
Figure 1 - Structure of an encoding
IDENTIFIER END OF
LENGTH OCTETS CONTENTS OCTETS
OCTETS CONTENTS OCTETS
Indicates that the Indicates that there
contents octets are
are no further
terminated by end of
encodings in the
contents octets
contents octet
(see 6.3.4)
Figure 2 - An alternative constructed encoding
6.3 Length octets
Table 1 - Encoding of class of tag
6.3.1 Two forms of length octets are specified. These are
a) the definite form (see 6.3.3); and
Class
b) the indefinite form (see 6.3.4).
6.3.2 A sender shall Universal 0 0
Application 0 1
use the definite form (6.3.3) if the encoding is primi-
a)
tive;
1 0
b) use either the definite form (6.3.3) or the indefinite
1 1
form (6.3.4), a sender’s Option, if the encoding is con-
structed and all immediately available;
6.3.3.1 In the short form, the length octets shall consist of
c) use the indefinite form (6.3.4) if the encoding is con-
a Single octet in which bit 8 is zero and bits 7 to 1 encode the
structed and is not all immediately available.
number of octets in the contents octets (which may be Zero),
as an unsigned binary integer with bit 7 as the most signifi-
6.3.3 For the definite form, the length octets shall consist
cant bit.
of one or more octets, and shall represent the number of oc-
tets in the contents octets using either the short form (6.3.3.1)
EXAMPLE
or the long form (6.3.3.2) as a sender’s Option.
L
= 38 tan be encoded as 001001102
NOTE - The shortform tan only be used if the number of octets in
the contents octets is less than or equal to 127.
---------------------- Page: 8 ----------------------
ISO/IEC 8825 : 1990(E)
Identifier Octet
BITS 8 7 6 5 4 3 2 1
NUMBER OF TAG
CIASS P/C
t
0 = PRIMITIVE
1 = CONSTRUCTED
Figure 3 - Identifier octet (low tag number)
+-, subsequent octets ,-b
leading octet 2nd octet last octet
1 -
CIASS P/C 11111
+
= number of tag
Figure 4 - Identifier octets (high tag number)
6.3.3.2 In the long form, the length octets shall consist of 6.3.4 For the indefinite form, the length octets indicate that
an initial octet and one or more subsequent octets. The in- the contents octets are terminated by end-of-contents octets
itial octet shall be encoded as follows: (see 6.5), and shall consist of a Single octet.
a) bit 8 shall be one; 6.3.4.1 The Single octet shall have bit 8 set to one, and bits
7 to 1 set to Zero.
b) bits 7 to 1 shall encode the number of subsequent
octets in the length octets, as an unsigned binary integer 6.3.4.2 If this form of length is used, then end-of-contents
with bit 7 as the most significant bit; octets (see 6.5) shall be present in the encoding following
the contents octets.
c) thevalue11111111~shallnotbeused
6.4 Contents octets
NOTE - This restriction is introduced for possiblefuture exten-
sion.
The contents octets shall consist of Zero, one or more octets,
and shall encode the data value as specified in subsequent
Bits 8 to 1 of the first subsequent octet, followed by bits 8 to
clauses.
1 of the second subsequent octet, followed in turn by bits 8
to 1 of each further octet up to and including the last sub-
NOTE - The contents octets depend on the type of the data value;
sequent octet, shall be the encoding of an unsigned binary
subsequent clauses follow the same sequence as the definition of
integer equal to the number of octets in the contents octets,
types in ASN.l.
with bit 8 of the first subsequent octet as the most significant
bit.
6.5 End-of-contents octets
EXAMPLE
The end-of-contents octets shall be present if the length is
encoded as specified in 6.3.4, otherwise they shall not be
L=201 tan be encoded as:
present.
100000012
110010012
The end-of-contents octets shall consist of two zero octets.
NOTE - In the long form, it is asender’s Option whether to use more
NOTE - The end-of-contents octets tan be considered as the en-
length octets than the minimum necessary.
coding of avalue whose tag is universal class, whose form is primi-
---------------------- Page: 9 ----------------------
ISO/IEC 8825 : 1990(E)
contents is ab-
tive, whose number of the tag is Zero, and whose
10 Encoding of a real value
sent, thus:
10.1 The encoding of a real value shall be primitive.
End-of-contents Length - Contents
Absent
0016 0016
10.2 If the real valu e is the value Zero, there shall be no
contents octets in the encoding.
7 Encoding of a boolean value
10.3 If the real value is non-Zero, then the base used for
the encoding shall be B’, Chosen by the sender. If B’ is 2, 8
7.1 The encoding of a boolean value shall be primitive. or 16, a binary encoding, specified in 10.5, shall be used. If
The contents octets shall consist of a Single octet. B’ is IO, a Character encoding, specified in 10.6, shall be
used.
7.2 If the boolean value is
NOTE - The form of storage, generation, or processing by Senders
and receivers, and the form used in the ASN.l value notation are
FALSE
all independent of the base used for transfer.
the octet shall be Zero.
10.4 Bit 8 of the first contents octet shall be set as follows:
If the boolean value is
a) if bit 8 = 1, then the binary encoding specified in
10.5 applies;
TRUE
= 0 and bit 7 = 0, then the decimal encod-
b) if bit 8
the octet shall have any non-Zero value, as a sender’s Option.
ing specified in 10.6 applies;
EXAMPLE - If of type BOOLEAN, the value TRUE tan be en-
1, then a “SpecialRealValue”
c) if bit 8 = 0 and bit 7 =
coded as:
(see ISO 8824) is encoded as specified in 10.7.
Boolean Length Contents
10.5 When binary encoding is used (bit 8 = l), then if the
0116 0116 FF16 mantissa, M is non-Zero, it shall be represented by a sign S,
a non- negative integer value N and a binary scaling factor
F, such that
8 Encoding of an integer value
M= S x N x zF,
8.1 The encoding of an integer value shall be primitive.
The contents octets shall consist of one or more octets. 0 s F <4,
8.2 If the contents octets of an integer value encoding con-
= +l or -1
S
sist of more than one octet, then the bits of the first octet and
bit 8 of the second octet
NOTE - ThisfreedomtochooseFisprovidedtoenableeasiergener-
ation of the transfer format by eliminating the need to align the im-
shall not all be ones; and
plied decimal Point of the mantissa with an octet boundary (see
a)
annex C). The existente of F does not noticeably complicate the
task of receivers.
b) shall not all be Zero.
10.51 Bit 7 of the first contents octets shall be 1 if S is -1
NOTE - These rules ensure that an integer value is always encoded
in the smallest possible number of octets.
and 0 otherwise.
8.3 The contents octets shall be a two’s complement bi- Bits 6 to 5 of the first contents octets shall encode
10.5.2
nary number equal to the integer value, and consisting of bits the value of the base B’ as follows:
8 to 1 of the first octet, followed by bits 8 to 1 of the second
octet, followed by bits 8 to 1 of each octet in turn up to and Bits 6 to 5 Base
including the last octet of the contents octets. 00 base 2
01 base 8
NOTE - The value of a two’s complement binary number is derived
IO base 16
by numbering the bits in the contents octets, starting with bit 1 of
Reserved for further
11
the last octet as bit zero and ending the numbering with bit 8 of the
editions of this
first octet. Esch bit is assigned a numerical value of 2N, where N
International Standard.
is its Position in the above numbering sequence. The value of the
two’s complement binary number is obtained by summing the nu-
10.5.3 Bits 4 to 3 of the first contents octet shall encode the
merical values assigned to each bit for those bits which are set to
value of the binary scaling factor F as an unsigned binary in-
one, excluding bit 8 of the first octet, and then reducing this value
teger.
by the numerical value assigned to bit 8 of the first octet if that bit
is set to one.
10.5.4 Bits 2 to 1 of the first contents octet shall encode the
format of the exponent as follows:
9 Encoding of an enumerated value
if bits 2 to 1 are 00, then the second contents octet
a)
encodes the value of the exponent as a two’s comple-
enumerated value shall be that of the in-
The encoding of an
ment binary number;
teger value with whi ch it is associated.
NOTE - lt is primitive.
---------------------- Page: 10 ----------------------
ISO/IEC 8825 : 1990(E)
b) if bits 2 to 1 are 01, then the second and third con-
11 Encoding of a bitstring value
tents octets encode the value of the exponent as a two’s
complement binary number;
11.1 The encoding of a bitstring value shall be either primi-
tive or constructed at the Option of the Sender.
c) if bits 2 to 1 are 10, then the second, third and fourth
contents octets encode the value of the exponent as a
NOTE - Where it is necessary to transfer patt of a bit strin g before
two’s complement binary number; the entire bitstring is available, the constructed encoding is used.
d) if bits 2 to 1 are 11, then the second contents octet
11.2 The contents octets for the primitive encoding shall
encodes the number of octets, X say, (as an unsigned
contain an initial octet followed by Zero, one or more sub-
binary number) used to encode the value of the expo-
sequent octets.
nent, and the third up to the (X plus 3)th (inclusive) con-
tents octets encode the value of the exponent as a two’s
11.2.1 The bits in the bitstring, commencing with the fit-st
complement binary number; the value of X shall be at
bit and proceeding to the trailing bit, shall be placed in bits
least one; the first nine bits of the transmitted exponent
8 to 1 of the first subsequent octet, followed by bits 8 to 1 of
shall not be all zeros or all ones.
the second subsequent octet, followed by bits 8 to 1 of each
octet in turn, followed by as many bits as are needed of the
10.55 Jhe remaining contents octets encode the value of
final subsequent octet, commencing with bit 8.
the integer N (see 10.5) as an unsigned binary number.
NOTE - The notation “first bit” and “trailing bit” is specified in ISO
NOTES
8824.
1 This encoding does not specify a “normalized” representation,
11.2.2 The initial octet shall encode, as an unsigned binary
there being a number of possible representations of each value
integer with bit 1 as the least significant bit, the number of un-
(except Zero). This Variation is a sender’s Option, and tan be used
used bits in the final subsequent octet. The number shall be
as a broad indication of precision.
in the range zero to seven.
the
11.2.3 If the bitstring is empty, there shall benos ubsequ ent
de-
octets, and the initial octet shall be Zero.
nex
11.3 The contents octets for the constructed encoding
10.6 When decimal encoding is used (bits 8 to 7 = 00), all shall consist of the complete encoding of Zero, one or more
the contents octets following the first contents octet form a
data values.
field, as the term is used in ISO 6093, of a length Chosen by
the Sender, and encoded according to ISO 6093. The choice NOTE - Esch such encoding includes identifier, length, and con-
tents octets, and may include end-of-contents octets if it is con-
of ISO 6093 number representation is specified by bits 6 to
structed.
1 of the first contents octet as follows:
11.3.1 Esch data value encoding in the contents octets
Bits 6 to 1 Number representation
shall be the encoding of a value of type BITSTRING.
00 0001 ISO 6093 NR1 form
00 0010 ISO 6093 NR2 form
NOTE - In particular, the tags in the contents octets are always
00 0011 ISO 6093 NR3 form
universal class, number 3.
The remaining values of bits 6 to 1 are reserved for to this In-
11.3.2 The bits in the bitstring value being encoded, com-
ternational Standard.
mencing with the first bit and proceeding to the trailing bit,
shall be placed in the first bit up to the trailing bit of the first
There shall be no use of scaling factors specified in accom-
data value encoded in the contents octets, followed by the
panying documentation (see ISO 6093).
first bit up to the trailing bit of the second data value encoded
in the contents octets, followed by the first bit up to the trail-
NOTES
ing bit of each data value in turn, followed by the first bit up
to the trailing bit of the last data value encoded in the con-
1 The recommendations in ISO 6093 concerning the use of at
least one digit to the left of the decimal mark are also recom- tents octets.
mended in this International Standard, but are not mandatory.
11.3.3 Esch data value encoded in the contents octets,
form (see ISO is a sender’s Option,
2 Use of the normalised 6093)
with the exception of the last, shall consist of a number of
and has no significance.
bits which is a multiple of eight.
10.7 When “SpecialRealValues” are to be encoded (bits 8
- Adatavalue encoded in the contents octets may be a zero-
NOTE
to 7 = Ol), there shall be only one contents octet, with values
length bitstring.
as follows:
11.3.4 Where a constructed encoding is used, there shall
Value is PLUS-INFINITY
01000000
be no significance placed on the boundary between the data
values encoded in the contents octets.
Value is MINUS-INFINITY
01000001
in the
11.35 The en coding of each data value encoded
All other values having bits 8 and 7 e lqual to 0 and 1 respec-
contents octets may be primitive or constructed.
tively are reserved for addenda to th is International Standard.
NOTE - lt is usually primitive.
EXAMPLE - If of type BIT STRING, the value
‘OA3B5F291CD’H tan be encoded as shown below. In this
example, the Bit String is represented as a primitive:
---------------------- Page: 11 ----------------------
ISO/IEC 8825 : 1990(E)
The contents octets shall not contain any octets.
13.2
BitString Length Contents
0‘tt)~B5F’l291CDo16
0316 0716
NOTE - The length octet iszero.
The value shown above tan also be encoded as shown
EXAMPLE - If of type NULL, the NULL tan be encoded as:
below. In this example, the Bit String is represented as a con-
structor:
Null
Length
0516 0016
BitString Length Contents
2316 8016
BitString Length Contents
14 Encoding of a sequence value
OOOA3B16
0316 0316
045~9lCDo16
0316 0516
14.1 The encoding of a sequence value shall be con-
EOC Length
structed.
0016
0016
14.2 Jhe contents octets shall consist of the complete en-
coding of one data value from each of the types listed in the
12 Encoding of an octetstring value
ASN.l definition of the sequence type, in the Order of their
appearance in the definition, unless the type was referenced
12.1 The encoding of an octetstring value shall be either with the keyword “OPTIONAL” or the keyword “DEFAULT”.
primitive or constructed at the Option of the Sender.
14.3 The encoding of a data value may, but need not, be
NOTE - Where it is necessary to transfer part of an octet string be-
present for a type which was referenced with the keyword
fore the entire octetstring is available, the constructed encoding is
“OPTIONAL” or the keyword “DEFAULT”. If present, it shall
used.
appear in the encoding at the Point corresponding to the ap-
pearance of the type in the ASN.l definition.
12.2 The primitive encoding contains Zero, one or more
contents octets equal in value to the octets in the data value!
EXAMPLE - If of type
in the Order they appear in the data value, and with the most
significant bit of an octet of the data value aligned with the
SEQUENCE {name IASString, ok BOOLEAN}
most significant bit of an octet of the contents octets.
the value
12.3 The contents octets for the constructed encoding
shall consist of the complete encoding of Zero, one or more
{name “Smith”, ok TRUE}
data values.
tan be encoded as:
NOTE - Esch such encoding includes identifier, length, and con-
tents octets, and may include end-of-contents octets if it is con-
structed.
Sequence Length Contents
3016 Oh6
12.3.1 Esch data value encoding in the contents octets
IASString Length Contents
shall be the encoding of a value of type octetstring.
“Smith”
1616 0516
Boolean Length Contents
NOTE - In particular, the tags in the contents octets are always
universal class, number 4. 0116 0116 FF16
12.3.2 The octets in the octetstring value being encoded,
commencing with the first octet and proceeding to the trail-
15 Encoding of a sequence-of val ue
ing octet, shall be placed in the first up to the trailing octet of
the first data value encoded in the contents octets, followed
15.1 The encoding of a sequence-of valuf shall be con-
by the first up to the trailing octet of the second data value
structed.
encoded in the contents octets, followed by the first up to the
trailing octet of each data value in turn, followed by the first
15.2 The contents octets shall consist of Zero, one or more
up to the trailing octet of the last data value encoded in the
complete encodings of data values from the type listed in the
contents octets.
ASN. 1 definition.
NOTE - Adatavalue encoded in the contents octets may be a zero
15.3 The Order of the encodings of the data values shall
length octet string.
be the same as the Order of the data values in the sequence-
of value to be encoded.
12.3.3 Where a constructed encoding is used, there shall
be no significance placed on the boundary between the data
values encoded in the contents octets.
16 Encoding of a set value
12.3.4 The encoding of each data value encoded in the
16.1 The encoding of a set value shall be constructed.
contents octets may be primitive or constructed.
NOTE - lt is usually primitive. 16.2 The contents octets shall consist of the complete en-
coding of a data value from each of the types listed in the
ASN.1 definition of the set type, in an Order Chosen by the
Sender, unless the type was referenced with the keyword
13 Encociing of a null value
“OPTIONAL” or the keyword “DEFAULT”.
13.1 The encoding of a null value shall be primitive.
7
---------------------- Page: 12 ----------------------
ISO/IEC 8825 : 1990(E)
a value of
16.3 The encodinq of a data value may, but need not, be
present for a type which was referenced with the keyword
“OPTIONAL” or the keyword “DEFAULT”. “Jones”
NOTE - The Order of datavalues in a set value is not significant, and
is encoded as follows:
places no constraints on the Order during transfer.
For Typel:
17 Encoding of a set-of value
VisibleString Length Contents
4A6F6E657316
Ul6 0516
The encoding of a set-of value shall be constructed.
17.1
For Type2:
17.2 The text of 15.2 applies.
[Application 31 Length Contents
17.3 The Order of data values need not be preserved by
the encoding and subsequent decoding. 4A6F6E657316
4316 0516
For Type3:
18 Encoding of a choice value
Length Contents
Pl
The encoding of a choice value shall be the same as the en-
AZ16 0716
coding of a value of the Chosen type.
[Application 31 Length Contents
NOTES
1 on For Type4:
The encoding may be primitive or constructed depending
the Chosen type.
[Application
...
Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.