Introduction - If you have any usage issues, please Google them yourself
Complete the asymmetric public key certificate-based key distribution work
Description:
(1) as the communication of both A and B, have a common trusted third party CA, the CA generates a public key certificate for each person and the corresponding private key and distributed to A, B.
(2) A and B respectively to provide their own public key certificates to each other both in the local verify the reliability of each other s public key certificate (assuming A, B has received CA s public key), then A with B s public key encryption 1 the data X (integer, can be their own definition, such as 100) and send it to B, B with their own private key decrypted by the data X, and then consult a good function by F (eg F (X) = 2* X) calculated F (X), then encrypted using A s public key sent to A A locally with their own private key to decrypt obtained F (x), calculated with the local F (X) are compared, if the same description Successful public-key distribution.
(3) A with B s public key on an