Crafting the Three-way Handshake