ASN.1 structures specificities for ICAO¶
ICAO and eIDAS specify complex ASN.1 structures, or simply DER encoded data in Logical Data Structure. We define here JSON output format (with attributes name, type and content) for each file or structure.
Note
If a field is optional and missing in a structure defined in ICAO specifications, JSON corresponding key is absent.
Note
Output of some structures (for example SignedData
in EF.SOD file) are simplified or modified compared to their
definition.
Following files are parsed and returned in JSON format:
DG 1
DG 2
DG 3
DG 4
DG 5
DG 7
DG 11
DG 12
DG 14
DG 15
DG 16
EF.SOD
EF.COM
EF.CardSecurity
EF.CardAccess
ASN.1 structures¶
ASN.1 structures, when they are clearly defined in ICAO or eIDAS specifications, are returned in JSON according to ASN.1 and JSON conversion rules.
For instance, a PACEInfo
could be, in JSON:
{
protocol: "0.4.0.127.0.7.2.2.4.2.4",
version: 2,
parameterId: 16
}
Some ASN.1 structures defined in ICAO specifications are returned in JSON with some specificities. They are described in the following paragraphs.
Security Info¶
Following SecurityInfo
types are returned in JSON format:
PACEInfo
PACEDomainParameterInfo
ActiveAuthenticationInfo
ChipAuthenticationInfo
ChipAuthenticationPublicKeyInfo
ChipAuthenticationDomainParameterInfo
TerminalAuthenticationInfo
They could be present in files as EF.CardAccess, EF.CardSecurity, DG 14 and so on.
Other SecurityInfo
types are defined and returned as follows:
Field |
ASN.1 type |
---|---|
|
|
|
|
|
|
Algorithm Identifier¶
Algorithm identifier ASN.1 structure is considered as follows:
Field |
ASN.1 type |
---|---|
|
|
|
|
Subject Public Key Info¶
Subject public key info ASN.1 structure is considered as follows:
Field |
ASN.1 type |
---|---|
|
|
Data Group Hash¶
Data Group Hash ASN.1 structure is considered as follows:
Field |
ASN.1 type |
---|---|
|
|
|
|
LDS Version Info¶
LDS Version Info ASN.1 structure is considered as follows:
Field |
ASN.1 type |
---|---|
|
|
|
|
LDS Security Object¶
LDS Security Object ASN.1 structure is considered as follows:
Field |
ASN.1 type |
---|---|
|
|
|
|
|
|
|
|
Encapsulated Content Info¶
Encapsulated Content Info ASN.1 structure is considered as follows:
Field |
ASN.1 type |
---|---|
|
|
|
|
Note
EncapsulatedContentInfo
is completely parsed according to context, and is not returned as an ASN.1
OCTET STRING
.
Signed Data¶
Signed data ASN.1 structure is considered as follows:
Field |
ASN.1 type |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
ICAO files structure¶
ICAO files JSON format is described here.
EF.COM¶
EF.COM output JSON data is an object defined by:
Field |
Description |
Type |
|
---|---|---|---|
|
LDS version number |
Object (see below) |
|
|
version of the LDS |
Integer |
|
|
update level of the LDS |
Integer |
|
|
LDS version number |
Object (see below) |
|
|
major version of Unicode |
Integer |
|
|
minor version of Unicode |
Integer |
|
|
tag list of all present Data Groups |
Array of integers |
For instance, an EF.COM content value of (DER-encoded hexadecimal string):
60 19 5F 01 04 30 31 30 37 5F 36 06 30 34 30 30 30 30 5C 07 61 75 63 67 6B 6C 6E
will be, in JSON:
{
ldsVersionNumber: {
version: 1,
updateLevel: 7
},
unicodeVersionNumber: {
majorVersion: 4,
minorVersion: 0,
releaseLevel: 0
},
dataGroupTagList: [97, 117, 99, 103, 107, 108, 110]
}
EF.SOD¶
EF.SOD output JSON data is an object defined by:
Field |
Description |
Type |
|
---|---|---|---|
|
document security object |
Object (see below) |
|
|
signed data algorithm as an object identifier |
String |
|
|
signed data |
Object (see Signed Data) |
Note
eContent
contained in signedData
is, here, a LDSSecurityObject
ASN.1 structure (see LDS Security Object).
EF.CardAccess¶
EF.CardAccess output JSON data is an array of SecurityInfo
.
EF.CardSecurity¶
EF.CardSecurity output JSON data is an object defined by:
Field |
Description |
Type |
---|---|---|
|
signed data algorithm as an object identifier |
String |
|
signed data |
Object (see Signed Data) |
Note
eContent
contained in signedData
is, here, a SecurityInfos
ASN.1 structure.
Data Group 1¶
Returned JSON data is an object with strings value. Depending on Travel Document type, keys are defined below.
Travel Document type 1 type¶
Keys name for Travel Document type 1 are defined here:
key name |
name of data element (ICAO spec.) |
---|---|
|
Document code |
|
Issuing State or organization |
|
Document number (Nine most significant characters) |
|
Check digit — Document number or filler character (<) indicating document number exceeds nine characters |
|
Optional data and/or in the case of a Document Number exceeding 9 characters, least significant characters of document number plus document number check digit plus filler character |
|
Date of birth |
|
Check digit — Date of birth |
|
Sex |
|
Date of Expiry |
|
Check digit — Date of expiry |
|
Nationality |
|
Optional data |
|
Composite check digit |
|
Name of holder |
Travel Document type 2 type¶
Keys name for Travel Document type 2 are defined here:
key name |
name of data element (ICAO spec.) |
---|---|
|
Document code |
|
Issuing State or organization |
|
Name of holder |
|
Document number (Nine principal characters) |
|
Check digit |
|
Nationality |
|
Date of birth |
|
Check digit |
|
Sex |
|
Date of Expiry |
|
Check digit |
|
Optional data plus filler character |
|
Composite Check Digit - MRZ line 2 |
Travel Document type 3 type¶
Keys name for Travel Document type 3 are defined here:
key name |
name of data element (ICAO spec.) |
---|---|
|
Document code |
|
Issuing State or organization |
|
Name of holder |
|
Document number |
|
Check digit — Document number |
|
Nationality |
|
Date of birth |
|
Check digit — Date of birth |
|
Sex |
|
Date of Expiry |
|
Check digit — Date of expiry or valid until date |
|
Optional data plus filler character |
|
Check digit |
|
Composite check digit |
Data Group 2¶
DG 2 output JSON data is an object defined by:
Field |
Description |
Type |
---|---|---|
|
Biometric Information Template |
Array of Biometric Information Template Object (see Biometric Information Template) |
Biometric Information Template¶
Biometric Information Template JSON object is defined by:
Field |
Description |
Type |
|
---|---|---|---|
|
biometric header template |
Object (see below) |
|
|
ICAO header version (“0101”) |
String |
|
|
biometric type |
String |
|
|
biometric subtype |
String |
|
|
creation date and time |
String |
|
|
validity period (from through) |
String |
|
|
creator of the biometric reference data (PID) |
String |
|
|
format owner |
String |
|
|
format type |
String |
|
|
biometric data |
Hexadecimal string |
|
|
enciphered biometric data |
Hexadecimal string |
Note
All strings defined in Biometric Information Template JSON object are considered as ASN.1 Octet String type.
Note
As specified in ICAO specifications, if biometricData
is present, encipheredBiometricData
is absent and vice versa.
Data Group 3¶
DG 3 output JSON data is an object defined by:
Field |
Description |
Type |
---|---|---|
|
biometric information template |
Array of Biometric Information Template Object (see Biometric Information Template) |
|
issuer defined content |
Hexadecimal string |
Note
issuerDefinedContent
key is present only if biometricInformationTemplate
is an empty array.
Data Group 4¶
DG 4 output JSON data is same as DG 3, see above.
Data Group 5¶
DG 5 output JSON data is an array of hexadecimal strings, each element representing a displayed portrait.
Data Group 7¶
DG 7 output JSON data is an array of hexadecimal strings, each element representing a displayed signature or mark.
Data Group 11¶
DG 11 output JSON data is an object defined by:
Field |
Description |
Type |
---|---|---|
|
full name of document holder |
String |
|
other names |
Array of strings |
|
personal number |
String |
|
full date of birth (YYYYMMDD) |
String |
|
place of birth, fields separated by “<” |
String |
|
permanent address, fields separated by “<” |
String |
|
telephone |
String |
|
profession |
String |
|
title |
String |
|
personal summary |
String |
|
proof of citizenship |
Hexadecimal string |
|
other valid TD numbers, separated by “<” |
String |
|
custody information |
String |
Note
tag list of present tags in DG 11 file content is not returned.
Data Group 12¶
DG 12 output JSON data is an object defined by:
Field |
Description |
Type |
---|---|---|
|
issuing authority |
String |
|
date of issue (YYYYMMDD) |
String |
|
name of other persons |
Array of strings |
|
endorsements, observations |
String |
|
tax/exit requirements |
String |
|
image of front of document |
Hexadecimal string |
|
image of rear of document |
Hexadecimal string |
|
date and time of document personalization (YYYYMMDDHHMMSS) |
String |
|
serial number of personalization system |
String |
Note
tag list of present tags in DG 12 file content is not returned.
Data Group 14¶
DG 14 output JSON data is an object defined by:
Field |
Description |
Type |
---|---|---|
|
security infos |
Array of objects, each object representing a
|
Data Group 15¶
DG 15 output JSON data is an object defined by:
Field |
Description |
Type |
---|---|---|
|
active authentication public key info |
Object (see Subject Public Key Info) |
Data Group 16¶
DG 16 output JSON data is an array of objects, each object representing a person to notify, as follows:
Field |
Description |
Type |
---|---|---|
|
date data recorded (YYYYMMDD) |
String |
|
name of person |
String |
|
telephone number |
String |
|
address |
String |