Cryptography is an information security tactic used to protect enterprise information and communication from cyber threats through the use of codes. This practice refers to secure information and communication techniques derived from mathematical concepts and a set of rule-based calculations, called algorithms, to transform messages in ways that are hard to decipher. These algorithms are then used for cryptographic key generation, digital signing, verification to protect data privacy, web browsing on the internet, and confidential communication like credit card transactions and emails. Cryptography achieves several information security-related objectives including confidentiality, integrity, authentication, and non-repudiation.
Secret Key Cryptography, or symmetric cryptography, uses a single key to encrypt data. Both encryption and decryption in symmetric cryptography use the same key, making this the easiest form of cryptography. The cryptographic algorithm utilizes the key in a cipher to encrypt the data, and when the data must be accessed again, a person entrusted with the secret key can decrypt the data. Secret Key Cryptography can be used on both in-transit and at-rest data, but is commonly only used on at-rest data, as sending the secret to the recipient of the message can lead to compromise. Examples: AES, DES, Caesar Cipher.
Public Key Cryptography, or asymmetric cryptography, uses two keys to encrypt data. One is used for encryption, while the other key can decrypt the message. Unlike symmetric cryptography, if one key is used to encrypt, that same key cannot decrypt the message, rather the other key shall be used. One key is kept private, and is called the “private key”, while the other is shared publicly and can be used by anyone, hence it is known as the “public key”. The mathematical relation of the keys is such that the private key cannot be derived from the public key, but the public key can be derived from the private. The private key should not be distributed and should remain with the owner only. The public key can be given to any other entity. Example: ECC, Diffie-Hellman, DSS.
Hash functions are irreversible, one-way functions which protect the data, at the cost of not being able to recover the original message. Hashing is a way to transform a given string into a fixed-length string. A good hashing algorithm will produce unique outputs for each input given. The only way to crack a hash is by trying every input possible until you get the exact same hash. A hash can be used for hashing data (such as passwords) and in certificates. Examples: MD5, SHA 1, SHA 2 family, SHA 3, Whirlpool, Blake 2, Blake 3.
No. Encryption is what we call the process of turning plaintext into ciphertext. Encryption is an important part of cryptography but doesn't encompass the entire science. Its opposite is decryption.
The answer is that each scheme is optimized for some specific cryptographic application(s). Hash functions, for example, are well-suited for ensuring data integrity because any change made to the contents of a message will result in the receiver calculating a different hash value than the one placed in the transmission by the sender. Since it is highly unlikely that two different messages will yield the same hash value, data integrity is ensured to a high degree of confidence.
Secret key cryptography, on the other hand, is ideally suited to encrypting messages, thus providing privacy and confidentiality. The sender can generate a session key on a per-message basis to encrypt the message; the receiver, of course, needs the same session key in order to decrypt the message.
Key exchange, of course, is a key application of public-key cryptography (no pun intended). Asymmetric schemes can also be used for non-repudiation and user authentication; if the receiver can obtain the session key encrypted with the sender's private key, then only this sender could have sent the message. Public key cryptography could, theoretically, also be used to encrypt messages although this is rarely done because secret key cryptography values can generally be computed about 1000 times faster than public-key cryptography values.
Cryptographic key management involves the handling of cryptographic keys and other related security parameters during the entire lifecycle of the keys, including their generation, storage, distribution/establishment, use, and destruction. CKM also includes the policies for selecting appropriate cryptographic algorithms and key sizes, the key-establishment schemes and protocols to utilize and support the generation or distribution of keys, the protection and maintenance of keys and related data, and the integration of key management with cryptographic technology to provide the required type and level of protection required by an organization.
The proper management of cryptographic keys is essential to the effective use of cryptography for security. A cryptographic key is analogous to the combination of a safe. If an adversary knows the combination, the strongest safe provides no security against penetration. Similarly, poor key management may easily compromise strong algorithms.