MySQL Forums
Forum List  »  Newbie

Re: RSA encrypting public key
Posted by: Georgi Kodinov
Date: August 23, 2016 06:52AM

Hello,

The ev_priv1 is a null due to a restriction in how OpenSSL operates on asymmetric encryption operates.
The actual error is:
error:0406D06E:rsa routines:RSA_padding_add_PKCS1_type_2:data too large for key size

Due to the narrow interface MySQL provides for UDFs we can't really report the error back to the calling client.

So we've documented the restriction in http://dev.mysql.com/doc/refman/5.7/en/enterprise-encryption-functions.html#function_asymmetric-encrypt:

"The str length cannot be greater than the key_str length − 11, in bytes."

And are returning a NULL (as http://dev.mysql.com/doc/refman/5.7/en/udf-return-values.html recommends in case of an error).

Georgi "Joro" Kodinov
MySQL SrvGen team lead
Plovdiv, Bulgaria

Options: ReplyQuote


Subject
Written By
Posted
August 17, 2016 02:15AM
Re: RSA encrypting public key
August 23, 2016 06:52AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.