Need the RSA function to encrypt the data from the form on the website?

The nubsky question, but do not judge strictly, I only study. Suppose there is a site and online store written on php html manually, it is a form to fill customer data (name, delivery Address, telephone, etc.), these data are entered into the corresponding table in the database. The task was to implement the function based on RSA, which would have encrypted the data before sending it to database and decrypt them when displaying in the admin area. Ie in the database should be stored already encrypted data. Searched through Google anything sensible did not find (maybe I'm stupid). Ideally you need a specific code example with explanations for dummies.
Thank you.
July 8th 19 at 15:30
3 answers
July 8th 19 at 15:32
July 8th 19 at 15:34
In the browser using Javascript, see https://github.com/travist/jsencrypt
On the server, see your backend.
July 8th 19 at 15:36
And why are they encrypted in the database? To a database someone else has access? And where will then be the key?
On the instructions Yes, encrypted from prying eyes that may have access to the database. - nikita.Stracke commented on July 8th 19 at 15:39
or may be some other algorithm would you recommend? easier - nikita.Stracke commented on July 8th 19 at 15:42
: directly in the database encrypted. Mysql supports. And algorithms are reversible with a key. - athena9 commented on July 8th 19 at 15:45
: in the query SQL directly. - athena9 commented on July 8th 19 at 15:48
mean AES_ENCRYPT()? - nikita.Stracke commented on July 8th 19 at 15:51
Yes. - athena9 commented on July 8th 19 at 15:54

Find more questions by tags RSAPHP