DX-67209 updated aes_encrypt/decrypt#29
DX-67209 updated aes_encrypt/decrypt#29xxlaykxx merged 8 commits intodremio:dremio-12.0-mainfrom xxlaykxx:DX-67209
Conversation
|
Thanks for opening a pull request! If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename the pull request title in the following format? or In the case of PARQUET issues on JIRA the title also supports: See also: |
cpp/src/gandiva/encrypt_utils.cc
Outdated
| } | ||
|
|
||
| if (!EVP_EncryptInit_ex(en_ctx, EVP_aes_128_ecb(), nullptr, | ||
| switch (key_len) { |
There was a problem hiding this comment.
This could be combined with the other similar code below into a helper function.
| if (key_data_len == 16 || key_data_len == 24 || key_data_len == 32) { | ||
| kAesBlockSize = static_cast<int64_t>(key_data_len); | ||
| } else { | ||
| gdv_fn_context_set_error_msg(context, "invalid key length"); | ||
| *out_len = 0; | ||
| return nullptr; |
There was a problem hiding this comment.
Don't the helper functions already check the length? I think it would be better to just do the check in one place since the code would be easier to read and better tested. It doesn't look like this path is being tested since the unit tests call the helper functions.
* DX-67209 updated aes_encrypt/decrypt
* DX-67209 updated aes_encrypt/decrypt
* DX-67209 updated aes_encrypt/decrypt
* DX-67209 updated aes_encrypt/decrypt
* DX-67209 updated aes_encrypt/decrypt
* DX-67209 updated aes_encrypt/decrypt
* DX-67209 updated aes_encrypt/decrypt
* DX-67209 updated aes_encrypt/decrypt
* DX-67209 updated aes_encrypt/decrypt
* DX-67209 updated aes_encrypt/decrypt
* DX-67209 updated aes_encrypt/decrypt
* DX-67209 updated aes_encrypt/decrypt
* DX-67209 updated aes_encrypt/decrypt
* DX-67209 updated aes_encrypt/decrypt
* DX-67209 updated aes_encrypt/decrypt
* DX-67209 updated aes_encrypt/decrypt
aes_ecrypt/decrypt support 128, 192, 254 bit key and this strict requirement - key should be 16 or 24 or 32 chars.
If not - error will be returned.