3-Cryptography
Cryptography
Cryptography is the science of securing communication by using mathematical methods to encode and decode information, protecting it from unauthorized access and ensuring its integrity and authenticity. It transforms readable data (plaintext) into an unintelligible form (ciphertext) through encryption and then converts it back using a secret key through decryption.
Related Fields
- Cryptanalysis: Deals with breaking secret messages
- Cryptology: Science that studies both; making secret messages and breaking secret messages
Kerckhoffs’ Principle
The security of a system should not rely on the secrecy of the algorithm. In other words, a cryptosystem should be secure even if everything about it is public except the secret key.
Types of Cryptography
Symmetric Cryptography
In this type of cryptography, the same key is used for both encryption and decryption of messages (both sender and recipient use the same key) Also known as conventional or single key cryptography.
Cons:
no mechanism of sharing the key secretly
have to manage separate keys for each pair of users, otherwise impersonation is possible
Asymmetric Cryptography
In this type, different key is used for encryption and decryption. One key is public while the other key is kept private.
Confusion and Diffusion
Confusion and Diffusion are two key properties for building strong encryption algorithms. They work together to make it difficult for an attacker to deduce the key or plaintext from the ciphertext
Confusion refers to making the relationship between the cihertext and plaintext as complex and obscure as possible. An attacker should not be able to figure out how changes in the key affect the ciphertext. It is usually achieved through substitution operations.
Diffusion refers to spreading the influence of one plaintext bit over many ciphertext bits. A small change in the plaintext should cause a large, unpredictable change in the ciphertext (avalanche effect). It is usually achieved through permutation and mixing operations.