Syntax:
asymmetric_decrypt(algorithm, data_str, priv_key_str)

Decrypts an encrypted string using the given algorithm and key string,
and returns the resulting plaintext as a binary string. If decryption
fails, the result is NULL.

For the legacy version of this function in use before MySQL 8.0.29, see
https://dev.mysql.com/doc/refman/8.0/en/enterprise-encryption-functions
-legacy.html.

By default, the component_enterprise_encryption function assumes that
encrypted text uses the RSAES-OAEP padding scheme. The function
supports decryption for content encrypted by the legacy openssl_udf
shared library functions if the system variable
enterprise_encryption.rsa_support_legacy_padding is set to ON (the
default is OFF). When ON is set, the function also supports the
RSAES-PKCS1-v1_5 padding scheme, as used by the legacy openssl_udf
shared library functions. When OFF is set, content encrypted by the
legacy functions cannot be decrypted, and the function returns null
output for such content.

algorithm is the encryption algorithm used to create the key. The
supported algorithm value is 'RSA'.

data_str is the encrypted string to decrypt, which was encrypted with
asymmetric_encrypt().

priv_key_str is a valid PEM encoded RSA private key. For successful
decryption, the key string must correspond to the public key string
used with asymmetric_encrypt() to produce the encrypted string. The
asymmetric_encrypt() component function only supports encryption using
a public key, so decryption takes place with the corresponding private
key.

For a usage example, see the description of asymmetric_encrypt().

URL: https://dev.mysql.com/doc/refman/8.0/en/enterprise-encryption-functions.html

