Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor tr31_export() to use processing state object
* Copy export flags to processing state object. Eventually this will be removed from the context object. * Remove internal processing fields from context object and let context object parameter for tr31_export() be const * Let tr31_state_prepare_export() update final key block length in key block header At a high level, tr31_state_prepare_export() will populate a buffer containing the key block header and wrapped key, including key length obfuscation and padding. For format version A and C, the encrypted payload can easily be copied in such that the buffer can then be used for CBC-MAC generation. For format version B and D, the buffer can be used as-is for CMAC generation. This change is part of a wider effort to move the fields intended for internal use out of the context object where they are visible to the caller. Instead a new internal processing state object will hold these fields and ensure that they are properly cleansed.
- Loading branch information