From 0224cfe3e0ae9cfe4fce43aa1c787325db2b354a Mon Sep 17 00:00:00 2001 From: Max Bires Date: Tue, 17 Aug 2021 14:25:57 +0000 Subject: [PATCH] Revert "AesInvalidKeySize skip 192 on SB devices" This reverts commit eb8b0577e87ac19fce7c307b542fa9406857d48a. Reason for revert: Broke a different TEE implementation Bug: 196922051 Change-Id: I9f136d237bd06bfe2a1cc29d11bb1fbe0b8ace5e --- keymaster/4.0/vts/functional/KeymasterHidlTest.cpp | 4 ---- .../android/hardware/security/keymint/IKeyMintDevice.aidl | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/keymaster/4.0/vts/functional/KeymasterHidlTest.cpp b/keymaster/4.0/vts/functional/KeymasterHidlTest.cpp index d326334510..d0ad433464 100644 --- a/keymaster/4.0/vts/functional/KeymasterHidlTest.cpp +++ b/keymaster/4.0/vts/functional/KeymasterHidlTest.cpp @@ -21,7 +21,6 @@ #include #include -#include #include #include @@ -686,9 +685,6 @@ std::vector KeymasterHidlTest::InvalidKeySizes(Algorithm algorithm) { case Algorithm::EC: return {224, 384, 521}; case Algorithm::AES: - // The HAL language was clarified to exclude AES key sizes of 192 for StrongBox - // instances on devices launched on API Level 31 and above. - if (property_get_int32("ro.board.first_api_level", 0) < 31) return {}; return {192}; default: return {}; diff --git a/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl b/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl index 4e81e71826..2241735928 100644 --- a/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl +++ b/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl @@ -96,8 +96,7 @@ import android.hardware.security.secureclock.TimeStampToken; * * o AES * - * - TRUSTED_ENVIRONMENT IKeyMintDevices must support 128, 192 and 256-bit keys. - * STRONGBOX IKeyMintDevices must only support 128 and 256-bit keys. + * - 128 and 256-bit keys * - CBC, CTR, ECB and GCM modes. The GCM mode must not allow the use of tags smaller than 96 * bits or nonce lengths other than 96 bits. * - CBC and ECB modes must support unpadded and PKCS7 padding modes. With no padding CBC and