디지털 사용자 인증 정보에 하드웨어 기반의 증명 구현

OpenID for Verifiable Credential Issuance (OpenID4VCI) 사양을 사용하는 일반적인 디지털 사용자 인증 정보 발급 흐름에서 발급기관은 서명할 사용자 인증 정보 내의 키가 안전한 위치에 저장되어 있는지 알아야 합니다. android_keystore_attestation 증명 유형(OpenID4VCI와 함께 사용할 형식)은 Android 키 저장소에서 하드웨어 서명된 보고서를 제공하여 키가 신뢰할 수 있는 실행 환경(TEE) 또는 StrongBox에 잠겨 있고 내보내거나 클론할 수 없도록 합니다.

하드웨어 증명 개요

키가 Android 키 저장소에서 생성되면 시스템에서 증명 인증서를 생성할 수 있습니다. 이 인증서는 기기의 하드웨어로 보호되는 키로 서명되며, 이 키는 Google에서 보유한 신뢰할 수 있는 루트로 다시 연결됩니다.

android_keystore_attestation 증명은 X.509 인증서 체인 배열입니다. 각 체인은 단일 인증 키를 나타내며 리프 인증서와 중간 인증서로 구성됩니다.

  • 리프 인증서: 키와 Android별 증명 확장 프로그램을 포함합니다.
  • 중간 인증서: 리프를 Android 루트에 연결합니다.

인증 단계

발급기관은 증명에 대해 여러 유효성 검사를 실행해야 합니다.

  • 체인에서 Android 증명 확장 프로그램 (일반적으로 리프 인증서)이 포함된 인증서를 찾습니다. 이 인증서에는 Android 키 저장소에서 생성한 키의 증명 데이터가 포함되어 있습니다.
  • 확장 프로그램의 attestationChallenge 필드가 재생 공격을 방지하기 위해 프로토콜에서 제공한 c_nonce와 일치하는지 확인합니다.
  • 관심 있는 확장 프로그램의 모든 어설션 값을 확인합니다.
  • Android 키 저장소 인증서에 대해 폐기 확인을 실행합니다.

증명 증명의 값은 여러 소스에서 가져옵니다.

  • 발급기관: 다양한 값이 발급기관에서 제공되며 가장 일반적인 값은 프레젠테이션 시 필터링할 수 있도록 발급기관 메타데이터 형식으로 배치됩니다.
  • 소지자: 패키지 이름 및 서명과 같은 값은 소지자로부터 가져옵니다. 이러한 값은 표준 발급 절차를 통해 공유되지 않으며 소지자로부터 독립적으로 가져와야 합니다.
  • 프로토콜: attestationChallenge가 포함된 nonce와 같은 값은 프로토콜에서 가져옵니다.

증명 데이터 검증에 관한 자세한 안내는 다음 리소스를 참고하세요.

증명 증명 형식

사용자 인증 정보 요청에서 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 키 저장소에 매핑

이 표에서는 표준 OpenID4VCI 증명 증명 유형에 익숙한 항목이 Android 키 저장소 증명 내에서 유사한 개념이 있는 위치를 이해하는 데 도움이 되는 정보 매핑을 제공합니다.

VCI 증명 클레임

android_keystore_attestation 위치

예상 값 위치

iss

키 저장소 루트 인증서의 공개 키

해당 없음

iat

증명 확장 프로그램의 creationDateTime

해당 없음

exp

리프 인증서의 validUntil 필드

해당 없음

attested_keys

각 체인의 리프 인증서에 포함된 공개 키

해당 없음

key_storage

증명 확장 프로그램의 keyMintSecurityLevel

발급기관 선택: 발급기관 메타데이터의 key_mint_security_level 필드

user_authentication

증명 확장 프로그램의 userAuthTypenoAuthRequired

발급기관 선택: 발급기관 메타데이터의 user_auth_types 필드

nonce

증명 확장 프로그램의 attestationChallenge

프로토콜에서: c_nonce VCI에 설명된 nonce 엔드포인트의 값

certification

해당 없음

해당 없음

status

해당 없음

해당 없음