Commit Graph

15 Commits

Author SHA1 Message Date
Alexander Tokmakov
3f6594f4c6 forbid old ctor of Exception 2023-01-23 22:18:05 +01:00
Duc Canh Le
e882b4f694 remove settings, add tryDecrypt function 2022-09-25 13:50:22 +08:00
Duc Canh Le
4c8c804e25 fix style 2022-09-13 15:47:52 +08:00
Duc Canh Le
9d94179217 try make code less ugly 2022-09-12 21:41:18 +08:00
Duc Canh Le
d901c4dca5 add option to return NULL when decrypt fail 2022-09-12 18:45:43 +08:00
Robert Schulze
deda29b46b
Pass const StringRef by value, not by reference
See #39224
2022-07-15 11:34:56 +00:00
Alexey Milovidov
5855668514 Remove trash 2022-06-22 06:23:35 +02:00
Alexey Milovidov
0cf88e0950
Revert "ClickHouse's boringssl module updated to the official version of the FIPS compliant." 2022-06-18 23:16:18 +03:00
Meena Renganathan
645e156af6 Updated the boringssl-cmake to match the latest broingssl module update 2022-04-06 14:52:33 -07:00
Vasily Nemkov
8984f4b8c2 Empty string optimization for encryption 2020-10-14 16:33:07 +03:00
alexey-milovidov
d97426fe9a
Update FunctionsAES.cpp 2020-09-17 00:47:43 +03:00
Vasily Nemkov
d6c84291c9 Fixed data race caused by EVP_CIPHER_fetch() 2020-09-08 16:28:52 +03:00
Vasily Nemkov
bdaa012239 Fixed compilation for older (pre-3.0.0) OpenSSL versions 2020-09-01 12:42:23 +03:00
Vasily Nemkov
7cc4118dab Fixed AES encrypt/decrypt performance
Improved execution time of EVP_DecryptInit_ex/EVP_EncryptInit_ex with some hacks
Fixed all-const case
2020-09-01 12:42:23 +03:00
Vasily Nemkov
b147ffcd43 encrypt, aes_encrypt_mysql, decrypt, aes_decrypt_mysql functions
Functions to encrypt/decrypt any input data with OpenSSL's ciphers
with custom key, iv, and add (-gcm mode only).

_mysql versions are 100% compatitable with corresponding MySQL functions

Supported modes depend on OpenSSL version, but generally are:
aes-{128,192,56}-{ecb,cbc,cfb1,cfb8,cfb128,ofb,gcm}

Please note that in a -gcm mode a 16-byte tag is appended to the ciphertext
on encryption and is expected to be found at the end of ciphertext on decryption.

Added tests that verify compatibility with MySQL functions,
and test vectors for GCM mode from OpenSSL.

Added masking rules for aes_X funtions
Rules are installed by default to config.d/query_masking_rules.xml
2020-09-01 12:42:15 +03:00