Search code examples
mysqlencryptionpublic-key-encryptionprivate-keyencryption-asymmetric

Does mysql have asymmetric encryption capabilities?


My Question is simple - is there a build in functionality, like AES_ENCRYPT / AES_DECRYPT, for asymmetric (public / private key) encryption in MySQL?

Sadly, I only find answers that involve PHP (to encrypt it in php), and stuff like that. I would like to keep it in MySQL, since the whole application logic is handled by procedures - and I would like to avoid ruining that by bringing in external languages to solve this issue.


Solution

  • There is no functionality for RSA encryption within MySQL. it's sort of an odd use case, so the MySQL folks probably haven't seen fit to implement it

    You'll have to do the RSA operations in the application layer, and pass the results into your procedures, unless you fancy implementing RSA within MySQL yourself (which I really cannot advise at all)