Current location - Quotes Website - Signature design - C language socket encryption, AES+RSA or SSL in Openssl?
C language socket encryption, AES+RSA or SSL in Openssl?
1. Use RSA to securely transmit the seed (32 bytes) required for aes to generate the key.

2. Use aes_encrypt/aes_decrypt to encrypt/decrypt the business data on the socket. In theory, only aes is needed to ensure the whole process, but the aes-key required for AES encryption is a structure.

If the structure is transmitted through the network, it needs to be network coded. There is no ready-made API in openssl, so RSA is introduced to complete the first secure transmission to ensure that Seed will not be eavesdropped.