A key is a parameter used in a cipher algorithm that determines:
It's the only secret parameter that protect the anonymity of the transformation of plaintext into ciphertext (encryption) , and vice versa (decryption).
In designing security systems, it is wise to assume that the details of the cryptographic algorithm are already available to the attacker. This is known as:
The widely used algorithm are well known. It's easier to replace a key.
An attacker who obtains the key can :
Cryptographic keys are meant to be randomly generated by an algorithm whereas a password are meant to be created by human beings. See password
Key are used as authentication credential for automated processes
See What is Sender authentication ? (Public Key Authentication based, Certificate-based in Cryptography)
See Cryptography - Data integrity.
Keys may also be used to sign digitally a document. Logically, this is the process underlying authentication because the signature authenticates the sender of the document. See digital signature schemes.
Keys need to be distributed and their is a more secure scheme than to send a letter via postmail. See Cryptography - Key Exchange Algorithm
Cipher are not using password, they uses keys. Passwords should be then converted into key material with a password-stretching KDF with appropriate work factors.
Passwords were created to be memorized by human beings (low-entropy) where a key were created to be use in automated process by computer. They are too complex and random to be memorized.
Passwords are text whereas cryptographic keys are binary data (even if serialized and deserialized as text via base64) and are generally not meant to input manually.
In a multi-factor authentication context,
Key pair (public and private) creation
To be able to tell a key's owner, public keys are often enriched with attributes such as:
The packed collection of a public key and its attributes can be digitally signed.
The resulting object is called:
Selecting the Size of the Key 2), select the Strength of the crypto.
A private key is used in the public key cryptography scheme.
The private keys in a PKI mode that are used for user authentication are called identity keys.
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIJWbvSW7h50HPwG+bWR3DXgQ6YhOxYbe0ifr1rRUvsUuoAoGCCqGSM49
AwEHoUQDQgAE34yHdT/dZ7hVi1XVCZZQUjMUtNR56CXUCjn9Aa0JEYBmfxvFf0qU
KutYhIiNJgDAJqMgQZI8RnA80wGgrxcPxA==
-----END EC PRIVATE KEY-----
Once an SSH server receives a public key from a user and considers the key trustworthy, the server marks the key as authorized in its authorized_keys file. Such keys are called authorized keys. See authorized_keys
The type of key is generally the name of the cipher
TLS/SSL is the network protocol that implements the cryptographic concepts:
Other secure protocol are a layer above (ie based on) TLS/SSL such as: