169 - QR Code Specifications
CBOR Identity Data in QR Code
Tag: 169 (identity-data)
Data Item: JSON Object
Semantics: Identity Data of a Person in QR-Code
Point of Contact: Resham Chugani (resham@mosip.io)
IANA Registration: IANA CWT Registry (Search Key: 169)
Version: 1.1.0
1. Introduction
This document specifies an updated version of the generic data structure and encoding mechanism for storing the Identity Data of a registered person using any ID platform. It also provides a transport encoding mechanism in a machine-readable optical format (QR).
2. Rationale
Once a person is registered in an identity system, their data serves as the foundation for identification, granting them access to social benefits and government services. The level of assurance in this identification process varies depending on the authentication methods employed. Low assurance is achieved through basic identifiers like ID numbers, demographic data, passwords, or PINs. Conversely, higher assurance levels are attained through one-time passwords (OTP) and biometrics.
Among these methods, biometric-based authentication, such as facial authentication, offers the highest level of assurance as it assures the presence of the individual. While this is effective for online systems & personal phones where verification is conducted on a server or a personal device; offline authentication presents challenges in maintaining a similarly high level of assurance. The offline authentication mechanism should work for people with no phone.
For instance, in a cross-border scenario remote areas often face significant internet connectivity issues. Even when internet access is available, server reliability may be inconsistent. In such circumstances, scanning a QR code containing the person's facial photograph and identity information, alongside assurance that the data is country-signed, provides an additional layer of security and affirmation for the countries involved.
Please note: The trust layers required to sync the country's key are beyond the scope of this document. We assume the app scanning the QR code already has the country's key to verify.
To tackle the challenge above, we propose a standard CBOR-based QR Code that involves embedding a low-resolution image of the person with a minimal demographic dataset within the QR code. This QR code would be digitally signed by the ID authorities (Issuer) and then printed on a physical card. Subsequently, the signed data within the QR code can be utilized for facial authentication. However, it's essential to recognize that QR codes have limitations regarding size. We suggest leveraging CBOR Web Token (CWT) with ED25519/ECC keys to generate a smaller signature and more condensed data.
Claim 169 represents a JSON Object that includes the below table as ID attributes. You can find an illustration of the ID structure contained within Claim 169, where:
3. Semantics
3.1 CBOR Map Structure Overview
All the fields here are OPTIONAL.
Attribute | Type | Attribute Name | Description |
---|---|---|---|
|
| ID | Unique ID to indicate the PII data |
|
| Version | Version of the ID data |
|
| Language | Language used in other attributes |
|
| Full Name | Full name of the person |
|
| First Name | First name of the person |
|
| Middle Name | Middle name of the person |
|
| Last Name | Last name of the person |
|
| Date of Birth | Date of birth in YYYYMMDD format |
|
| Gender | Gender with the following values |
|
| Address | Address of the person, separator character |
|
| Email ID | Email id of the person |
|
| Phone Number | Contact number of the person |
|
| Nationality | Nationality of the person |
|
| Marital Status | Marital status - Can contain the following values |
|
| Guardian | Name/id of the entity playing the role of a guardian, such as a mother, father, spouse, sister, legal guardian etc. |
|
| Binary Image | Binary image of the person's photograph |
|
| Binary Image Format | Binary image format. Can contain the following values |
|
| Best Quality Fingers | An unsigned 8-bit number encoding the hand position of the finger. It must be in the range 0-10, where 0 represents "Unknown", 1-5 represents right thumb to little finger, and 6-10 represents left thumb to little finger in sequence |
| Reserved | Reserved for future attributes | |
| Reserved | Reserved for Person's Biometrics Data attributes | |
|
| Right Thumb | Person's Right Thumb biometrics |
|
| Right Pointer Finger | Person's Right Pointer Finger biometrics |
|
| Right Middle Finger | Person's Right Middle Finger biometrics |
|
| Right Ring Finger | Person's Right Ring Finger biometrics |
|
| Right Little Finger | Person's Right Little Finger biometrics |
|
| Left Thumb | Person's Left Thumb biometrics |
|
| Left Pointer Finger | Person's Left Pointer Finger biometrics |
|
| Left Middle Finger | Person's Left Middle Finger biometrics |
|
| Left Ring Finger | Person's Left Ring Finger biometrics |
|
| Left Little Finger | Person's Left Little Finger biometrics |
|
| Right Iris | Person's Right Iris biometrics |
|
| Left Iris | Person's Left Iris biometrics |
|
| Face | Person's Face biometrics |
|
| Right Palm Print | Person's Right Palm Print biometrics |
|
| Left Palm Print | Person's Left Palm Print biometrics |
|
| Voice | Person's Voice biometrics |
| Reserved | Reserved for future for Person's Biometrics Data attributes | |
| Reserved | Reserved for future attributes |
Biometrics
Attribute | Type | Attribute Name | Description |
---|---|---|---|
|
| Data | Biometrics binary data |
|
| Optional biometrics data format | |
|
| Optional biometrics data sub format | |
|
| Data issuer | Optional biometric data issuer |
Data formats
Data format | Description |
---|---|
| Image |
| Template |
| Sound |
| Bio hash |
Data sub formats
Image
Subformat | Description |
---|---|
| PNG |
| JPEG |
| JPEG2000 |
| AVIF |
| WEBP |
| TIFF |
| WSQ |
| Vendor specific |
Template
Subformat | Description |
---|---|
| Fingerprint Template ANSI 378 |
| Fingerprint Template ISO 19794-2 |
| Fingerprint Template NIST |
| Vendor specific |
Sound
Subformat | Description |
---|---|
| WAV |
| MP3 |
3.2 CBOR Map Structure Example
4. Security Considerations
TODO:
Current map structure is in plain text and its not the recommended way to handle privacy. Adoption of SD-JWT or equivalent can be considered.
CWT MUST be signed, create a COSE_Sign/COSE_Sign1 object using the Message as the COSE_Sign/COSE_Sign1 Payload; all steps specified in RFC8152 for creating a COSE_Sign/COSE_Sign1 object MUST be followed.
If the CWT is a COSE_Encrypt/COSE_Encrypt0 object,create a COSE_Encrypt/COSE_Encrypt0 using the Message as the plaintext for the COSE_Encrypt/COSE_Encrypt0 object; all steps specified in RFC8152 for creating a COSE_Encrypt/COSE_Encrypt0 object MUST be followed.
To verify the claims the CWT is a COSE_Sign/COSE_Sign1, follow the steps specified in Section 4 of RFC8152 ("Signing Objects") for validating a COSE_Sign/COSE_Sign1 object. Let the Message be the COSE_Sign/COSE_Sign1 payload. Once signature is valid we SHOULD validate the public key against a preconfigured key. In case encrypted Else, if the CWT is a COSE_Encrypt/COSE_Encrypt0 object, follow the steps specified in Section 5 of [RFC8152] ("Encryption Objects") for validating a COSE_Encrypt/COSE_Encrypt0 object. Let the Message be the resulting plaintext.
The security of the CWT relies upon on the protections offered by COSE. Unless the claims in a CWT are protected, an adversary can modify, add, or remove claims.
Since the claims conveyed in a CWT is used to make identity claim decisions, it is not only important to protect the CWT but also to ensure that the recipient can authenticate the party that assembled the claims and created the CWT. Without trust of the recipient in the party that created the CWT, no sensible identity verification can be made. Furthermore, the creator of the CWT needs to carefully evaluate each claim value prior to including it in the CWT so that the recipient can be assured of the validity of the information provided.
Syntactically, the signing and encryption operations for Nested CWTs may be applied in any order; however, if encryption is necessary, producers normally should sign the message and then encrypt the result (thus encrypting the signature). This prevents attacks in which the signature is stripped, leaving just an encrypted message, as well as providing privacy for the signer. Furthermore, signatures over encrypted text are not considered valid in many jurisdictions.
5. IANA Considerations:
IANA is requested to register the revised specifications of claim 169 in "CBOR Web Token (CWT) Claims" registry IANA CWT Claims.
5.1 Registry Content
Claim Name: identity-data Claim Description: Registering the claim for storing identity data of a person, which could be Personally Identifiable Data (PII) mostly used in Foundational/National ID for cross-border interoperability. Claim Key: 169 Claim Value Type(s): map Change Controller: MOSIP Specification Document(s): Section 3, Section 4
6. Acknowledgments
This work is the result of the dedicated efforts of contributors who recognize the critical importance of interoperability and a consistent QR code specification. The revised version has been shaped significantly by the input of our working group committee, comprising members from the following organizations: GetGroup, PWC and Tech 5.
We extend our gratitude to the committee members for their invaluable time and insights throughout the evaluation phase.
6.1 Working Group Committee Members:
GetGroup: Aiman Tarek
PWC: Chaitanya Giri
Tech 5: Bejoy Ak, Nelson Branco, Rahul Parthe
MOSIP: Harini Sampathkumar, Janardhan BS, Mahammed Taheer, Ramesh Narayanan, Resham Chugani, Reeba Thomas, Sanchi Singh, Sasikumar Ganesan, Sreenadh S, Swati Goel, Vishwanath V
7. Authors
Mahammed Taheer (mohd.taheer@gmail.com)
Resham Chugani (resham@mosip.io)
Rounak Nayak (rounak@ooru.io)
Sasikumar G (sasi@duck.com)
Sreenadh S (sreeavtar@gmail.com)
Last updated