Luke a Pro

Luke Sun

Developer & Marketer

🇺🇦
EN||

Security & Cryptography: Overview

| , 2 minutes reading.

Security & Cryptography: Overview

Introduction: The “Spy” Problem

In an open network, anyone can listen to your traffic. How do you send a credit card number to a server without a hacker seeing it? How do you know the person you are talking to is actually who they claim to be?

Cryptography is the science of using mathematical algorithms to protect information. It has evolved from simple character shifting (Caesar Cipher) to complex mathematical proofs involving prime numbers and elliptic curves.

The CIA Triad

Every security algorithm aims to fulfill one or more of these goals:

  1. Confidentiality (C): Only authorized people can read the data (AES, RSA).
  2. Integrity (I): Ensuring the data hasn’t been changed during transmission (MD5, SHA, Merkle Tree).
  3. Availability (A): Ensuring systems are up and running (Protected by Rate Limiting, DDoS filters).

Selection Framework: How to Choose?

  1. Speed vs. Security?
    • Encrypting large files: Use Symmetric Encryption (AES). It’s 1000x faster than asymmetric.
    • Exchanging keys: Use Asymmetric Encryption (RSA/ECC) or Diffie-Hellman.
  2. Proving Ownership?
    • Use Digital Signatures (Private Key signs, Public Key verifies).
  3. Proving Integrity in Big Data?
    • Use a Merkle Tree to verify blocks of data without downloading the whole set.

Quick Look at Common Algorithms

  • 8.1 AES: The fast “Golden Standard” for daily encryption.
  • 8.2 RSA/ECC: The “Master Lock” that secures the initial connection.
  • 8.3 Diffie-Hellman: The “Magic Box” that lets two strangers agree on a secret over an open line.
  • 8.5 Merkle Tree: The “Hash of Hashes” used by Bitcoin and Git to prove data hasn’t been tampered with.

Selection Cheat Sheet

GoalRecommended AlgorithmStrengthPerformance
Bulk Data EncryptionAES-256ExtremeVery Fast
Secure Key HandshakeECC (Elliptic Curve)High (Better than RSA)Fast
Legacy HandshakeRSAHigh (Requires large keys)Slow
Integrity CheckSHA-256Collision ResistantFast
Tamper-proof LedgerMerkle TreeDistributed TrustHigh Throughput

The “One-Sentence Mindset”

“Encryption makes eavesdropping too expensive to be worth it, while signatures make forgery mathematically impossible.”