Tags are name-value pairs on the KeyMint (previously Keymaster) API that can act as parameters for an operation performed on the API, characteristics that are permanently bound to a particular key, or both.
Each tag consists of an enum value and an associated type that indicates whether multiple
values are allowed. For example, the tag with name
BLOCK_MODE
has enum value 4
and a type, ENUM_REP
, that indicates that the
associated value is a repeatable enum.
Tags can be found at the following locations:
- KeyMint — All tags are defined in
Tag.aidl
on the relevant Android release branch. - Keymaster — Tags are defined in
platform/hardware/interfaces/keymaster/keymaster-version/types.hal
for each respectivekeymaster-version
, such as3.0/types.hal
for Keymaster 3 and4.0/types.hal
for Keymaster 4. For Keymaster 2 and below, tags are defined inplatform/hardware/libhardware/include/hardware/keymaster_defs.h
.