diff options
author | Shawn Willden <swillden@google.com> | 2015-05-16 09:20:59 -0600 |
---|---|---|
committer | Shawn Willden <swillden@google.com> | 2015-05-18 09:08:14 -0600 |
commit | b6837e7a62a1192e33beef586282812239ee8b28 (patch) | |
tree | 751bb1c86c25e4c3b86324218bbafd84565fc20b /include | |
parent | 67380a948d80ce62455b1ec9ed8283e3349498c6 (diff) | |
download | keymaster-b6837e7a62a1192e33beef586282812239ee8b28.tar.gz |
Remove references to Google in Android keymaster reference implementation.
Change-Id: I05de61353fc806b90232fab7c1d1cf76aefa35fc
Diffstat (limited to 'include')
-rw-r--r-- | include/keymaster/android_keymaster.h (renamed from include/keymaster/google_keymaster.h) | 27 | ||||
-rw-r--r-- | include/keymaster/android_keymaster_messages.h (renamed from include/keymaster/google_keymaster_messages.h) | 10 | ||||
-rw-r--r-- | include/keymaster/android_keymaster_utils.h (renamed from include/keymaster/google_keymaster_utils.h) | 6 | ||||
-rw-r--r-- | include/keymaster/key_blob.h | 2 | ||||
-rw-r--r-- | include/keymaster/soft_keymaster_device.h | 4 |
5 files changed, 26 insertions, 23 deletions
diff --git a/include/keymaster/google_keymaster.h b/include/keymaster/android_keymaster.h index 3f904d6..7f8e65f 100644 --- a/include/keymaster/google_keymaster.h +++ b/include/keymaster/android_keymaster.h @@ -14,11 +14,11 @@ * limitations under the License. */ -#ifndef SYSTEM_KEYMASTER_GOOGLE_KEYMASTER_H_ -#define SYSTEM_KEYMASTER_GOOGLE_KEYMASTER_H_ +#ifndef SYSTEM_KEYMASTER_ANDROID_KEYMASTER_H_ +#define SYSTEM_KEYMASTER_ANDROID_KEYMASTER_H_ +#include <keymaster/android_keymaster_messages.h> #include <keymaster/authorization_set.h> -#include <keymaster/google_keymaster_messages.h> namespace keymaster { @@ -27,11 +27,14 @@ class UnencryptedKeyBlob; class OperationTable; /** - * OpenSSL-based Keymaster backing implementation, for use as a pure software implmentation - * (softkeymaster) and in a trusted execution environment (TEE), like ARM TrustZone. This class - * doesn't actually implement the Keymaster HAL interface, instead it implements an alternative API - * which is similar to and based upon the HAL, but uses C++ "message" classes which support - * serialization. + * This is the reference implementation of Keymaster. In addition to acting as a reference for + * other Keymaster implementers to check their assumptions against, it is used by Keystore as the + * default implementation when no secure implementation is available, and may be installed and + * executed in secure hardware as a secure implementation. + * + * Note that this class doesn't actually implement the Keymaster HAL interface, instead it + * implements an alternative API which is similar to and based upon the HAL, but uses C++ "message" + * classes which support serialization. * * For non-secure, pure software implementation there is a HAL translation layer that converts the * HAL's parameters to and from the message representations, which are then passed in to this @@ -41,10 +44,10 @@ class OperationTable; * the TEE. In the TEE implementation there's another component which deserializes the messages, * extracts the relevant parameters and calls this API. */ -class GoogleKeymaster { +class AndroidKeymaster { public: - GoogleKeymaster(size_t operation_table_size); - virtual ~GoogleKeymaster(); + AndroidKeymaster(size_t operation_table_size); + virtual ~AndroidKeymaster(); void SupportedAlgorithms(SupportedResponse<keymaster_algorithm_t>* response) const; void SupportedBlockModes(keymaster_algorithm_t algorithm, keymaster_purpose_t purpose, @@ -100,4 +103,4 @@ class GoogleKeymaster { } // namespace keymaster -#endif // SYSTEM_KEYMASTER_GOOGLE_KEYMASTER_H_ +#endif // SYSTEM_KEYMASTER_ANDROID_KEYMASTER_H_ diff --git a/include/keymaster/google_keymaster_messages.h b/include/keymaster/android_keymaster_messages.h index 22a3dec..3e1059f 100644 --- a/include/keymaster/google_keymaster_messages.h +++ b/include/keymaster/android_keymaster_messages.h @@ -14,15 +14,15 @@ * limitations under the License. */ -#ifndef SYSTEM_KEYMASTER_GOOGLE_KEYMASTER_MESSAGES_H_ -#define SYSTEM_KEYMASTER_GOOGLE_KEYMASTER_MESSAGES_H_ +#ifndef SYSTEM_KEYMASTER_ANDROID_KEYMASTER_MESSAGES_H_ +#define SYSTEM_KEYMASTER_ANDROID_KEYMASTER_MESSAGES_H_ #include <assert.h> #include <stdlib.h> #include <string.h> #include <keymaster/authorization_set.h> -#include <keymaster/google_keymaster_utils.h> +#include <keymaster/android_keymaster_utils.h> namespace keymaster { @@ -49,7 +49,7 @@ const uint32_t ADD_RNG_ENTROPY = 8; * * Because message version selection is purely a client-side issue, all messages default to using * the latest version (MAX_MESSAGE_VERSION). Client code must take care to check versions and pass - * correct version values to message constructors. The GoogleKeymaster implementation always uses + * correct version values to message constructors. The AndroidKeymaster implementation always uses * the default, latest. * * Note that this approach implies that GetVersionRequest and GetVersionResponse cannot be @@ -401,4 +401,4 @@ struct GetVersionResponse : public KeymasterResponse { } // namespace keymaster -#endif // SYSTEM_KEYMASTER_GOOGLE_KEYMASTER_MESSAGES_H_ +#endif // SYSTEM_KEYMASTER_ANDROID_KEYMASTER_MESSAGES_H_ diff --git a/include/keymaster/google_keymaster_utils.h b/include/keymaster/android_keymaster_utils.h index e6f2345..20afcdd 100644 --- a/include/keymaster/google_keymaster_utils.h +++ b/include/keymaster/android_keymaster_utils.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef SYSTEM_KEYMASTER_GOOGLE_KEYMASTER_UTILS_H_ -#define SYSTEM_KEYMASTER_GOOGLE_KEYMASTER_UTILS_H_ +#ifndef SYSTEM_KEYMASTER_ANDROID_KEYMASTER_UTILS_H_ +#define SYSTEM_KEYMASTER_ANDROID_KEYMASTER_UTILS_H_ #include <stdint.h> #include <string.h> @@ -208,4 +208,4 @@ template <typename T> T hton(T t) { } // namespace keymaster -#endif // SYSTEM_KEYMASTER_GOOGLE_KEYMASTER_UTILS_H_ +#endif // SYSTEM_KEYMASTER_ANDROID_KEYMASTER_UTILS_H_ diff --git a/include/keymaster/key_blob.h b/include/keymaster/key_blob.h index d1eceb1..b2a3778 100644 --- a/include/keymaster/key_blob.h +++ b/include/keymaster/key_blob.h @@ -24,8 +24,8 @@ #include <UniquePtr.h> #include <hardware/keymaster_defs.h> +#include <keymaster/android_keymaster_utils.h> #include <keymaster/authorization_set.h> -#include <keymaster/google_keymaster_utils.h> #include <keymaster/serializable.h> namespace keymaster { diff --git a/include/keymaster/soft_keymaster_device.h b/include/keymaster/soft_keymaster_device.h index 87be472..18b1aaf 100644 --- a/include/keymaster/soft_keymaster_device.h +++ b/include/keymaster/soft_keymaster_device.h @@ -21,7 +21,7 @@ #include <hardware/keymaster1.h> -#include <keymaster/google_keymaster.h> +#include <keymaster/android_keymaster.h> #include <keymaster/logger.h> #include <UniquePtr.h> @@ -147,7 +147,7 @@ class SoftKeymasterDevice { keymaster_operation_handle_t operation_handle); keymaster1_device_t device_; - UniquePtr<GoogleKeymaster> impl_; + UniquePtr<AndroidKeymaster> impl_; }; } // namespace keymaster |