RSA encryption and decryption in Mini Program because the source code can be obtained by a third party, that is, the key will also be leaked, how to solve this problem.

how to securely implement RSA encryption and decryption in Mini Program?

forget where to see an article, through the simulator and root permissions to get WeChat Mini Programs"s source file. If you want to complete the RSA encryption and decryption in WeChat Mini Programs, you have to store the key file locally, which leads to the disclosure of the key.


both public and private keys exist at the front end?
you are really a programming genius.
and Mini Program's front-end code is not root, but there is a way to get it


generally speaking, RSA encryption and decryption requires two parties. One party encrypts it with the public key and the other decrypts it with the private key. Are you going to encrypt or decrypt in Mini Program? What's the point if both encryption and decryption are there?

can you specify the specific requirements?


the client puts public key , and the server puts private key .

the response data of the server is encrypted with the private key of the server, and Mini Program is decrypted with the public key.
the data submitted by Mini Program is encrypted with Mini Program public key and decrypted by the server with private key.

if you say that people can encrypt and decrypt the request / response even if they get your public key, there is no way. But it can prevent most people.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35aee-2bfa8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35aee-2bfa8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?