Simply put, cryptography is the study of methods that allow secure communication in the presence of unauthorized parties, commonly referred as hackers or adversaries. Cryptography focuses on three major aspects, also known as the CIA triad:
- Confidentiality: To ensure that only the intended party can decrypt and read the message’s contents.
- Integrity: To guarantee that the message has not been modified while in storage or transit.
- Authenticity: To verify that the message came from from where it claims.
The principal application of cryptography is encryption. Encryption provides confidentiality by making a message ineligible. To do this, a cipher or algorithm and a secret value key are used. For the case of symmetric encryption, the same key is used to encrypt and decrypt whereas for asymmetric encryption, a public key and a secret key are needed to encrypt and decrypt the message, respectively.
Cryptography has its origins long time ago. One of the oldest ciphers is the Caesar cipher, where basically each letter of the message is replaced by another letter some fixed number of positions down the alphabet. This cipher was named after Julius Caesar, who is said that used it with a shift of three to protect messages of military significance. So, if for example, he wanted to send the message: “Attack”, he would write “DWWDFN”.
This cipher is obviously too easy to decrypt since only 26 shifts would be needed to try all the different combinations. This Python code can be used to decrypt any message using the Caesar cipher:
Many more ciphers have been designed since then and most of them have been broken due to the advances in technology. Therefore, more advanced ciphers have been researched over the last few decades to securely protect the data. Currently, the Advanced Encryption Standard (AES) is the symmetric block cipher standard, chosen by the U.S. government to protect sensitive information.