2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
승인 태그
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
KeyMint (이전 명칭: Keymaster) API는 이름-값 쌍인 승인 태그를 광범위하게 사용합니다. 가능한 각 태그에는 다음이 있습니다.
- 연결된 값이 있는 enum 이름
- 연결된 유형 (예: 정수, 바이트, 날짜, enum). 여기에는 여러 값이 허용되는지 여부에 관한 표시가 포함됩니다.
예를 들어 이름이 Tag::BLOCK_MODE
인 태그는 기본 enum 값이 4
이고 연결된 값이 반복 가능한 enum (이 경우 BlockMode
)임을 나타내는 TagType::ENUM_REP
유형 마커를 갖습니다.
태그는 API에서 두 가지 기능을 수행합니다.
- API에서 실행되는 작업의 매개변수로, 예를 들어 HMAC 서명 작업의
Tag::MAC_LENGTH
는 요청된 HMAC 길이를 나타냅니다.
- 키 특성으로서 특정 키에 영구적으로 바인딩된 값 (즉, 키 blob에 포함됨)입니다. 예를 들어
Tag::EC_CURVE
는 키가 어떤 타원 곡선을 사용하는지 나타냅니다.
각 키 특성은 시스템의 어느 부분에서 속성을 규제하는지 나타내는 보안 수준과 연결됩니다.
- 보안 수준이
TRUSTED_ENVIRONMENT
또는 STRONGBOX
인 키 특성이 보안 하드웨어에서 시행됩니다.
- 보안 수준이
SOFTWARE
또는 KEYSTORE
인 키 특성은 keystore2
시스템 서비스에서만 적용되므로 이러한 특성은 OS 손상에 대해 복원력이 없습니다.
많은 태그가 주요 특성 및 매개변수 역할을 합니다.
- 키 특성은 키에 허용되는 매개변수 집합을 나타냅니다. 예를 들면 다음과 같습니다.
- ECDSA 키의
Tag::PURPOSE
에는 SIGN
와 AGREE_KEY
가 모두 포함될 수 있습니다.
- AES 키의
Tag::BLOCK_MODE
에는 ECB, CBC, CTR 모드가 포함될 수 있습니다.
- 그러면
begin()
요청에 작업의 특정 매개변수 값이 포함됩니다(예:
begin()
에는 주요 특성의 Tag::PURPOSE
값 중 하나와 일치해야 하는 명시적 목적 매개변수가 있습니다.
- AES 작업의
begin()
는 params
필드에 Tag::BLOCK_MODE
의 단일 값을 포함해야 하며, 이 값은 키 특성의 값 중 하나와 일치해야 합니다.
이 이중 기능은 키 생성 또는 가져오기 작업에서 keyParams
로 전달된 태그 컬렉션과 특히 관련이 있습니다.
- 일부 태그는 키 생성 작업 자체의 매개변수 역할을 합니다. 예를 들어
Tag::CERTIFICATE_SUBJECT
태그는 반환된 X.509 인증서의 필드를 제어하여 (비대칭) 키 생성 프로세스에만 영향을 미칩니다.
- 다른 태그는 새로 생성된 키에 키 특성으로 바인딩되며 반환된 키 blob에 캡슐화되어 키와 영구적으로 연결됩니다.
태그 값에 관한 자세한 내용은 다음 HAL 인터페이스 사양을 참고하세요.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Authorization tags\n\nThe KeyMint (previously Keymaster) API makes extensive use of *authorization tags*, which are name-value pairs. Each possible tag has:\n\n- An enum name with associated value\n- An associated type (for example, integer, bytes, date, enum), which includes an indication of whether multiple values are allowed\n\n\u003cbr /\u003e\n\nFor example, the tag with name\n[`Tag::BLOCK_MODE`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/security/keymint/aidl/android/hardware/security/keymint/Tag.aidl?q=BLOCK_MODE)\nhas a base enum value of `4` and a `TagType::ENUM_REP` type\nmarker that indicates that the associated value is a repeatable enum (in this\ncase, `BlockMode`).\n\nTags perform a dual function on the API:\n\n- As parameters for an operation performed on the API, for example, the `Tag::MAC_LENGTH` on an HMAC signing operation indicates the requested HMAC length.\n- As *key characteristics* , values that are permanently bound to a particular key (that is, included in the key blob), for example, the `Tag::EC_CURVE` indicates which elliptic curve a key is for. Each key characteristic is associated with a security level that indicates which part of the system polices the attribute:\n - A key characteristic with security level `TRUSTED_ENVIRONMENT` or `STRONGBOX` is enforced in the secure hardware.\n - A key characteristic with security level `SOFTWARE` or `KEYSTORE` is enforced only by the `keystore2` system service (and so such a characteristic isn't resilient to OS compromise).\n\n\u003cbr /\u003e\n\nMany tags act as both key characteristics *and* parameters:\n\n- The key characteristics indicate the set of allowed parameters for a key, for example:\n - The `Tag::PURPOSE` of an ECDSA key might include both `SIGN` and `AGREE_KEY`.\n - The `Tag::BLOCK_MODE` for an AES key might include ECB, CBC, and CTR modes.\n- A `begin()` request then includes a specific parameter value for the operation, for example:\n - `begin()` has an explicit purpose parameter that must match one of the key characteristics' `Tag::PURPOSE` values.\n - `begin()` for an AES operation needs to include a single value for `Tag::BLOCK_MODE` in the `params` field, which must match one of the values in the key characteristics.\n\n\u003cbr /\u003e\n\nThis dual function is particularly relevant for the collection of tags passed\nas `keyParams` on a key generation or import operation.\n\n- Some of the tags act as parameters for the key generation operation itself. For example, the `Tag::CERTIFICATE_SUBJECT` tag affects only the (asymmetric) key generation process, by controlling a field in the returned X.509 certificate.\n- Other tags are bound to the newly generated key as key characteristics, and are encapsulated in the returned keyblob so that they're permanently associated with the key.\n\nDetailed information about tag values can be found in the following\nHAL interface specifications:\n\n- KeyMint --- All tags are defined in [`Tag.aidl`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/security/keymint/aidl/android/hardware/security/keymint/Tag.aidl) on the relevant Android release branch.\n- Keymaster --- Tags are defined in `platform/hardware/interfaces/keymaster/`\u003cvar translate=\"no\"\u003ekeymaster-version\u003c/var\u003e`/types.hal` for each respective `keymaster-version`, such as [`3.0/types.hal`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/keymaster/3.0/types.hal) for Keymaster 3 and [`4.0/types.hal`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/keymaster/4.0/types.hal) for Keymaster 4. For Keymaster 2 and below, tags are defined in [`platform/hardware/libhardware/include/hardware/keymaster_defs.h`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/libhardware/include_all/hardware/keymaster_defs.h)."]]