MySQL Enterprise Encryption Function Descriptions • asymmetric_verify( algorithm ,  digest_str ,  sig_str ,  pub_key_str ,  digest_type ) Verifies whether the signature string matches the digest string, and returns 1 or 0 to indicate whether verification succeeded or failed. digest_str  is the digest string. It can be generated by calling  create_digest() .  digest_type indicates the digest algorithm used to generate the digest string. sig_str  is the signature string. It can be generated by calling  asymmetric_sign() . pub_key_str  is the public key string of the signer. It corresponds to the private key passed to asymmetric_sign()  to generate the signature string and must be a valid key string in PEM format. algorithm  indicates the encryption algorithm used to create the key. Supported  algorithm  values:  ’RSA’ ,  ’DSA’ Supported  digest_type  values:  ’SHA224’ ,  ’SHA256’ ,  ’SHA384’ ,  ’SHA512’ -- Set the encryption algorithm and digest type SET @algo = ’RSA’; SET @dig_type = ’SHA224’; -- Create private/public key pair SET @priv = create_asymmetric_priv_key(@algo, 1024); SET @pub = create_asymmetric_pub_key(@algo, @priv); -- Generate digest from string SET @dig = create_digest(@dig_type, ’The quick brown fox’); -- Generate signature for digest and verify signature against digest SET @sig = asymmetric_sign(@algo, @dig, @priv, @dig_type); SET @verf = asymmetric_verify(@algo, @dig, @sig, @pub, @dig_type); • create_asymmetric_priv_key( algorithm , { key_len | dh_secret }) Creates a private key using the given algorithm and key length or DH secret, and returns the key as a binary string in PEM format. If key generation fails, the result is  NULL . Supported  algorithm  values:  ’RSA’ ,  ’DSA’ ,  ’DH’ Supported  key_len  values: The minimum key length in bits is 1,024. The maximum key length depends on the algorithm: 16,384 for RSA and 10,000 for DSA. These key-length limits are constraints imposed by OpenSSL. 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 DH keys, pass a shared DH secret instead of a key length. To create the secret, pass the key length to  create_dh_parameters() . This example creates a 2,048-bit DSA private key, then derives a public key from the private key: SET @priv = create_asymmetric_priv_key(’DSA’, 2048); 1600