Commit Graph

9 Commits

Author SHA1 Message Date
Alexey Milovidov
ac670d6868 Merge with master 2020-10-14 16:52:59 +03:00
Vasily Nemkov
8984f4b8c2 Empty string optimization for encryption 2020-10-14 16:33:07 +03:00
alexey-milovidov
200bc9b9b2
Update FunctionsAES.h 2020-09-17 00:57:26 +03:00
alexey-milovidov
60f91332b3
Update FunctionsAES.h 2020-09-17 00:52:01 +03:00
Vasily Nemkov
8129169ead Fixed Yandex-specific builds :( 2020-09-10 22:52:42 +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