In order to solve the practical problem that the security of computer network information cannot be guaranteed, which seriously affects the network performance, the author proposes a public key data encryption system based on PKI. The system proposed by the author is based on the public key cryptographic algorithm RSA, including implementation of data encryption and digital signature and key distribution, an improved RSA algorithm is proposed for the slow speed of RSA. The result obtained is as follows: after reasonable selection of parameters and the use of optimized algorithms (also known as combined algorithms), the RSA algorithm is about 1.0% to 2% more efficient than the traditional algorithm, to a certain extent, the operation efficiency of the RSA algorithm is improved, and the purpose of improving the RSA algorithm is achieved. It is proved that the public key data encryption system is of great significance for modern computer network information encryption and maintaining a green and secure network environment.