IIFAA Decentralized Trusted Authentication Technical Specification — Part 2: Identity Protocol and Interaction Framework

Final Community Group Report

This version:
https://www.w3.org/community/reports/cndid/CG-FINAL-iifaa-did-part2-20260326/
Latest editor's draft:
https://w3c-cg.github.io/cndid/CG-FINAL-iifaa-did-part2-20260326.html
Editors:
Wang Yongtao (Ant Group Co., Ltd.)
Zhang Wu (Ant Group Co., Ltd.)
Sun Weichao (Ant Group Co., Ltd.)
Peng Jin (Ant Group Co., Ltd.)
Lin Guanchen (Ant Group Co., Ltd.)
Huang Lin (Ant Group Co., Ltd.)
Wu Sijie (Ant Group Co., Ltd.)
Yan Dong (Ant Group Co., Ltd.)
Lyu Lei (National Engineering Research Center for Cryptography Technology)
Fu Shan (China Academy of Information and Communications Technology (CAICT))
Wei Fanxing (China Academy of Information and Communications Technology (CAICT))
Xu Jinliang (China Academy of Information and Communications Technology (CAICT))
Yang Bo (National FinTech Evaluation Center)
Yi Qiang (Huawei Technologies Co., Ltd.)
Zhao Xiaona (Honor Device Co., Ltd.)
Li Zhichao (Honor Device Co., Ltd.)
Li Gen (OPPO Guangdong Mobile Communications Co., Ltd.)
Guo Yanhong (CM Financial Technology Co., Ltd.)
Wang Bin (Samsung R&D Institute China-Beijing)
Ping Zhenghai (ZTE Corporation Limited)
Wang Zhitao (Shanghai Electronic Certificate Authority Center Co., Ltd.)
Lu Ruyi (Beijing eSand Information Technology Co., Ltd.)
Zhang Shengyi (Beijing eSand Information Technology Co., Ltd.)
Wang Jun (Beijing eSand Information Technology Co., Ltd.)
Zhu Pengfei (Feitian Technologies Co., Ltd.)
Lyu Fang (Client Service International Inc.)
Meng Ru (Koal Software Co., Ltd.)
Liu Weihua (Zhengzhou Xindajiean Information Technology Co., Ltd.)
Feedback:
GitHub w3c-cg/cndid (pull requests, new issue, open issues)

Abstract

This document establishes the identity protocol and interaction flow for IIFAA decentralized authentication. It applies to R&D design, deployment, testing, and certification activities related to IIFAA decentralized authentication.

Status of This Document

This specification was published by the Chinese DID & VC Community Group. It is not a W3C Standard nor is it on the W3C Standards Track. Please note that under the W3C Community Final Specification Agreement (FSA) other conditions apply. Learn more about W3C Community and Business Groups.

GitHub Issues are preferred for discussion of this specification.

1. Scope

This document establishes the identity protocol and interaction flow for IIFAA decentralized authentication.

This document applies to the IIFAA decentralized authentication R&D design, deployment application, and test and authentication activities.

2. Normative References

The following documents are referred to in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition (including any amendments) applies.

[T/IIFAA 4001-2024]
IIFAA Decentralized Authentication Technical Specification — Part 1: Overall Architecture

3. Terms and Definitions

For the purposes of this document, the following terms and definitions apply, as well as those defined in [T/IIFAA 4001-2024].

Decentralized Identifier (DID)
A new type of identifier that supports verifiable, decentralized digital identity.
DID Document
The identity document information of the user's DID on the blockchain, which is stored in a decentralized manner to ensure that it will not be tampered with. This document describes the encryption public key, verification method, decentralized identity protocol used, and service endpoint for the specific DID.
Verifiable Credentials (VC)
VC data issued by the issuer for a user's DID is securely stored on the user side and presented to the service provider in a verifiable way after being authorized (signed) by the user.
Verifiable Presentation (VP)
It refers to the data that allows the VC holder (i.e., user) to identify himself/herself to the verifier.
Decentralized Identity Asset Wallet
A decentralized identity asset management tool based on mobile applications provided by users. Decentralized identity asset wallets usually use the security chip on the user device side to store and encrypt the user's identity private key and related asset credential data to ensure that any key identity data will not be leaked. At the same time, they also use the biometric technology of mobile devices, such as fingerprint recognition or facial recognition, to provide a more convenient and secure decentralized identity authorization method. In this document, it is also referred to as the wallet.
Identity
A set of attributes associated with an entity.
Note

