From 52137dc0b41657a30031f9d367c31abfd8e286bd Mon Sep 17 00:00:00 2001 From: DamonHD Date: Mon, 8 Feb 2016 23:14:55 +0000 Subject: [PATCH] TODO-721: bug fixes and improved comments --- OTAESGCM.zip | Bin 20636 -> 20739 bytes content/OTAESGCM/RELEASES_OTAESGCM.txt | 1 + .../OTAESGCM/utility/OTAESGCM_OTAESGCM.cpp | 24 ++++++++++-------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/OTAESGCM.zip b/OTAESGCM.zip index d9a87f8e6a0cb2e485d3db4d2016d364e6890b97..1aa032243e1ce8963d120ad06d28b22d1d43da78 100644 GIT binary patch delta 6028 zcmY+IRaDiDw#7Hyok}-IDq9Ib8tIad-lTwlAk7B;boZtNq&p-w-QC^YAl;q!eCOVA z#y#_4jqzLYHec3E%|!6aLMZP=C5oz-k+F9Xe;89$Tzuy>P{?S&T^|vz23>R;YUa=DFXDZ;=FHxDgGMUvI2g*kizwx8(dXOi!Kr9oa2qg}P8f!RsCnt_vpSSz-sL(A{SkL|0g zKkJTHl9lV-V-cD4{<0TQ-lkxN)!Wmt^p3U-Qb(bhhG<og zK@#56XJ81$mQiIgY_KLpdJ%mmnvs)zoC?Cdj2frumo@X~24Q+1@Mdn+r*}MRE=uvF zc^5d3$*{1JF6|_nby_Ehpq?stqn2%Zd%1Do8awGF9h-e-T1e76KF#<|gSl2QqHseQ ze)+*oZ%bJ_Z3|g5;p#s9wZpth%5$$<;LDZ=mBhHF!5KQU;O9*NhhZVa4EebqDo*{u zhV&U&@{S4lbY7%8mdysxAMOq92A@|Wv8e%!BM^#|dbd|Yw(SA><=&BJ@=#=dMd6iC z30q7i&hBpr8Te^u?QV{Lc8(vLJ=t9s8zWSO=yv3=!_Y0(++{L-#msZR+p$w!id;uF zGt<0l&#Wk|jcSGw(qUs(@Gv2(nO;`W6?>eqE&ZWIm13?D|^(tnwlHCizT zLJR^$$j5T=01@*4YuSG~|L921#$k~^_W6&Y&*1d1YE20l%bEERBfRpEal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.txt index 2b3c0fd..a112ddf 100644 --- a/content/OTAESGCM/RELEASES_OTAESGCM.txt +++ b/content/OTAESGCM/RELEASES_OTAESGCM.txt @@ -14,6 +14,7 @@ pending: DHD20150919: starting work on V0.2... Pending spec/API comment updates, safety with non-block-size data. DHD20160207: allowing NULL plaintext for zero-length in fixed32BTextSize12BNonce16BTagSimpleEnc_DEFAULT_STATELESS(). DHD20160207: allowing NULL ciphertext for zero-length in fixed32BTextSize12BNonce16BTagSimpleDec_DEFAULT_STATELESS(). + DHD20160208: bug fix and better documentation of when NULLs are allowed for fixed32BTextSize12BNonce16BTagSimple_XXX(). diff --git a/content/OTAESGCM/utility/OTAESGCM_OTAESGCM.cpp b/content/OTAESGCM/utility/OTAESGCM_OTAESGCM.cpp index d6d2f60..d8690f9 100644 --- a/content/OTAESGCM/utility/OTAESGCM_OTAESGCM.cpp +++ b/content/OTAESGCM/utility/OTAESGCM_OTAESGCM.cpp @@ -472,12 +472,13 @@ bool OTAES128GCMGenericBase::gcmDecrypt( // a multiple of the cipher's block size, or zero, // which implies likely requirement for padding of the plain text. // Note that the authenticated text size is not fixed, ie is zero or more bytes. +// The plaintext can be NULL, ciphertextOut not (a future version may allow it to be if plaintext is). // Returns true on success, false on failure. -bool fixed32BTextSize12BNonce16BTagSimpleEnc_DEFAULT_STATELESS(void *, - const uint8_t *key, const uint8_t *iv, - const uint8_t *authtext, uint8_t authtextSize, - const uint8_t *plaintext, - uint8_t *ciphertextOut, uint8_t *tagOut) +bool fixed32BTextSize12BNonce16BTagSimpleEnc_DEFAULT_STATELESS(void *const , + const uint8_t *const key, const uint8_t *const iv, + const uint8_t *const authtext, const uint8_t authtextSize, + const uint8_t *const plaintext, + uint8_t *const ciphertextOut, uint8_t *const tagOut) { if((NULL == key) || (NULL == iv) || (NULL == ciphertextOut) || (NULL == tagOut)) { return(false); } // ERROR OTAES128GCMGeneric<> i; // FIXME: ensure state is cleared afterwards. @@ -500,15 +501,16 @@ bool fixed32BTextSize12BNonce16BTagSimpleEnc_DEFAULT_STATELESS(void *, // a multiple of the cipher's block size, or zero, // which implies likely requirement for padding of the plain text. // Note that the authenticated text size is not fixed, ie is zero or more bytes. +// The ciphertext can be NULL, plaintextOut not (a future version may allow it to be if ciphertext is). // Decrypts/authenticates the output of fixed32BTextSize12BNonce16BTagSimpleEnc_DEFAULT_STATELESS.) // Returns true on success, false on failure. -bool fixed32BTextSize12BNonce16BTagSimpleDec_DEFAULT_STATELESS(void *state, - const uint8_t *key, const uint8_t *iv, - const uint8_t *authtext, uint8_t authtextSize, - const uint8_t *ciphertext, const uint8_t *tag, - uint8_t *plaintextOut) +bool fixed32BTextSize12BNonce16BTagSimpleDec_DEFAULT_STATELESS(void *const , + const uint8_t *const key, const uint8_t *const iv, + const uint8_t *const authtext, const uint8_t authtextSize, + const uint8_t *const ciphertext, const uint8_t *const tag, + uint8_t *const plaintextOut) { - if((NULL == key) || (NULL == iv) || (NULL == tag) || (NULL == tag)) { return(false); } // ERROR + if((NULL == key) || (NULL == iv) || (NULL == tag) || (NULL == plaintextOut)) { return(false); } // ERROR OTAES128GCMGeneric<> i; // FIXME: ensure state is cleared afterwards. return(i.gcmDecrypt(key, iv, ciphertext, (NULL == ciphertext) ? 0 : 32, (0 == authtextSize) ? NULL : authtext, authtextSize, tag, plaintextOut)); }