summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAjay Dudani <adudani@codeaurora.org>2013-05-15 21:07:58 -0700
committerVineeta Srivastava <vsrivastava@google.com>2013-05-17 10:16:48 -0700
commit70789f277025960f499d4155ac2ec1c79bc8e734 (patch)
treea676c9da71bc6da346eb9d968f2f4f1a61378a9f
parent0cd599c7c0494533f59aaa5fcf7475b36e30534d (diff)
downloadandroid_hardware_qcom_keymaster-70789f277025960f499d4155ac2ec1c79bc8e734.tar.gz
android_hardware_qcom_keymaster-70789f277025960f499d4155ac2ec1c79bc8e734.tar.bz2
android_hardware_qcom_keymaster-70789f277025960f499d4155ac2ec1c79bc8e734.zip
keymaster: Add support for larger key size
Added support for 3072/4096 bit key Bug: 8734191 Change-Id: I041fd65d4160b765ed38607e4237665bb47acc5d
-rw-r--r--keymaster_qcom.cpp2
-rw-r--r--keymaster_qcom.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/keymaster_qcom.cpp b/keymaster_qcom.cpp
index 0c388c7..f3907b0 100644
--- a/keymaster_qcom.cpp
+++ b/keymaster_qcom.cpp
@@ -706,7 +706,7 @@ static int qcom_km_open(const hw_module_t* module, const char* name,
}
dev->context = (void *)km_handle;
ret = (*km_handle->QSEECom_start_app)((struct QSEECom_handle **)&km_handle->qseecom,
- "/vendor/firmware/keymaster", "keymaster", 4096);
+ "/vendor/firmware/keymaster", "keymaster", 4096*2);
if (ret) {
ALOGE("Loading keymaster app failied");
free(km_handle);
diff --git a/keymaster_qcom.h b/keymaster_qcom.h
index 14aa497..0d6cf67 100644
--- a/keymaster_qcom.h
+++ b/keymaster_qcom.h
@@ -38,10 +38,10 @@ __BEGIN_DECLS
* module to recognize which API level of the client it is dealing with in
* the case of pre-compiled binary clients.
*/
-#define QCOM_KEYMASTER_API_VERSION 1
+#define QCOM_KEYMASTER_API_VERSION 2
#define KM_MAGIC_NUM (0x4B4D4B42) /* "KMKB" Key Master Key Blob in hex */
-#define KM_KEY_SIZE_MAX (256) /* 2048 bits */
+#define KM_KEY_SIZE_MAX (512) /* 4096 bits */
#define KM_IV_LENGTH (16) /* AES128 CBC IV */
#define KM_HMAC_LENGTH (32) /* SHA2 will be used for HMAC */