Note 1: An entity can have multiple identities.

Note 2: Several entities can have the same identity.

[Source: GB/T 25069-2022, 3.512]

4. Abbreviations

The following abbreviations apply to this document.

DID
Decentralized Identifier
OEM
Original Equipment Manufacturer
REE
Rich Execution Environment
SE
Secure Element
TEE
Trusted Execution Environment
VC
Verifiable Credential
VP
Verifiable Presentation

5. Identity Protocol and Device Function Interaction Framework

The identity protocol and device function interaction framework is shown in Figure 1.

Placeholder for Identity Protocol and Device Function Interaction Framework diagram
Figure 1 : Identity Protocol and Device Function Interaction Framework

The specific composition of each part is as follows:

  1. Identity protocol: It describes the identity document (DID Document), verifiable credential, and verifiable presentation related to IIFAA decentralized trusted authentication, involving the roles of participants such as identity service providers, credential issuers, and application manufacturers.
  2. Device function interaction: It describes the relevant content of IIFAA decentralized trusted authentication in the application part, mainly including such function services as identity management and authorization, and credential management and presentation, involving the roles of participants such as application manufacturers and identity service providers (providing decentralized identity asset wallet services).

6. Identity Protocol

6.1 DID Document

6.1.1 Overview

The document describes the encryption materials, verification methods, decentralized identity protocols used, and service endpoints for a specific DID. Some examples of decentralized identity protocol data are shown in Appendix A.

6.1.2 Attributes

Table 1: Attributes of DID Documents
Attribute NameDescriptionOptional/RequiredExample
idDID IDRequireddid:iifaa:2UdYuZagBsinmdRogHNJwPc8QXA4PyXdYXcY1aDaB8wR
createdCreation timeRequired2023-10-05T14:48:00.000Z
updateUpdate timeRequired2023-10-05T14:48:00.000Z
statusOverall status of DIDRequiredactive
Verification MethodsSee 6.4RequiredRefer to Appendix A for data sample
authenticationSee 6.4OptionalRefer to Appendix A for data sample
proofSee 6.5RequiredRefer to Appendix A for data sample

6.2 Verifiable Credentials

6.2.1 Overview

Verifiable Credentials are VC data issued by the issuer for a user's DID identity. It is securely stored on the user side and presented to the service provider in a verifiable way after being authorized (signed) by the user.

6.2.2 Attributes

Table 2: Attributes of VCs
Attribute NameDescriptionOptional/RequiredExample
idUnique identifier of VCRequireddid:credential:disable:BovPfgFcvy4eRuDcf1w9Wa7zSgbnsd1FuFeh6SxQhJVm#1682320755035
typeVC type set, with the first type as the main type of the current VC, and the rest as subtypes, which can be customized by the applicationRequired["Disable Credential Type", "Selective Disclosure Credential Type"]
issuerDID of the issuer. Business service providers can query the issuer's public key on the blockchain through the issuer's DID to verify whether the VC is from a trusted sourceRequireddid:myidentity:E2h3D7FgsoNiFDzE6gSv4F2MqjK6mSmv9WZqLB7jBYq1
Issuance DateIssuance dateRequired2023-04-24 15:19:15
expiration DateValid expiration dateRequired2033-04-24 15:19:15
credentialSubject.claims.subjectVC attribute data stored in the form of KVRequired{"name": "Zhang San", "disableIdNum": "330133199903033333", "endValidDate": "2032-04-14", "level": "1", "type": "4"}
credentialSubject.claims.seedSelectively disclosed seed informationRequiredeaa02887e4834024b954fb7b0c063ae7
Credential StatusVC status, provided to the business service provider for verification to determine whether the VC has been revokedRequired{"id": "https://szcldemo.zjdpf.org.cn/idp/credentials/status/0#26", "type": "StatusList2021", "statusPurpose": "revocation", "statusListIndex": "26", "statusListCredential": "https://szcldemo.zjdpf.org.cn/idp/credentials/status/0"}
proofSee 6.5RequiredSee Appendix A

