Unlocking Knowledge: Cryptology Revealed

Ravitej Bandlekar
7 min readAug 19, 2023

--

Source: https://theleaflet.in/

Cryptography, originating from the Greek term “kryptos graphein,” entails the discipline and creativity of encoding information to ensure its confidentiality and durability against adversarial actions.

The core concepts of cryptography are Confidentiality, Integrity, Authentication and Non-repudiation.

Feel welcome to check out this article to enhance your understanding.

The Central function of cryptography is encryption, the transformation of data into unreadable form.

Plain Text >>> Encryption >>> Cipher Text >>> Decryption >>> Plaintext

Ciphertext is the encrypted form of plaintext (which is the original, human-readable message or data), which appears as a seemingly random and unreadable sequence of characters. This method facilitates sending sensitive data across unsecure communication routes, like the internet.

The attributes:

  1. Plain Text and Cipher Text
  2. Encryption and Decryption
  3. Key

I’ve elaborated on Plain/Cipher Text and Encryption/Decryption in the aforementioned discussion.

Let’s understand what is a key?

In the realm of cryptography, a key refers to a data element, typically presented as a sequence of characters or a numeric entity. This data is employed as an input for encryption or decryption algorithms. The key plays a pivotal role in dictating the manner in which the algorithm converts plain, readable text into encoded, unreadable text (encryption), or the reverse process (decryption). The effectiveness of a cryptographic system frequently hinges on the confidentiality of the key and the meticulous control over its handling and usage.

Key size: Key size in cryptography refers to the length of the cryptographic key, usually measured in bits. It impacts encryption complexity and data security. A larger key size increases possible keys, thwarting attackers from brute-force decryption. Growing computing power demands larger key sizes for sustained security.

Key space: Key space in cryptography refers to the total potential keys for an encryption algorithm. It quantifies key combinations. In binary, 1 bit has 2 choices (0 or 1), 2 bits have 4 choices (00, 01, 10, 11), and so on. A bigger key space means greater security, as attackers must test all options to decrypt data.

Algorithms Categories:

  1. Symmetric key algorithm
  2. Asymmetric key algorithm
  3. Hashing algorithm

Symmetric key algorithm

Source: https://www.cisco.com/

Dependence is placed on an encryption key, known as a “shared secret,” which is provided to all individuals engaging in communication. This key functions as the means to encrypt and decrypt messages and is held by all parties involved, including the sender and receiver.

When employing a considerably lengthy encryption key, symmetric encryption becomes notably resistant to decryption attempts. This technique is primarily used for extensive data encryption, specifically ensuring the confidentiality of information.

Algorithms Used:

  1. AES (Advanced Encryption Standard): AES is one of the most widely used symmetric encryption algorithms. It supports key sizes of 128, 192, or 256 bits and is known for its efficiency and security. It’s used in various applications, including securing sensitive data and communications.
  2. DES (Data Encryption Standard): DES was one of the earliest symmetric encryption algorithms. It uses a 56-bit key and operates on 64-bit blocks of data. While DES has been largely replaced by more secure algorithms due to its relatively short key length, it still holds historical significance.
  3. 3DES (Triple DES): 3DES is a modification of DES that applies the DES algorithm three times with different keys for added security. It was developed to enhance the security of DES and is still used in certain legacy systems.
  4. Blowfish: Blowfish is a symmetric encryption algorithm designed for fast encryption and decryption. It supports variable key lengths and block sizes. It’s not as widely used as AES but has been used in various applications.
  5. RC4 (Rivest Cipher 4): RC4 is a stream cipher known for its simplicity and speed. It’s been used in various applications, including early versions of SSL/TLS protocols. However, due to vulnerabilities and weaknesses, it’s generally not recommended for secure applications anymore.
  6. Serpent: Serpent is a symmetric encryption algorithm known for its security and strong resistance against various cryptographic attacks. It was one of the finalists in the AES competition but wasn’t selected as the standard.
  7. Twofish: Twofish is another algorithm that was a finalist in the AES competition. It’s known for its flexibility and strong security features. While it wasn’t chosen as the AES standard, it’s still considered a reliable encryption algorithm.
  8. Camellia: Camellia is a symmetric encryption algorithm developed jointly by Japan and France. It supports various key lengths and block sizes and is considered secure and efficient.

Instance:

Consider the scenario where Rick and John aim to establish secure communication over the internet. They opt to employ symmetric encryption for their message exchange. Here’s an overview of how the procedure would unfold:

  1. Key Generation:
  • Rick and John agree on a secret encryption key. This is the “shared secret” key they will use for both encrypting and decrypting messages.

2. Message Encryption:

  • John wants to send a confidential message to Rick. He takes the message and the shared secret key and uses a symmetric encryption algorithm (like AES — Advanced Encryption Standard) to encrypt the message.
  • The encrypted message can only be decrypted using the same shared secret key.

