A secure method of session key generation and authentication