6.3 Verifiable Presentation

6.3.1 Overview

Verifiable Presentation (VP) refers to the data that allows the VC holder (i.e., user) to identify himself/herself to the verifier.

6.3.2 Attributes

Table 3: Attributes of VP
Attribute NameDescriptionOptional/RequiredExample
idUnique identifier of VC under the same issuerRequireddid:credential:disable:BovPfgFcvy4eRuDcf1w9Wa7zSgbnsd1FuFeh6SxQhJVm#1682320755035
typeList of VC types, with the first type as the main type of the current VC, and the rest as subtypes, which can be customized by the applicationRequired["VerifiablePresentation", "SelectiveDisclosurePresentation"]
createdCreation timeRequired2023-10-05T14:48:00.000Z
Verifiable CredentialVCs have a set attribute that contains a list of VCs provided by the holder. Refer to VCs in 6.2RequiredRefer to data samples of VCs in 6.2
proofRefer to the proof in 6.5RequiredRefer to data samples of the proof in 6.5

6.3.3 Data Sample

{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://www.w3.org/2018/credentials/examples/v1"
  ],
  "type": [
    "VerifiablePresentation"
  ],
  "created": "Wed Apr 26 14:50:56 GMT+08:00 2023",
  "domain": "did:iifaa:123456",
  "verifiableCredential": [
    { /* vc set */ }
  ],
  "proof": {
    "type": "SM2Signature2024",
    "created": "2024-07-11T13:50:18+08:00",
    "creator": "did:example:123OUgINRNdf0kIeo",
    "verificationMethod": "did:cndid:cndid#key-1",
    "proofPurpose": "assertionMethod",
    "proofValue": "MEYCIQCpy0HOUgINRNdf0kIeoStR94v7W3OcfoBpWel6TAckqwIhAPdTq7u/ZpTOOp1VLtLCOuFpOVL7AYpys/OHnL8Uqwr5"
  }
}

6.4 Verification Methods / Authentication

6.4.1 Overview

The verification method associated with DID identity is used to verify the VP signature and complete DID identity authentication.

6.4.2 Attributes

Table 4: Attributes of Verification Method
Attribute NameDescriptionOptional/RequiredExample
idID of the current verification methodRequireddid:example:123456#sm2-1
typeType of the current verification method, which determines how to verify statements or operations related to the identity, such as digital signatures and encryption.RequiredSM2VerificationKey2024
Public KeyVerification value corresponding to the current verification method, which has two specific forms: publicKeyJwk and publicKeyHexRequiredMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnKcEGSwB6OE0MzhDRD3CRMqUJ9DaLg4NfA8i8uz7LOykF171K_2EqRpGNUik6HeKdnbZQ7O5xv8rGk77OD5puZP9IOqWNvu
statusStatus of the current verification method, e.g., whether it has been abandonedRequiredactive
controllerDID account ID associated with the current verification methodRequireddid:example:123456789abcdefghi
securityLevelSecurity level of the current verification method, refer to 6.6 "Security Level"Required256

6.4.3 Data Sample

6.4.3.1 SM2 key
{
  "type": "SM2VerificationKey2024",
  "id": "did:example:123456#sm2-1",
  "controller": "did:example:123456",
  "status": "active",
  "securityLevel": "256",
  "publicKeyHex": "04[{x-coordinate in hex}][{y-coordinate in hex}]"
}
6.4.3.2 ECC NIST curve (p256, etc.)
{
  "id": "did:example:123456#ecdsa-p256-1",
  "type": "JsonWebKey2020",
  "controller": "did:example:123456",
  "status": "active",
  "securityLevel": "256",
  "publicKeyJwk": {
    "kty": "EC",
    "crv": "P-256",
    "x": "...",
    "y": "..."
  }
}
6.4.3.3 RSA key

RsaVerificationKey2018:

