Improve UNIQUE_ID generation
- Remove unused generate_unique_id() function.
- Fix unique ID generation code to use ATTESTATION_APPLICATION_ID
rather than APPLICATION_ID.
- Add km_openssl helper functions to build a UNIQUE_ID value from the
inputs and an HBK value for the HMAC-SHA256 function.
- Treat Tag::INCLUDE_UNIQUE_ID as a key generation parameter, similar
to the various ATTESTATION_ID_* tags.
Individual KeyMint implementations still need to provide an
implementation of AttestationContext::GenerateUniqueId(), but that
implementation can be a one-line invocation of
keymaster::generate_unique_id() using a suitable HBK.
Bug: 202487002
Test: VtsAidlKeyMintTargetTest
Change-Id: I3eb8cf22cf52a6d5c7a085ae497500800ecd5438
4 files changed