Add key blob format that supports secure deletion

This CL adds a new key blob format that supports use of two additional
secrets in the derivation of key encryption keys, a "factory reset"
secret and a "secure deletion" secret.  Both secrets are intended to
be kept in secure, tamper-resistant storage.  The factory reset secret
is a single secret that is used in KEK derivation for all KM keys and
remains unchanged until the device is factory reset.  The secure
deletion secret is a per-key secret used to secure rollback resistant
and single-use keys.  When a rollback resistant key is deleted, or a
single-use key is used, the secure deletion secret must be erased.
This ensures that the key blob can never be decrypted.

The format doesn't specify the sizes of the factory reset and secure
deletion secrets, but they should provide significant entropy.

Bug: 187105270
Test: keymaster_tests
Change-Id: I64b36f631a4cc6f304cf2c6435c668fba9aa4377
Merged-In: I64b36f631a4cc6f304cf2c6435c668fba9aa4377
10 files changed