{
  "id": "did:example:123456789abcdefghi#keys-1",
  "type": "RsaVerificationKey2018",
  "controller": "did:example:123456789abcdefghi",
  "status": "active",
  "securityLevel": "256",
  "publicKeyPem": "-----BEGIN PUBLIC KEY...END PUBLIC KEY-----\r\n"
}

RsaVerificationKey2020:

{
  "id": "did:example:123456789abcdefghi#key-1",
  "type": "RsaVerificationKey2020",
  "controller": "did:example:123456789abcdefghi",
  "status": "active",
  "securityLevel": "256",
  "publicKeyJwk": {
    "kty": "RSA",
    "e": "AQAB",
    "n": "0S25ZgyZ..."
  }
}
Table 5: Comparison of Different RSAs
FeaturesRsaVerificationKey2018RsaVerificationKey2020
Public Key FormatThe PEM format or JWK format is allowed (but PEM is more commonly used)The JWK format is required (standardized, machine parsable)
Specification VersionDefined in earlier draft DID specifications (such as the 2018 standard)Defined in the updated DID Core v1.0 and subsequent versions
Signature Algorithm SupportThe algorithm may not be clearly defined (need to be combined with JWS independent statement)Explicitly support common algorithms (such as RS256 and PS256) to enhance interoperability
Usage ScenariosCompatibility first, may depend on tools in early versionsNew project recommendation, in line with modern safety standards and specifications

6.5 Proof

6.5.1 Overview

Self-certification data of the current VC, through which the business service provider can verify whether the VC has been tampered with and whether it comes from a trusted issuer.

6.5.2 Attributes

Table 6: Attributes of Proof
Attribute NameDescriptionOptional/RequiredExample
typeType of the current verification method, which determines how to verify statements or operations related to the identity, such as digital signatures and encryption.RequiredSM2VerificationKey2024
creatorTo identify the DID identity of a proof creatorOptionaldid:example:1230UgINRNdf0kIeo
createdProof creation time, using ISO 8601 standard timeRequired2024-07-11T13:50:18+08:00
Verification MethodReferenced verification method ID, refer to 6.4 "Verification Method"Requireddid:cndid:cndid#key-1
proofValuebase64Url encoding of the DER signature value, usually used to store the VC main body signature data, among which the binary encoding of the SM2 signature follows the ASN.1 DER encoding rulesRequiredMEYCIQCpy0HOUgINRNdf0kIeoStR94v7W30cfoBpWel6TAckqwIhAPdTq7u
challengeA bidirectional challenge value issued and verified by the SP server during the VP phase for SP generation and verificationOptional15ecc79e-1490-4096-9684-46b0e92d4aec
algSignature result base64 URL, suitable for signature algorithms, RS256 (RSA+SHA256), ES256 (P-256 curve + SHA256)RS256, ES256 requiredRS256

6.5.3 Data Sample

6.5.3.1 SM2 signature
{
  "type": "SM2Signature2024",
  "created": "2024-07-11T13:50:18+08:00",
  "creator": "did:example:123OUgINRNdf0kIeo",
  "verificationMethod": "did:cndid:cndid#key-1",
  "proofPurpose": "assertionMethod",
  "proofValue": "MEYCIQCpy0HOUgINRNdf0kIeoStR94v7W3OcfoBpWel6TAckqwIhAPdTq7u/ZpTOOp1VLtLCOuFpOVL7AYpys/OHnL8Uqwr5",
  "challenge": "15ecc79e-1490-4096-9684-46b0e92d4aec"
}
6.5.3.2 ECC NIST curve (p256, etc.) signature, RSA signature
{
  "type": "BasicJsonWebSignature2024",
  "alg": "RS256",
  "created": "2024-07-11T13:50:18+08:00",
  "verificationMethod": "did:cndid:cndid#key-1",
  "proofPurpose": "assertionMethod",
  "proofValue": "MEYCIQCpy0HOUgINRNdf0kIeoStR94v7W3OcfoBpWel6TAckqwIhAPdTq7u/ZpTOOp1VLtLCOuFpOVL7AYpys/OHnL8Uqwr5"
}

6.6 Security Level

6.6.1 Overview

The DID identity security level identifier SecurityLevel consists of two bytes of data, where the low-order byte (bits 1~8) identifies the authentication type, and the high-order byte (bits 9~16) identifies the operating environment.

6.6.2 Attributes

Table 7: Attributes of Security Level
BitMeaning ClassificationDescription of Meaning
1Authentication methodWhether a local password is set
2Reserved (used to add low-security level authentication methods)
3Reserved (used to add low-security level authentication methods)
4Reserved (used to add low-security level authentication methods)
5Whether local biometrics are set
6Reserved (used to add high-security level authentication methods)
7Reserved (used to add high-security level authentication methods)
8Reserved (used to add high-security level authentication methods)
9Operating environmentPrivate keys are stored and used in REE
10Reserved (to add the definition of the REE security scheme)
11Reserved (to add the definition of the REE security scheme)
12Private keys are stored and used in TEE
13Private keys are stored and used in SE
14Reserved
15Reserved
16Reserved

6.6.3 Data Sample

Table 8: Data Samples of Security Level
Bit 12~456~8 9101112131415~16 Int value
Meaning
Authentication TypeOperating Environment
No authentication method, private key in REE 0000 1000000 256
Local password, private key in REE 1000 1000000 257
No authentication method, private key in SIM 0000 0000100 8192
Local password, private key in SIM 1000 0000100 8193

Get the operating environment:

int secureLevel = 257;
int secureArea = secureLevel & 0xFF00; //secureArea : 256--REE

Get the authentication type:

int secureLevel = 257;
int authType = secureLevel & 0x00FF; //authType : 1--Local password

7. Device Function Interaction

7.1 Overview

This section mainly describes the function interaction flow specifications, such as identity creation and credential management, for device-based decentralized trusted authentication provided to users.

7.2 DID creation

7.2.1 Flowchart

Enter the wallet and determine whether there is DID identity data locally. If not, enter the identity creation process, see Figure 2.

Placeholder for DID Creation Flowchart
Figure 2 : Flowchart of DID Creation

7.2.2 Sequence Diagram

The sequence diagram is shown in Figure 3.

Placeholder for DID Creation Sequence Diagram
Figure 3 : DID Creation Sequence Diagram

7.3 VC Application

7.3.1 Flowchart

Enter the VC management page and determine whether there is corresponding VC data locally. If not, an application button is displayed. If so, a view button is displayed. The flowchart is shown in Figure 4.

Placeholder for VC Application Flowchart
Figure 4 : Flowchart of VC Application

7.3.2 Sequence Diagram

The VC application sequence diagram is shown in Figure 5.

Placeholder for VC Application Sequence Diagram
Figure 5 : VC Application Sequence Diagram

7.4 Viewing VC

The device only provides the query service for the local VC summary information list, with the specific process as follows:

7.4.1 Flowchart

Enter the page, get VCUIStyle/VC templates and VC data from the IDP server and DIDSDK, respectively. The flowchart is shown in Figure 6.

Placeholder for VC Viewing Flowchart
Figure 6 : Flowchart of VC Viewing

7.4.2 Sequence Diagram

The sequence diagram is shown in Figure 7.

Placeholder for VC Viewing Sequence Diagram
Figure 7 : VC Viewing Sequence Diagram

7.5 Issuing VP

7.5.1 Flowchart

The SP passes in the required VC content and the specified VM type to pull up the wallet, and the wallet passes the parameters to the SDK. After the SDK completes verification and signing, it returns the result. The flowchart is shown in Figure 8.

Placeholder for VP Issuance Flowchart
Figure 8 : VP Issuance Flowchart

7.5.2 Sequence Diagram

The sequence diagram is shown in Figure 9.

Placeholder for VP Issuance Sequence Diagram
Figure 9 : VP Issuance Sequence Diagram

A. Data Sample of Identity Protocol

A.1 Data Sample of Decentralized Identity Protocol

