Cryptography Introduction

Last Updated : 9 Jan, 2026

Cryptography is the technique of securing information by converting it into an unreadable form so that only authorized users can access and understand it.

  • Ensures secure communication in the presence of adversaries
  • Protects sensitive data from unauthorized access
  • Maintains confidentiality, integrity, authentication, and non-repudiation
  • Converts plaintext into ciphertext using encryption techniques
  • Plays a vital role in online transactions, digital security, and data protection

Core Principles of Cryptography

Modern cryptography is built on four fundamental principles:

1. Data Confidentiality

Confidentiality ensures that information is accessible only to authorized individuals or systems. It is usually enforced through encryption techniques and confidentiality agreements.

2. Data Integrity

Data integrity ensures that information remains accurate, complete, and unchanged throughout its lifecycle. Any unauthorized modification of data can be detected.

3. Authentication

Authentication verifies the identity of a user or system and confirms that the data being claimed actually belongs to the sender.

4. Non-Repudiation

Non-repudiation guarantees that a sender cannot deny sending a message or signing a document. It provides proof of origin and delivery of data.

How Cryptography Works

Consider two parties: Alice (Sender) and Bob (Receiver).
Alice wants to send a secure message m to Bob.

Process Overview

  • The original message (plaintext) is converted into an unreadable format using an encryption algorithm and a key k.
  • The encrypted message is called ciphertext.
  • The receiver uses the same or a related key to decrypt the ciphertext back into readable form.

Representation

Encryption:  C = E(m, k)
Decryption: m = D(C, k)

Where:

  • m = Plaintext
  • C = Ciphertext
  • E = Encryption algorithm
  • D = Decryption algorithm
  • k = Key

Example: Caesar Cipher (Shift Cipher)

The Caesar Cipher is one of the simplest encryption techniques. Each letter in the plaintext is shifted by a fixed number of positions in the alphabet.

Example (Shift = 3):

  • Plaintext: Geeksforgeeks
  • Ciphertext: Jhhnvirujhhnv

Even if an adversary knows the encryption method, the message cannot be decrypted without knowing the key (shift value).

Types of Cryptography

Cryptography can be broadly classified into the following types:

1. Symmetric-Key Cryptography

  • Uses a single shared key for both encryption and decryption
  • Fast and efficient
  • Requires secure key exchange
  • Example: AES, DES

2. Asymmetric-Key Cryptography

  • Uses a pair of keys: public key and private key
  • Public key encrypts data, private key decrypts it
  • More secure but slower than symmetric cryptography
  • Example: RSA

3. Hash Functions

  • Convert data of any size into a fixed-length output
  • Used to verify data integrity
  • One-way function (cannot be reversed)
  • Example: SHA-256

Applications of Cryptography

Cryptography plays a vital role in modern digital systems:

  • Secure Online Transactions: Protects sensitive data in online banking and e-commerce
  • Digital Signatures: Verifies authenticity and integrity of digital documents
  • Password Protection: Encrypts stored passwords to prevent theft
  • Military and Intelligence: Secures classified information and communication channels

Challenges of Cryptography

Despite its strengths, cryptography faces several challenges:

  • Key Management: Secure generation, distribution, and storage of keys is difficult
  • Quantum Computing Threat: Future quantum computers may break current cryptographic algorithms
  • Human Error: Weak passwords, poor key handling, and misconfiguration can compromise security
Comment
Article Tags:

Explore