1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
-- Creator: ASN.1 Editor (http://asneditor.sourceforge.net)
-- Author: ClemensGantert
-- Created: Tue Aug 11 11:40:28 CEST 2015
ASN-Module DEFINITIONS AUTOMATIC TAGS ::= BEGIN
-- imports and exports
-- EXPORTS ALL;
-- ##############################################################################################
-- #
-- # UIC barcode header - first draft
-- #
-- ##############################################################################################
-- ##############################################################################################
-- #
-- # Naming and encoding conventions
-- #
-- # Elements included as String and as Numeric values:
-- # Some elements are included in different formats to reduce the data size.
-- # These elements must be included only once.
-- # These elements are named with the same name and appendix
-- # Num (numeric values)
-- # IA5 (String values according to ASN IA5String (7Bit))
-- #
-- # RICS codes must be used to encode companies (issuer, product owner, ...) where available
-- # other codes are possible based on bilateral agreements
-- # the format is kept more flexible to cover upcoming extensions of the RICS code by ERA
-- #
-- # Stations can be coded using the UIC and upcoming ERA code lists. Proprietary codes are
-- # possible based on bilateral agreements. Format: 1..9999999 or alphanumeric without
-- # special character (IA5String)
-- #
-- #
-- # ! INTEGERS must not exceed the value of 9,223,372,036,854,775,807 (64 bit) even in case
-- # ! they are unrestricted!!!
-- # !
-- # ! Some elements like ReferenceNum or cardIdNum are defined as an unrestricted integer.
-- # ! Unlike other numerical values the cardIdNum and referenceNum can be larger than a usual 32 bit Integer
-- # ! Some ASN.1 implementation tools are limited to 32 bit integers which is too small.
-- # ! Please ensure to use a tool capable of dealing with larger numbers.
-- #
-- # BOOLEAN is always non optional
-- #
-- # Encoding of time:
-- # time is encoded as the number of minutes of the day 0 = 00:00, 1440 = 24:00,
-- # time data elements end with "time" in their name
-- #
-- # Encoding of date:
-- # .........................................................................................................
-- # The issuing date is given in UTC, but some other date values are given in local time where the exact time zone is not known.
-- #
-- #
-- #
-- # ASN.1 Extensions:
-- #
-- # The specification makes use of extension (",...").
-- # These extesions might be defined in future versions of the UIC specification
-- # Implementations must support the extension feature of ASN.1, at least they must be able to ignore extensions while decoding the data
-- # ASN.1 extensions will be defined by UIC. It is not allowed to define bilateral extensions.
-- #
-- # Bilateral Extensions:
-- # Bilateral extensions can be included in the data element "ExtensionData".
-- #
-- #
-- #
-- #########################################################################################
-- ############################################################################################
-- type assignments
-- #########################################################################################
-- the basic entry point of the data structure
-- the data include:
-- -issuer informations
-- -the details of the transport document
-- -informations required for the control process
-- -informations on the travelers independent from the transport document
-- -proprietary extensions
--
-- ##########################################################################################
UicBarcodeHeader ::= SEQUENCE {
-- format type
format IA5String,
-- "UIC" = UIC ticket
version Integer (1..16),
-- provider of the signature (RICS code)
securityProviderNum INTEGER (1..32000) OPTIONAL,
securityProviderIA5 IA5String OPTIONAL,
staticData SEQUENCE OF DataType,
staticSignature SignatureType OPTIONAL,
-- additional dynamic data i.e. phone number, IMEI, timestamp , .... --> To be defined separately
dynamicDataFormat IA5String OPTIONAL,
dynamicData OCTET STRING OPTIONAL,
dynamicPublicKey OCTET STRING OPTIONAL,
dynamicSignature SignatureType OPTIONAL
-- proprietary data defined bilaterally
extension SEQUENCE OF ExtensionData OPTIONAL
,...
}
DataType ::= SEQUENCE {
staticDataFormat IA5String DEFAULT "FCB1",
-- FCB1 FCB version 1
-- 1080XYZ
staticData OCTET STRING
}
SignatureType ::= SEQUENCE {
signingAlg IA5String,
keyId IA5String (SIZE(1..5)),
signature OCTET STRING,
}
-- ###########################################################################################
-- generic non standard extension element
-- the generic non - standard element contains:
-- - an extension id to distinguish different extensions
-- - the extension data as binary data
-- proprietary extensions are by definition proprietary. This standard provides
-- the means to identify these extensions
-- within the data and to skip these data.
-- the evaluation of these data and the unique identification of the extensions
-- via the extension id is in the
-- responsibility of the railways which use these extensions.
-- ###########################################################################################
ExtensionData ::= SEQUENCE {
extensionId IA5String,
extensionData OCTET STRING
}
END
|