Reverted to one function for key generation and testing.
Removing static key, nonce and message.