Learnr

Learn Cryptography

Understand how encryption, hashing and signatures keep data safe.

Free to start. No credit card. Or browse all courses.

What's inside your Cryptography course

A sample path Learnr builds for Cryptography. Your real course adapts to your goal and level.

  1. Classical ciphers and core goals of cryptography
  2. Modular arithmetic and randomness
  3. Symmetric encryption and modes of operation
  4. Hashes, MACs and password hashing
  5. Public-key cryptography and signatures
  6. Protocols, TLS and common implementation mistakes

Cryptography is the study of techniques that keep information confidential, detect tampering and prove who sent a message. Modern systems combine a few building blocks: symmetric ciphers like AES for bulk encryption, hash functions like SHA-256, message authentication codes, and public-key algorithms such as RSA and elliptic curves for key exchange and digital signatures. Protocols like TLS tie them together every time you load a secure web page. Learning it means understanding why each piece exists and how it fails when misused. A firm rule follows: never invent your own algorithms for production. Learnr builds a personalized cryptography course in bite-sized, interactive lessons.

How to learn Cryptography, step by step

  1. Start with classical ciphers. Encrypt and break Caesar and Vigenère ciphers by hand and with code, using frequency analysis. Seeing exactly how they fail teaches Kerckhoffs's principle: security must rest on the key, not on keeping the method secret.
  2. Learn the math you actually need. Get comfortable with modular arithmetic, prime numbers, XOR and the idea of computational hardness. You do not need a math degree, but these concepts are the language every cipher is described in.
  3. Understand symmetric encryption and modes. Learn what a block cipher does, then why the mode matters: ECB leaks patterns, while authenticated modes like AES-GCM provide both secrecy and integrity. Never reuse a nonce with the same key.
  4. Separate hashing, MACs and password storage. A hash detects changes, an HMAC proves a message came from someone holding the key, and passwords need slow hashes like Argon2, scrypt or bcrypt. Mixing these up is a classic real-world flaw.
  5. Study public-key crypto and TLS. Learn how Diffie-Hellman agrees on a shared secret, how signatures such as Ed25519 prove authorship, and how certificates bind keys to domains. Then inspect a real TLS handshake in your browser or with Wireshark.
  6. Practice with exercises and vetted libraries. Work through the Cryptopals challenges to see attacks on weak constructions, and in real code use well-reviewed libraries like libsodium. Short Learnr lessons help definitions and protocol steps stay clear.

What you'll learn

  • Break classical ciphers and explain why they fail
  • Describe symmetric encryption with AES and authenticated modes like GCM
  • Explain hashing, MACs and proper password storage
  • Understand public-key encryption, digital signatures and key exchange
  • Trace how TLS and certificates use these pieces together

How long does it take to learn Cryptography?

The core concepts take about 4 to 8 weeks at 4 to 5 hours a week. Understanding the math behind public-key systems and working through practical attack exercises takes 3 to 6 months. Professional cryptographic engineering requires years of study and review.

What you need before you start

Comfort with high school algebra and some programming, ideally Python, for experiments. Basic knowledge of binary and hexadecimal helps when you work with keys and hashes.

Common mistakes to avoid

  • Designing your own cipher or protocol for real use. Use standard, well-reviewed algorithms through vetted libraries, and leave new designs to research and expert review.
  • Storing passwords with fast hashes like plain SHA-256. Use a slow, salted password hashing function such as Argon2, scrypt or bcrypt.
  • Confusing encoding with encryption. Base64 hides nothing; anyone can decode it, so it provides no confidentiality at all.

How Learnr builds your course

Type your topic

Tell Learnr you want to learn Cryptography, or get as specific as you like.

Get a personalized course

Learnr instantly builds a full Cryptography course tailored to your goal and skill level.

Learn and level up

Move through bite-sized lessons and interactive practice, earning XP and keeping your streak.

Cryptography questions, answered

How much math do I need for cryptography?

For using cryptography correctly, algebra and modular arithmetic are enough. Designing or analyzing algorithms requires number theory, probability and abstract algebra.

What is the difference between encryption and hashing?

Encryption is reversible with the right key, so it protects data you need to read later. Hashing is one-way and is used to check integrity or store password verifiers.

What is post-quantum cryptography?

It covers algorithms designed to resist attacks from future large quantum computers. NIST published its first post-quantum standards in 2024, including ML-KEM for key establishment.

Explore more courses

More programming and tech courses

See all programming and tech courses

Ready to learn Cryptography?

Start your free, personalized Cryptography course in seconds. It will be typed in and ready when you get there.

Start learning Cryptography

Free to start. No credit card.