Add auth token parsing to IKeymasterDevice.hal
Auth tokens have an unfortunate dual character. To most of the system they are opaque blobs that are intended only to be obtained from one HAL (e.g. gatekeeper or fingerprint) and passed to another HAL (keymaster), but keystore actually needs to extract some bits of information from them in order to determine which of the available blobs should be provided for a given keymaster key operation. This CL adds a method that resolves this dual nature by moving the responsibility of parsing blobs to the HAL so that no component of the framework has to make any assumptions about their content and all can treat them as fully opaque. This still means that the various HAL implementers have to agree on content, but they also have to agree on an HMAC key which much be securely distributed to all at every boot, so asking them to agree on an auth token format is perfectly acceptable. But now the Android system doesn't have to care about the format. Bug: 32962548 Test: CTS tests pass, plus manual testing. Change-Id: I78aa6e4ea9c5d8f34906b0969909387e2c5894e6
Loading
Please register or sign in to comment