key-exchange protocol receive and parse messages. (Not Tested)