History log of /system/keymaster/include/keymaster/operation_table.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
dc877aea40979bb5a18206cd9cec7bb4f31442e2 15-May-2017 Janis Danisevskis <jdanis@google.com> UniquePtrize Operations

Have Operations handled by UniquePtrs. Also add
keymaster::remove_reference and keymaster::move to express
proper move semantics without requiring stl.

Test: VtsHalKeymasterV3_0TargetTest
Bug: 67358942
Change-Id: I2b1802835316daa93e424c1ce1f49a03d00d93ff
/system/keymaster/include/keymaster/operation_table.h
f3dc0b841da2c8938e4a8081ef6c6199ed92c876 15-May-2017 Janis Danisevskis <jdanis@google.com> Moved operation handle generation into the begin operation

I moved the generation of a operation handle into the operation
implementation. Random number generation is highly
implementation dependent, and the bookkeeping of operations is
very generic.
An AndroidKeymaster implementation that uses another legacy
keymaster implementation does not need either. But while the
bookkeeping is very lightweight and self contained, the random
number generation pulls in dependencies (here openssl) which
are not needed. Therefore, I decided to move the generation of
operation handles out of the OperationTable (bookkeeping). And
into the begin operation, where dependencies to crypto functionality
already exists.

Edit: This patch now also includes the fix for Bug: 65286954
Previously fixed by CL: I320c5d03911942e873680ba0d7ea91044920e936

Bug: 65286954
Test: VtsHalKeymasterV3_0TargetTest
Bug: 67358942
Change-Id: Idd27915e4f3db816d3257144fb9e1c664920ffba
/system/keymaster/include/keymaster/operation_table.h
41d5a7486e335387c8dd9437e0c84b285b5c7f28 12-May-2017 Janis Danisevskis <jdanis@google.com> Factoring GenerateRandom out of the KeymasterContext

GenerateRandom is never called by AndroidKeymaster and is, therefore,
not requiered to be part of the KeymasterContext interface.

This patch moves Generate Random out of KeymasterContext and introduces
a new abstract interface GenerateRandom. It also provides a default
openssl based impelemtation, SoftwareRandomSource.

As of this patch GenerateRandom is still called by OperationTable
which is part of the AndroidKeymaster core logic. This is why
KeymasterContext still implements the new RandomSource interface
unconditionally. This will change in a subsequent commit.

Test: VtsHalKeymasterV3_0TargetTest
Bug: 67358942
Change-Id: Ib16aeb80bf777d7b08d06deadae8a32de280f8ba
/system/keymaster/include/keymaster/operation_table.h
f54cc93ccf57a94f9a2c660dbf3e06494adf178d 11-May-2017 Janis Danisevskis <jdanis@google.com> Reorganize keymaster directories

Keymaster files have been reorganized into the following directories
- android_keymaster
The core android keymaster logic including some utilities that have
no special libray dependencies
- km_openssl
Openssl based implementation primitives of android keymaster. These
primitives can be used to implemented an openssl based software
implementation of AndroidKeymaster.
- legacy_support
Primitives implemented in terms of older keymaster hal version.
These primitives can be used to implement AndroidKeymaster in terms
of keymaster 0 or 1 hals. They are used to provide wrappers around
old keymaster hals, filling in missing features with software
implementations.
- contexts
Implementations of various contexts from pure software to legacy
hal hybrids.
- key_blob_utils
Support code for formatting keymaster key blobs including support
for legacy android keymaster blob formats.

Test: VtsHalKeymasterV3_0TargetTest
Bug: 67358942
Change-Id: Ia8eacd301a5c5fa5f5f625caafcec5d07e168249
/system/keymaster/include/keymaster/operation_table.h