MySQL Enterprise Encryption Function Reference • MYSQL_OPENSSL_UDF_DH_BITS_THRESHOLD : Maximum key length in bits for create_dh_parameters() . The minimum and maximum values for this variable are 1,024 and 10,000. •The underlying SSL library takes care of randomness initialization. •If the arguments are not suitable to permit a function to perform the requested operation, it returns  NULL or 0 as appropriate. This occurs, for example, if a function does not support a specified algorithm, a key length is too short or long, or a string expected to be a key string in PEM format is not a valid key. (OpenSSL imposes its own key-length limits, and server administrators can impose additional limits on maximum key length by setting environment variables. See Section 6.6.2, “MySQL Enterprise Encryption Usage and Examples” .) •For arguments of the wrong type or an incorrect number of arguments, each function returns an error. Several of the functions take an encryption algorithm argument. The following table summarizes the supported algorithms by function. Table 6.40 Supported Algorithms by Function Function Supported Algorithms asymmetric_decrypt() RSA asymmetric_derive() DH asymmetric_encrypt() RSA 1597 Name Description asymmetric_decrypt() Decrypt ciphertext using private or public key asymmetric_derive() Derive symmetric key from asymmetric keys asymmetric_encrypt() Encrypt cleartext using private or public key asymmetric_sign() Generate signature from digest asymmetric_verify() Verify that signature matches digest create_asymmetric_priv_key() Create private key create_asymmetric_pub_key() Create public key create_dh_parameters() Generate shared DH secret create_digest() Generate digest from string 6.6.3 MySQL Enterprise Encryption Function Reference 6.6.4 MySQL Enterprise Encryption Function Descriptions MySQL Enterprise Encryption functions have these general characteristics: The example uses Bourne shell syntax. The syntax for other shells may differ. To use any of these environment variables, set them in the environment of the process that starts the server. If set, their values take precedence over the maximum key lengths imposed by OpenSSL. For example, to set a maximum key length of 4,096 bits for DSA and RSA keys for create_asymmetric_priv_key() , set these variables: export MYSQL_OPENSSL_UDF_DSA_BITS_THRESHOLD=4096 export MYSQL_OPENSSL_UDF_RSA_BITS_THRESHOLD=4096 Table 6.39 MySQL Enterprise Encryption Functions