OpenID for Verifiable Credential Issuance (OpenID4VCI) स्पेसिफ़िकेशन का इस्तेमाल करके, डिजिटल क्रेडेंशियल जारी करने के सामान्य फ़्लो में, जारी करने वाले व्यक्ति या कंपनी को यह पता होना चाहिए कि हस्ताक्षर किए जाने वाले क्रेडेंशियल की कुंजी, सुरक्षित जगह पर सेव की गई है. android_keystore_attestation प्रूफ टाइप, OpenID4VCI के साथ इस्तेमाल करने के लिए एक फ़ॉर्मैट है. यह 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"]
}
}
}
}
}
}
वीसीआई के पुष्टि किए गए दावों को Android Keystore से मैप करना
इस टेबल में, जानकारी देने वाली मैपिंग दी गई है. इससे, OpenID4VCI के स्टैंडर्ड अटेस्टेशन प्रूफ टाइप के बारे में जानने वाली इकाइयों को यह समझने में मदद मिलती है कि Android Keystore अटेस्टेशन में मिलते-जुलते कॉन्सेप्ट कहां मौजूद हैं.
वीसीआई के दावे की पुष्टि |
|
अनुमानित वैल्यू की जगह |
iss |
कीस्टोर के रूट सर्टिफ़िकेट की सार्वजनिक कुंजी |
लागू नहीं |
iat |
|
लागू नहीं |
exp |
लीफ़ सर्टिफ़िकेट में मौजूद |
लागू नहीं |
attested_keys |
हर चेन के लीफ़ सर्टिफ़िकेट में मौजूद सार्वजनिक पासकोड |
लागू नहीं |
key_storage |
|
कार्ड जारी करने वाली कंपनी चुनी गई: |
user_authentication |
अटेस्टेशन एक्सटेंशन में |
कार्ड जारी करने वाली कंपनी चुनी गई: |
nonce |
|
प्रोटोकॉल से: वीसीआई में बताए गए nonce एंडपॉइंट से मिली |
certification |
लागू नहीं |
लागू नहीं |
स्टेटस |
लागू नहीं |
लागू नहीं |