Skip to the content.

⚙️ What is Cryptography?

Definition:

Cryptography is the science of protecting information by transforming it into an unreadable format, so only authorized parties can access it.

Purpose:


🔑 Core Concepts

Concept Description
Plaintext Original readable data
Ciphertext Encrypted data, unreadable without key
Encryption Process of converting plaintext → ciphertext
Decryption Process of converting ciphertext → plaintext
Key Secret value used to encrypt/decrypt
Hashing One-way transformation (no decryption), used for integrity

🔒 Types of Cryptography

1. Symmetric Key Cryptography

Common Algorithms:

Example:

Key: "secret123"
Plaintext: "Hello"
Ciphertext: "X7#%a9"
Decryption with same key → "Hello"

2. Asymmetric Key Cryptography (Public-Key Cryptography)

Common Algorithms:

Example:


3. Hash Functions

Common Algorithms:

Use case:


4. Digital Signatures

Flow:

  1. Sender hashes the message
  2. Sender encrypts hash with private key → signature
  3. Receiver decrypts signature with sender’s public key, compares with hash

5. Hybrid Cryptography


🔧 Real-World Use Cases

Use Case Type of Cryptography
HTTPS / SSL/TLS Hybrid (RSA/ECDH + AES)
VPN / IPsec Symmetric + asymmetric
Digital Signatures Asymmetric (RSA, ECC)
Password Storage Hashing (Bcrypt, Argon2)
Encrypted Messaging End-to-end encryption (AES + RSA)

⚡ Key Takeaways

  1. Cryptography ensures confidentiality, integrity, authentication, non-repudiation.
  2. Symmetric → fast, same key
  3. Asymmetric → secure key exchange, public/private keys
  4. Hashing → integrity, one-way
  5. Digital signatures → verify authenticity
  6. Hybrid systems → combine speed + security (TLS, messaging apps)

💡 Analogy: