डिजिटल क्रेडेंशियल के लिए, हार्डवेयर की मदद से पुष्टि करने की सुविधा लागू करना

OpenID4VCI की मदद से, डिजिटल क्रेडेंशियल जारी करने की प्रोसेस में, जारी करने वाली कंपनी को यह पता होना चाहिए कि साइन किया जाने वाला क्रेडेंशियल, सुरक्षित जगह पर सेव है. OpenID4VCI के साथ इस्तेमाल करने के लिए, android_keystore_attestation सबूत का फ़ॉर्मैट उपलब्ध है. यह फ़ॉर्मैट, Android Keystore से हार्डवेयर पर साइन की गई रिपोर्ट उपलब्ध कराता है. इससे यह पक्का होता है कि कुंजी, ट्रस्टेड एक्ज़ीक्यूशन एनवायरमेंट (टीईई) या StrongBox में लॉक है. साथ ही, इसे एक्सपोर्ट या क्लोन नहीं किया जा सकता.

हार्डवेयर की पुष्टि करने की प्रोसेस की खास जानकारी

जब Android Keystore में कोई कुंजी जनरेट की जाती है, तो सिस्टम, पुष्टि करने वाला सर्टिफ़िकेट जनरेट कर सकता है. इस सर्टिफ़िकेट पर, डिवाइस के हार्डवेयर से सुरक्षित की गई कुंजी से हस्ताक्षर होता है. यह कुंजी, Google के पास मौजूद रूट ऑफ़ ट्रस्ट से जुड़ी होती है.

android_keystore_attestation सबूत, X.509 सर्टिफ़िकेट चेन का कलेक्शन होता है. हर चेन, पुष्टि करने की एक कुंजी को दिखाती है. इसकी संरचना, लीफ़ सर्टिफ़िकेट और उसके बाद इंटरमीडिएट सर्टिफ़िकेट के हिसाब से होती है.

  • लीफ़ सर्टिफ़िकेट: इसमें कुंजी और Android के लिए खास पुष्टि करने वाला एक्सटेंशन शामिल होता है.
  • इंटरमीडिएट सर्टिफ़िकेट: ये लीफ़ को Android रूट से कनेक्ट करते हैं.

पुष्टि करने के चरण

जारी करने वाली कंपनियों को, पुष्टि करने की प्रोसेस के दौरान कई तरह की पुष्टि करनी चाहिए.

  • चेन में वह सर्टिफ़िकेट ढूंढें जिसमें Android के लिए पुष्टि करने वाला एक्सटेंशन शामिल हो. आम तौर पर, यह लीफ़ सर्टिफ़िकेट होता है. इस सर्टिफ़िकेट में, Android Keystore से जनरेट की गई कुंजी का पुष्टि करने वाला डेटा शामिल होता है.
  • पुष्टि करें कि एक्सटेंशन में मौजूद attestationChallenge फ़ील्ड, रीप्ले हमलों को रोकने के लिए प्रोटोकॉल से मिले c_nonce से मेल खाता हो.
  • उन एक्सटेंशन में मौजूद सभी दावे की वैल्यू की पुष्टि करें जिनमें आपकी दिलचस्पी है.
  • Android Keystore सर्टिफ़िकेट के लिए, रद्द करने की जांच करें.

पुष्टि करने के सबूत में मौजूद वैल्यू, कई सोर्स से मिलती हैं:

  • जारी करने वाली कंपनी: जारी करने वाली कंपनी, कई वैल्यू उपलब्ध कराती है. इनमें से ज़्यादातर वैल्यू, जारी करने वाली कंपनी के मेटाडेटा फ़ॉर्मैट में शामिल की जाती हैं, ताकि उन्हें प्रज़ेंटेशन के दौरान फ़िल्टर किया जा सके.
  • मालिक: पैकेज का नाम और हस्ताक्षर जैसी वैल्यू, मालिक से मिलती हैं. इन्हें, क्रेडेंशियल जारी करने की सामान्य प्रोसेस के तहत शेयर नहीं किया जाता. इसलिए, इन्हें मालिक से अलग से लेना पड़ता है.
  • प्रोटोकॉल: नॉन्स और attestationChallenge जैसी वैल्यू, प्रोटोकॉल से मिलती हैं.

पुष्टि करने वाले डेटा की पुष्टि करने के बारे में ज़्यादा जानकारी के लिए, ये संसाधन देखें:

पुष्टि करने के सबूत का फ़ॉर्मैट

क्रेडेंशियल के अनुरोध में, android_keystore_attestation सबूत को इस उदाहरण में शामिल किया गया है:

{
  "type": "array",
  "description": "An array of certificate chains. Each chain attests a single key.",
  "items": {
    "type": "array",
    "description": "An X.509 certificate chain. Each certificate is a Base64-encoded string. The first element in the chain is the leaf certificate with the extension, the last is the Android Keystore root certificate.",
    "items": {
      "type": "string",
      "description": "A single X.509 certificate (Base64-NoWrap padded DER encoded)."
    },
    "minItems": 1
  },
  "minItems": 1
}

इसके बाद, इसे क्रेडेंशियल के अनुरोध के proofs ऑब्जेक्ट में सेव किया जाता है.

{
  "credential_configuration_id": "org.iso.18013.5.1.mDL",
  "proofs": {
    "android_keystore_attestation": [
      [
        "MII...", // Leaf certificate (contains Keystore extension)
        "MII...", // Intermediate certificate
        "MII..."  // Android Root certificate
      ],
      [ "MII...", "MII...", "MII..." ] // second proof
    ]
  }
}

जारी करने वाली कंपनी के मेटाडेटा का फ़ॉर्मैट

जारी करने वाली कंपनी, यह बताती है कि वह किस तरह के सबूतों के साथ काम करती है. इसके लिए, वह क्रेडेंशियल के किसी कॉन्फ़िगरेशन के लिए, proof_types_supported ऑब्जेक्ट में android_keystore_attestation ऑब्जेक्ट शामिल करती है.

जारी करने वाली कंपनियों के लिए, android_keystore_attestation ऑब्जेक्ट का यह उदाहरण देखें:

{
  "type": "object",
  "properties": {
    "proof_signing_alg_values_supported": {
      "type": "array",
      "description": "REQUIRED. As defined in OpenID4VCI 1.0 Section 12.2.4.",
      "items": {
        "type": "string",
        "description": "Cryptographic algorithm identifiers used in the proof_signing_alg_values_supported Credential Issuer metadata parameter for this proof type are case sensitive strings and SHOULD be one of those defined in [IANA.JOSE]."
      },
      "minItems": 1
    },
    "key_attestations_required": {
      "type": "object",
      "description": "OPTIONAL. Specifies the minimum attestation requirements.",
      "properties": {
        "key_mint_security_level": {
          "type": "string",
          "description": "OPTIONAL. Minimum accepted keyMintSecurityLevel. Values defined in https://source.android.com/docs/security/features/keystore/attestation#securitylevel-values.",
          "enum": ["Software", "TrustedEnvironment", "StrongBox"],
          "default": "TrustedEnvironment"
        },
        "user_auth_types": {
          "type": "array",
          "description": "OPTIONAL. A list of authentication types which can authorize the use of the key. If empty, no authentication is required. If multiple, any are allowed.",
          "items": {
            "type": "string",
            "description": "Allowed values are 'LSKF' and 'BIOMETRIC'. These values are meant to mimic the values used during the key generation process here.",
            "enum": ["LSKF", "BIOMETRIC"]
          },
          "default": []
        }
      }
    }
  },
  "required": ["proof_signing_alg_values_supported"]
}

proof_types_supported ऑब्जेक्ट का यह उदाहरण देखें:

{
  "credential_configurations_supported": {
    "org.iso.18013.5.1.mDL": {
      "format": "mso_mdoc",
      "doctype": "org.iso.18013.5.1.mDL",
      "cryptographic_binding_methods_supported": [
        "cose_key"
      ],
      "credential_signing_alg_values_supported": [
        -7, -9
      ],
      "proof_types_supported": {
        "android_keystore_attestation": {
          "proof_signing_alg_values_supported": [
            "ES256" // ecdsaWithSHA256
          ],
          "key_attestations_required" : {
            // OPTIONAL String - Representing the minimum accepted value for keyMintSecurityLevel values
            // defined here ("Software"|"TrustedEnvironment"|"StrongBox"). Default value: "TrustedEnvironment"
            "key_mint_security_level": "TrustedEnvironment",
            // OPTIONAL List of Strings - Representing all allowed values for userAuthType values defined here.
            // [] value will represent noAuthRequired. Default value: [].
            "user_auth_types": ["LSKF", "BIOMETRIC"]
          }
        }
      }
    }
  }
}

VCI की पुष्टि करने के दावों को Android Keystore से मैप करना

इस टेबल में, जानकारी के लिए मैपिंग दी गई है. इससे, OpenID4VCI की पुष्टि करने के सबूत के स्टैंडर्ड टाइप से परिचित इकाइयां यह समझ सकती हैं कि Android Keystore की पुष्टि करने की प्रोसेस में, मिलते-जुलते कॉन्सेप्ट कहां मौजूद हैं.

VCI की पुष्टि करने का दावा

android_keystore_attestation की जगह

एक्सपेक्टेड वैल्यू की जगह

iss

Keystore के रूट सर्टिफ़िकेट की सार्वजनिक कुंजी

लागू नहीं

iat

पुष्टि करने वाले एक्सटेंशन में मौजूद creationDateTime वैल्यू

लागू नहीं

exp

लीफ़ सर्टिफ़िकेट में मौजूद validUntil फ़ील्ड

लागू नहीं

attested_keys

हर चेन के लीफ़ सर्टिफ़िकेट में मौजूद सार्वजनिक कुंजी

लागू नहीं

key_storage

पुष्टि करने वाले एक्सटेंशन में मौजूद keyMintSecurityLevel वैल्यू

जारी करने वाली कंपनी ने चुना: जारी करने वाली कंपनी के मेटाडेटा में मौजूद key_mint_security_level फ़ील्ड

user_authentication

पुष्टि करने वाले एक्सटेंशन में मौजूद userAuthType और noAuthRequired वैल्यू

जारी करने वाली कंपनी ने चुना: जारी करने वाली कंपनी के मेटाडेटा में मौजूद user_auth_types फ़ील्ड

nonce

पुष्टि करने वाले एक्सटेंशन में मौजूद attestationChallenge वैल्यू

प्रोटोकॉल से: VCI में बताए गए नॉन्स एंडपॉइंट से मिली c_nonce वैल्यू

certification

लागू नहीं

लागू नहीं

status

लागू नहीं

लागू नहीं