Cryptography Basics

What is Cryptography?

Cryptography is a method of protecting information and communications through the use of codes, so that only those for whom the information is intended can read and process it.

In computer science, cryptography 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 deterministic algorithms are used for cryptographic key generation, digital signing, verification to protect data privacy, web browsing on the internet and confidential communications such as credit card transactions and email.

Types of Cryptographic Algorithms

Asymmetric Encryption

Asymmetric Encryption is also known as public key cryptography. This method uses two separate keys for encryption. One key, the public key, is used by anybody to encrypt their traffic. This data can only be decrypted by a specific private key, known only by the recipient of the data.

Pros VS. Cons

Pros:

  • Distributing keys is much easier

  • Scalable in large networks

Cons:

  • Slower to encrypt and decrypt than symmetric

  • Harder to implement

Symmetric Encryption

Symmetric encryption uses the same key for both encryption and decryption of the data. This means that both parties for whom the data is meant need access to the same key.

Pros VS. Cons

Pros:

  • Faster: Since it uses a single key for encryption and decryption, it’s faster to execute

Cons:

  • It is much more difficult to share the keys in symmetric encryption

  • Storing keys securely is much more difficult

  • Symmetric encryption is not scalable

Common Algorithms

  • Advanced Encryption Standard (AES)

  • Rivest-Shamir Algorithm (RSA)

  • Elliptic Curve Cryptography (ECC)

  • Base64

  • MD5

  • SHA

  • Caesar Cipher

  • ROT13

  • XOR

  • Vigenère Cipher

Download

PDF Version of this page

Last updated