CKM: Don't use IV less than 12 bytes for TZ Backend 74/297174/2
authorDongsun Lee <ds73.lee@samsung.com>
Fri, 11 Aug 2023 06:18:22 +0000 (15:18 +0900)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Fri, 11 Aug 2023 09:38:24 +0000 (11:38 +0200)
Change-Id: I19b51a312e6ac29bb09f927a10db4571acca470a

src/ckm/unprivileged/encryption-decryption.cpp

index 1073ca1871c8f3afac1c0ca76da707b43426edc9..3da42d26f13de0937edc6b216ef1d68c89333160 100644 (file)
@@ -842,8 +842,11 @@ void testGcmDifferentIvSizes(const Algo& algo)
     // add AES GCM key
     KeyAliasPair aliases = getKey(algo, PRIMARY);
 
+#ifndef TZ_BACKEND
+    // TZ Backend doesn't support IV with less than 12.
     testGcmIvSize(IV1,   aliases);
     testGcmIvSize(IV11,  aliases);
+#endif
     testGcmIvSize(IV12,  aliases);
     testGcmIvSize(IV17,  aliases);
     testGcmIvSize(IV128, aliases);