Programs must not be hard-coded with the key, nor should the key be written down. If encryption is used widely within an organization, the public key system should be used. The public key system requires that the sender create the ciphertext on the basis of the receiver's public key. The receiver will deciper the information using their private key. This system will eliminate the passing of the key, which can threaten its secrecy.
Authentication means establishing proof of identity between two or more entities.
The purpose of this type of authentication is to provide users with services for which they are authorized and to deny access to services for which they are not. Static passwords scheme is when a user chooses or is assigned an account name and an associated password. In this scheme, after the user enters the password, the host then confirms that the password entered by the user is correct. One-time passwords scheme uses passwords that are used only one time to establish authentication, and are therefore not subject to snooping and replay attacks. Secret passwords always remain a secret to their owners, and unlike standard Unix passwords, are never transmitted over the network except through personal carelessness.