From: Lukasz Kostyra Date: Thu, 7 Sep 2017 06:18:40 +0000 (+0200) Subject: ssflib: Fix to incorrect nonce len check in auth encryption X-Git-Tag: submit/tizen/20170914.115510~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e969df6cb237c262de9f50c4156f875a440627cb;p=platform%2Fcore%2Fsecurity%2Ftef-simulator.git ssflib: Fix to incorrect nonce len check in auth encryption Change-Id: Idc4c7a17f219bfc1325b24b14522526d5facbdf1 --- diff --git a/ssflib/src/ssf_crypto.cpp b/ssflib/src/ssf_crypto.cpp index fc37aef..c2af260 100644 --- a/ssflib/src/ssf_crypto.cpp +++ b/ssflib/src/ssf_crypto.cpp @@ -2292,8 +2292,8 @@ TEE_Result TEE_AEInit(TEE_OperationHandle operation, void* nonce, size_t nonceLe LOGE(SSF_LIB, "Key not set in operation"); CRYPTO_PANIC; } - // nonce check (must be equal to AES block size) - if (nonce == NULL || nonceLen != 16) { + // nonce check + if (nonce == NULL || nonceLen < 12) { LOGE(SSF_LIB, "Incorrect nonce provided"); CRYPTO_PANIC; }