In today’s real world, a handshake is a kind of customary greeting between two people. The same way a computer handshake serves as a greeting between two computer systems . It is commonly used to initialize a network connection between two hosts.
A computer handshake can be completed between two systems that communicate with each other in a similar protocol.
These two systems can be either a client and server or two computers in a P2P network. These handshake confirm the identities of the connecting systems and allow them to have additional communication between them.
Handshaking on a network is commonly called a 3-Way Handshake or “ SYN-SYN-ACK. “A successful handshake involves about seven steps:
1. Host A sends a synchronize (SYN) packet to Host B.
2. Host B receives the SYN request of Host A.
3. Host B then sends a synchronize acknowledgment (SYN-ACK) message to Host A.
4. Host A receives Host B’s SYN-ACK message.
5. Host A sends an acknowledgment (ACK) message to Host B.
6. Host B receives Host A’s ACK message.
7. This makes a connection established between the two systems.
When a system initiate a handshake, there are three possible outcomes:
1. No response – If the handshake that the system receives is not available or does not support the protocol that the initiating system uses, it does not respond to the request.
2. Connection refused – In this, the system that receives the handshake is available and understands that request, but it denies the connection.
3. Connection accepted – In this, the system that receives handshake is available, then receives the request, and then also accepts the connection.
In this only handshake is completed in the last or third result. At the same time if a handshake is successful, then communication and transferring of data between the two systems starts in this established protocol.
For example, protocols that use handshaking include TCP, TLS, and SSL .