Skip to main content

Cryptography

Cryptography is the science of protecting information by transforming it into an unreadable format that only authorised parties can understand. It uses mathematical algorithms and "keys" to scramble data, ensuring it remains secure while stored (at rest) or sent over a network (in transit).

Types of Cryptography​

TypesHow it worksExamplesUse Cases
SymmetricUses a single shared key for both encryption and decryption. It is fast and ideal for large data sets.AES, DESDisk encryption, VPNs
AsymmetricUses a pair of keys: a Public key (to encrypt) and a Private key (to decrypt)RSA, ECC, DSATLS, digital signatures, SSH, PGP
HashingA one-way function that creates a fixed-length "fingerprint" of data. It cannot be reversed to reveal the original message.SHA-2, SHA-3, MD5(obsolete), SHA-1(obsolete)Password storage, data integrity, digital signatures

Real-world use​

  • HTTPS: Secures web browsing.
  • End-to-End Encryption: Used by apps like WhatsApp and Signal to ensure only you and the recipient can read messages.
  • Digital Signatures: Verifies the authenticity of software updates and legal electronic documents.
  • Cryptocurrency: Uses blockchain technology and hashing to secure digital transactions without a central bank.
  • Password Storage: Systems store "hashes" of your password rather than the actual text to protect your login even if a database is breached.

Ciphers​

Tools​

  • dCode - Online cryptography tools for ciphers, hashes, and more.
  • CyberChef - A web app for encryption, encoding, and data analysis.
  • Cryptool - An open-source educational tool for learning cryptography concepts.
  • Hashcat - A powerful password recovery tool supporting various hash algorithms.
  • GnuPG (GPG) - A complete and free implementation of the OpenPGP standard for encrypting and signing data.
  • OpenSSL - Command-line crypto toolkit (openssl enc, openssl dgst, openssl genpkey)
  • GPG: File/email encryption and signing (gpg --encrypt, gpg --sign)

Books​