Skip to content

encryption: change to use openssl EVP API#5

Merged
empiredan merged 2 commits intopegasus-kv:v8.3.2-pegasus-encryptfrom
acelyc111:my_enc2
Aug 7, 2023
Merged

encryption: change to use openssl EVP API#5
empiredan merged 2 commits intopegasus-kv:v8.3.2-pegasus-encryptfrom
acelyc111:my_enc2

Conversation

@acelyc111
Copy link
Copy Markdown
Member

@acelyc111 acelyc111 commented Jul 21, 2023

apache/incubator-pegasus#1575

Cherry-pick from tikv@3d44a33

Summary:
Instead of using openssl's raw AES_encrypt and AES_decrypt API, which is a low level call to encrypt or decrypt exact one block (16 bytes), we change to use the EVP_* API. The former is deprecated, and will use the default C implementation without AES-NI support. Also the EVP API is capable of handing CTR mode on its own.

Test Plan:
will add tests

Signed-off-by: Yi Wu yiwu@pingcap.com

@acelyc111 acelyc111 changed the base branch from v8.3.2-pegasus to v8.3.2-pegasus-encrypt August 7, 2023 07:47
Summary:
Instead of using openssl's raw `AES_encrypt` and `AES_decrypt` API, which is a low level call to encrypt or decrypt exact one block (16 bytes), we change to use the `EVP_*` API. The former is deprecated, and will use the default C implementation without AES-NI support. Also the EVP API is capable of handing CTR mode on its own.

Test Plan:
will add tests

Signed-off-by: Yi Wu <yiwu@pingcap.com>
@empiredan empiredan merged commit bcb12d2 into pegasus-kv:v8.3.2-pegasus-encrypt Aug 7, 2023
acelyc111 added a commit that referenced this pull request Aug 16, 2023
apache/incubator-pegasus#1575

Cherry-pick from
tikv@3d44a33

Summary:
Instead of using openssl's raw `AES_encrypt` and `AES_decrypt` API,
which is a low level call to encrypt or decrypt exact one block (16
bytes), we change to use the `EVP_*` API. The former is deprecated, and
will use the default C implementation without AES-NI support. Also the
EVP API is capable of handing CTR mode on its own.

Test Plan:
will add tests

Signed-off-by: Yi Wu <yiwu@pingcap.com>

---------

Signed-off-by: Yi Wu <yiwu@pingcap.com>
Co-authored-by: yiwu-arbug <yiwu@pingcap.com>
acelyc111 added a commit that referenced this pull request Sep 15, 2023
apache/incubator-pegasus#1575

Cherry-pick from
tikv@3d44a33

Summary:
Instead of using openssl's raw `AES_encrypt` and `AES_decrypt` API,
which is a low level call to encrypt or decrypt exact one block (16
bytes), we change to use the `EVP_*` API. The former is deprecated, and
will use the default C implementation without AES-NI support. Also the
EVP API is capable of handing CTR mode on its own.

Test Plan:
will add tests

Signed-off-by: Yi Wu <yiwu@pingcap.com>

---------

Signed-off-by: Yi Wu <yiwu@pingcap.com>
Co-authored-by: yiwu-arbug <yiwu@pingcap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants