The slave credential of the slave node, the encrypted message SN_Rand, the encrypted user session SN_U_Session, and the message of encryption information should be acquired by the master node in the second handshaking. After receiving these messages, the master node tries to verify the slave credential with the public key of the CA server and decrypts the message SN_Rand with the public key of the slave node that is extracted from the slave credential. If the slave credential is unacceptable and the decrypted message from SN_Rand is different to the original message CA_Rand, the master node treats the slave node as a fake node and terminates the communication with it. Otherwise, the slave node is authenticated by the master node. The master node then decrypts the encrypted user session with the public key SN_Pub of the slave node and the encrypted message with its private key MN_Prv to acquire the user session, cryptographic algorithms SCA, and the corresponding key SC_Key. If the user session from the slave node is not identical to the original user session U_Session, the master node sends its encrypted user session MN_U_Session again to the slave node and asks the slave node to confirm it with SN_U_Session. The similar operation is performed to the encryption information {SCA, SC_key} as well. The master node computes the hash value of the encryption information {SCA, SC_key} and compares it with the value that is decrypted with the public key SN_Pub of the slave node from the message SCA_Check. If the checking operation results a false value, the master node asks the slave node to generate and send back a new encryption information. These two checking operations aim to make sure that the user session as well as the encryption information is not altered by a third party, who could be able to perform an MITM attack to change the information and use this information to access the resource on the slave node.