Encryption and decryption flow in Network data Communication encryption system
Encryption process:
1. Data data sender A randomly generates an encryption key key to encrypt the data.
2. An encrypts key with the public key of data receiver B.
3. A carries on the hash calculation to the data data, and encrypts the hashA value with the private key A, namely carries on the digital signature.
4. A sends the public key, name, address, organization and other details to the certification authority CA,CA and issues the digital certificate to A.
5. Assemble the data blocks obtained from the above four steps and send them to the data receiver.
Decryption process (actually explaining the reverse process of the encryption process):
1. Send the digital certificate in the received data to CA,CA and send the public key A to B.
2. Decrypt the encrypted hash value with the public key A to get the hash value.
3. Decrypt the encrypted random key with private key B to get key.
4. Decrypt the encrypted data data with key to get the data data.
5. B calculates the hashB value of data by hash, and completes the data integrity check if hashB is equal to hashA.