{
  "@context": "https://www.w3.org/ns/did/v1",
  "id": "did:cdid:iifaa:123456789abcdefghi",
  "version": "1.0.0",
  "created": "2023-10-05T14:48:00.000Z",
  "update": "2023-10-15T14:48:00.000Z",
  "status": "active",
  "verificationMethods": [
    {
      "type": "SM2VerificationKey2024",
      "id": "did:example:123456#sm2-1",
      "controller": "did:example:123456",
      "status": "active",
      "securityLevel": "256",
      "publicKeyHex": "04a34e...a72c0e"
    }
  ],
  "authentication": [
    {
      "type": "SM2VerificationKey2024",
      "id": "did:example:123456#sm2-1",
      "controller": "did:example:123456",
      "status": "active",
      "securityLevel": "256",
      "publicKeyHex": "04a34e...a72c0e"
    }
  ],
  "proof": {
    "type": "SM2Signature2024",
    "created": "2024-07-11T13:50:18+08:00",
    "creator": "did:example:123OUgINRNdf0kIeo",
    "verificationMethod": "did:cndid:cndid#key-1",
    "proofPurpose": "assertionMethod",
    "proofValue": "MEYCIQCpy0HOUgINRNdf0kIeoStR94v7W3OcfoBpWel6TAckqwIhAPdTq7u/ZpTOOp1VLtLCOuFpOVL7AYpys/OHnL8Uqwr5"
  }
}

A.2 Data Example of VCs

{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://www.w3.org/2018/credentials/examples/v1"
  ],
  "type": ["DisableCredentialType", "SelectiveDisclosureCredentialType"],
  "templateId": "200457",
  "version": "1.1.1",
  "id": "did:credential:disable:BovPfgFcvy4eRuDcf1w9Wa7zSgbnsd1FuFeh6SxQhJVm#1682320755035",
  "issuer": "did:myidentity:E2h3D7FgsoNiFDzE6gSv4F2MqjK6mSmv9WZqLB7jBYq1",
  "issuanceDate": "2023-04-24 15:19:15",
  "expirationDate": "2033-04-24 15:19:15",
  "credentialSubject": {
    "id": "7cf59e33f1fad217421aa6d970ec169c49c23362f7b1affdff6bccdfd9e42bcb",
    "did": "did:myidentity:E2h3D7FgsoNiFDzE6gSv4F2MqjK6mSmv9WZqLB7jBYq1",
    "claims": {
      "subject": {
        "name": "Zhang San",
        "disableIdNum": "330133199903033333",
        "endValidDate": "2032-04-14",
        "level": "1",
        "type": "4"
      },
      "seed": "eaa02887e4834024b954fb7b0c063ae7"
    }
  },
  "credentialStatus": {
    "id": "https://szcldemo.zjdpf.org.cn/idp/credentials/status/0#26",
    "type": "StatusList2021",
    "statusPurpose": "revocation",
    "statusListIndex": "26",
    "statusListCredential": "https://szcldemo.zjdpf.org.cn/idp/credentials/status/0"
  },
  "proof": {
    "type": "SM2Signature2024",
    "created": "2024-07-11T13:50:18+08:00",
    "creator": "did:example:1230UgINRNdf0kIeo",
    "verificationMethod": "did:cndid:cndid#key-1",
    "proofPurpose": "assertionMethod",
    "proofValue": "MEYCIQCpy0H0UgINRNdf0kIeoStR94v7W30cfoBpWel6TAckqwIhAPdTq7u/ZpTOOp1VLtLCOuFpOVL7AYpys/0HnL8Uqwr5"
  }
}

A.3 Data Samples of VPs

{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://www.w3.org/2018/credentials/examples/v1"
  ],
  "type": [
    "VerifiablePresentation"
  ],
  "created": "Wed Apr 26 14:50:56 GMT+08:00 2023",
  "domain": "did:iifaa:123456",
  "verifiableCredential": [
    { /* vc set */ }
  ],
  "proof": {
    "type": "SM2Signature2024",
    "created": "2024-07-11T13:50:18+08:00",
    "creator": "did:example:1230UgINRNdf0kIeo",
    "verificationMethod": "did:cndid:cndid#key-1",
    "proofPurpose": "assertionMethod",
    "proofValue": "MEYCIQCpy0HOUgINRNdf0kIeoStR94v7W30cfoBpWel6TAckqwIhAPdTq7u/ZpTOOp1VLtLCOuFpOVL7AYpys/OHnL8Uqwr5"
  }
}