3. Message Transmission:

  • John sends the encrypted message to Rick over the internet.

4. Message Decryption:

  • Rick receives the encrypted message. He uses the same shared secret key to decrypt the message using the symmetric encryption algorithm.
  • Since both John and Rick have the same key, Rick can successfully decrypt the message and read its contents.

Within this illustration, the encryption and decryption keys remain identical (referred to as the shared secret), enhancing operational efficiency. Nevertheless, the primary hurdle in symmetric encryption lies in the secure distribution and management of the shared secret key. Should an unauthorized third party obtain access to this key, they would gain the ability to decipher the messages, posing a significant security risk.

Asymmetric key algorithm

Source: https://www.ssl2buy.com/

Referred to as public key algorithms, these cryptographic methods address the vulnerabilities present in symmetric key encryption. In this approach, each user possesses a pair of keys: a public key, shared openly among all users, and a private key, safeguarded in secrecy and exclusively known to the key’s owner. However, a unique twist emerges — encrypting and decrypting demands the collaborative use of contrasting yet interconnected key pairs.

Algorithms Used:

Public-key encryption algorithms, referred to as asymmetric encryption algorithms, operate with a set of keys: a public key for encryption and a private key for decryption (or vice versa). Below are several widely employed asymmetric encryption algorithms:

  1. RSA (Rivest-Shamir-Adleman):
  • RSA is one of the most widely used asymmetric encryption algorithms.
  • It’s used for secure communication, digital signatures, and key exchange.
  • The security of RSA relies on the difficulty of factoring large prime numbers.
  • RSA encryption is slower compared to symmetric encryption, especially for large data.

2. ECC (Elliptic Curve Cryptography):

  • ECC offers strong security with shorter key lengths compared to RSA.
  • It’s used in a variety of applications, including secure communication and digital signatures.
  • ECC is computationally efficient and suitable for resource-constrained environments.

3. ElGamal Encryption:

  • ElGamal is based on the difficulty of the discrete logarithm problem.
  • It’s used for secure key exchange and encryption.
  • ElGamal encryption involves randomness and can be slower compared to RSA.

4. DSA (Digital Signature Algorithm):

  • DSA is primarily used for creating digital signatures.
  • It’s a variant of ElGamal and is widely used for authentication and non-repudiation.
  • DSA relies on the discrete logarithm problem for security.

5. Diffie-Hellman Key Exchange:

  • While not strictly an encryption algorithm, Diffie-Hellman is used to establish a shared secret key between parties.
  • It’s the foundation for many encryption protocols and algorithms.
  • Diffie-Hellman is based on the difficulty of the discrete logarithm problem.

These are some examples of asymmetric encryption algorithms. Each algorithm possesses distinct advantages and limitations, and the selection of an algorithm hinges on considerations such as security prerequisites, computational effectiveness, and the constraints of the particular application.

Instance:

Let’s explore an example of asymmetric encryption using Rick and John:

  1. Key Generation:
  • Rick generates a key pair consisting of a public key and a private key. The public key is meant to be shared openly, while the private key is kept secure and known only to Rick.
  • Similarly, John generates his own key pair: a public key to share and a private key to keep secret.

2. Message Encryption:

  • John wants to send a confidential message to Rick. Instead of using a shared secret key like in symmetric encryption, he uses Rick’s public key to encrypt the message.
  • This encrypted message can only be decrypted using Rick’s corresponding private key.

3. Message Transmission:

  • John sends the encrypted message to Rick over the internet. Even if intercepted, the encrypted message remains unintelligible without Rick’s private key.

4. Message Decryption:

  • Rick receives the encrypted message. He uses his private key to decrypt the message, which was encrypted using his public key.
  • Since only Rick possesses the corresponding private key, he’s able to successfully decrypt the message and read its contents.

Asymmetric encryption offers the benefit of secure message transmission without relying on a common secret key. Moreover, it serves as the foundation for diverse security mechanisms such as digital signatures and protocols for secure key exchange.

Difference:

Symmetric Encryption:

Uses the same key for both encryption and decryption.

  • Faster and more efficient for large amounts of data.
  • Requires secure key distribution.
  • Not suitable for secure communication between parties that have never interacted before.
  • Examples: AES, DES, 3DES.

Asymmetric Encryption:

  • Uses two mathematically related keys: public key for encryption, private key for decryption.
  • Slower due to the complex mathematical operations involved.
  • Public keys can be openly shared, private keys must be kept secret.
  • Eliminates the need for secure key distribution.
  • Suitable for secure communication between parties that have never interacted before.
  • Examples: RSA, ECC, ElGamal.

Related article

Reference:

Cryptography and Network Security Principles and Practice (6th Edition) by William Stallings

Jonathan Katz, Yehuda Lindell — Introduction to Modern Cryptography

Let’s connect?

LinkedIn: www.linkedin.com/in/ravitejmbandlekar

--

--

No responses yet