Michael Smith has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/20447 )

Change subject: IMPALA-13039: AES Encryption/ Decryption Support in Impala
......................................................................


Patch Set 15:

(9 comments)

http://gerrit.cloudera.org:8080/#/c/20447/15//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/20447/15//COMMIT_MSG@31
PS15, Line 31: Multiple AES modes:GCM, CFB, CTR for encryption, and GCM, CFB, 
CTR
nit: I'd add a space after ':'


http://gerrit.cloudera.org:8080/#/c/20447/13/be/src/exprs/string-functions-ir.cc
File be/src/exprs/string-functions-ir.cc:

http://gerrit.cloudera.org:8080/#/c/20447/13/be/src/exprs/string-functions-ir.cc@1877
PS13, Line 1877:
> Done
nit: prefer using Substitute for concatenation, so

  Substitute("IV vector required for $0 mode", 
encryption_key.ModeToString(cipher_mode)).c_str()


http://gerrit.cloudera.org:8080/#/c/20447/15/be/src/exprs/string-functions-ir.cc
File be/src/exprs/string-functions-ir.cc:

http://gerrit.cloudera.org:8080/#/c/20447/15/be/src/exprs/string-functions-ir.cc@2102
PS15, Line 2102:     ctx->SetError(("IV vector required for " +
nit: use Substitute here as well.


http://gerrit.cloudera.org:8080/#/c/20447/15/be/src/exprs/string-functions.h
File be/src/exprs/string-functions.h:

http://gerrit.cloudera.org:8080/#/c/20447/15/be/src/exprs/string-functions.h@138
PS15, Line 138:   /// AES encryption functions in impala, using openssl 
libraries
nit: Impala and OpenSSL are proper nouns, should use correct capitalization


http://gerrit.cloudera.org:8080/#/c/20447/15/be/src/util/openssl-util.h
File be/src/util/openssl-util.h:

http://gerrit.cloudera.org:8080/#/c/20447/15/be/src/util/openssl-util.h@137
PS15, Line 137: /// (2) The plaintext and the Additional Authenticated 
Data(AAD) are the two
nit: space between "Data" and "(AAD)".


http://gerrit.cloudera.org:8080/#/c/20447/15/be/src/util/openssl-util.h@181
PS15, Line 181:       return mode_ == AES_CIPHER_MODE::AES_256_GCM
Line 181 should be intended 2 from the function definition, and the following 
line (182) should be indented 4 from this line. As in

  return mode_ == AES_CIPHER_MODE::AES_256_GCM
      || mode_ == AES_CIPHER_MODE::AES_128_GCM;


http://gerrit.cloudera.org:8080/#/c/20447/15/be/src/util/openssl-util.h@187
PS15, Line 187:       return mode_ == AES_CIPHER_MODE::AES_256_ECB
ditto


http://gerrit.cloudera.org:8080/#/c/20447/13/be/src/util/openssl-util.cc
File be/src/util/openssl-util.cc:

http://gerrit.cloudera.org:8080/#/c/20447/13/be/src/util/openssl-util.cc@382
PS13, Line 382: AES_CIPHER_MODE EncryptionKey::GetSupportedDefaultMode() {
              :   if (IsModeSupport
> Default is basically for fallback modes while INVALID refers to a wrong mod
There's no difference in how they're handled here, so you could use fallthrough

  case AES_CIPHER_MODE::INVALID:
  default:
    return false;


http://gerrit.cloudera.org:8080/#/c/20447/13/be/src/util/openssl-util.cc@407
PS13, Line 407:     return AES_CIPHER_MODE::AES_256_GCM;
> Done
I don't see it changed.



--
To view, visit http://gerrit.cloudera.org:8080/20447
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3902f2b1d95da4d06995cbd687e79c48e16190c9
Gerrit-Change-Number: 20447
Gerrit-PatchSet: 15
Gerrit-Owner: Pranav Lodha <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Daniel Becker <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Noemi Pap-Takacs <[email protected]>
Gerrit-Reviewer: Pranav Lodha <[email protected]>
Gerrit-Comment-Date: Mon, 19 Aug 2024 17:02:52 +0000
Gerrit-HasComments: Yes

Reply via email to