CryptoHack is a free website that teaches modern cryptography by making you break it. You decode, XOR, factor and attack your way through short challenges, and every solve hands you a flag that looks like crypto{...}. For a beginner who wants to get good at the crypto category of CTFs, it is the best free starting point we know. It also asks you to write Python from day one, so if you want the concepts explained in plain language first, keep HackerDNA's Cryptography course open next to it.
This guide covers what CryptoHack is, who it suits, how the courses and challenge categories fit together, how to set up your tools, what your first hour looks like, and how it compares with Cryptopals, picoCTF and lab-based practice.
TL;DR: CryptoHack is a free, gamified platform for learning cryptography through CTF-style challenges, built by two UK cryptography enthusiasts. Beginners should finish the Introduction to CryptoHack course, then Modular Arithmetic, before touching AES or RSA. You need basic Python, and the platform now ranks tied scores equally so nobody gains anything by rushing.
What Is CryptoHack?
CryptoHack is a free online platform where you learn modern cryptography by solving puzzles that break deliberately flawed implementations of AES, RSA, Diffie-Hellman and elliptic curves. Each challenge hides a flag, and submitting it earns you points, levels and trophies.
The CryptoHack FAQ says the founders "took inspiration from Capture The Flag contests but wanted to build something that's permanent, focusses exclusively on cryptography, and is more accessible." It was started as a passion project by two people from the UK: hyperreality, a devops engineer and security consultant, and Jack, a cryptography consultant with a background in theoretical physics.
A few numbers give you a sense of scale. The site's public stats endpoint reported 145,523 registered users and 240 regular challenges when we checked in late October 2026, plus 76 more in a CTF Archive of crypto challenges from past competitions. The challenges sit in 13 categories:
- Foundations: General (encoding, XOR, basic maths) and Mathematics
- The big ciphers: Symmetric Ciphers (mostly AES), RSA, Diffie-Hellman and Elliptic Curves
- Applied topics: Hash Functions, Crypto on the Web and Miscellaneous
- Advanced research areas: Lattices, Isogenies and Zero-Knowledge Proofs
- CTF Archive: crypto challenges preserved from real competitions
It costs nothing. The FAQ says CryptoHack "is entirely free to play" and runs on Patreon donations and sponsored job postings. There is no paid tier hiding the good material.
Is CryptoHack Good for Beginners?
Yes, if you can write a few lines of Python or are willing to learn. The first course assumes no cryptography knowledge at all. What it does assume is that you will run scripts, install packages and read code, because almost every challenge ends with you writing a small solution.
Each course page shows how many players are working on it and how many finished. We checked them in October 2026:
| Course | Level | Lessons | Players solving | Players completed |
|---|---|---|---|---|
| Introduction to CryptoHack | Beginner | 10 | 117,821 | 37,588 |
| Modular Arithmetic | Beginner | 11 | 38,850 | 9,093 |
| Symmetric Cryptography | Intermediate | 14 | 23,163 | 5,684 |
| Public-Key Cryptography | Intermediate | 18 | 22,017 | 5,070 |
| Elliptic Curves | Hard | 11 | 8,230 | 1,570 |
Roughly one in three people who start the introduction course finishes it. That sounds harsh until you look at where they stop. On the Introduction challenge page, "Finding Flags" (where you just paste a flag you are given) has over 114,000 solves. "Network Attacks", the third challenge and the first that makes you talk to a server with Python, has about 34,000.
So the wall is not cryptography. It is tooling. People who get Python and pwntools working sail through the next few dozen challenges. Our take: if you have never written a Python script, spend an evening on the basics first. HackerDNA's Python for Cybersecurity course covers strings, bytes, sockets and hashing, which is close to exactly what CryptoHack's early challenges use.
On the maths: you do not need a maths degree to start. The Modular Arithmetic course opens with clock arithmetic ("after 23:59 we reach 00:00") and builds up from there. You will meet number theory eventually, but the platform introduces it one small idea at a time.
How CryptoHack Works
CryptoHack has two ways in: courses and categories. They use the same challenges. A course is a curated, ordered path through challenges from several categories. A category is the full list for one topic, easy to brutal. Beginners should follow the courses and only open a category once its course is done.
Three kinds of challenges
The FAQ describes the challenge formats, and you will meet all three in your first week:
- Download and crack. You get vulnerable source code and its output, and you work out how to recover the secret.
- Web oracles. The block cipher challenges run as small web apps at
aes.cryptohack.org. You call functions with GET requests and read JSON responses, ideally from a Python script using the Requests library. - Interactive sockets. You connect to
socket.cryptohack.orgon a given port and exchange JSON objects. Some of these let you play man-in-the-middle between two parties trying to agree on a key.
Points, levels and trophies
Every challenge is worth points, from 2 for the very first one to 150 or more for hard ones. Points raise your level. Trophies are awarded per category by completion: bronze at 25%, silver at 50%, gold at 75% and gold with a star at 100%. You can link your account to the CryptoHack Discord to show your level there.
The 2026 shift away from racing
In September 2026 the team announced a real change in direction. Their announcement post explains that LLMs changed competitive CTFs over the past year, and that racing for points tempts players to let an AI do the work while the understanding gets lost. In response:
- Players with the same score now share the same scoreboard position, shuffled randomly every 24 hours, so solving first no longer matters.
- A Hall of Fame preserves the pre-2026 top 100.
- The old ban on publishing solutions outside the platform was relaxed. Personal blog writeups are now allowed.
For a beginner, this is good news. Nobody is ahead of you in any way that counts. The only score that matters is how much you understand.
How to Set Up Your Tools for CryptoHack
CryptoHack's challenges are written in Python 3, and the FAQ asks you to install three packages: PyCryptodome (cryptographic primitives), gmpy2 (fast big-number maths) and pwntools (talking to network services). A few advanced challenges use SageMath, which you can ignore for now.
- Install Python 3. On Linux and macOS it is usually already there. On Windows, install it from python.org and tick "Add to PATH".
- Install the packages. On Ubuntu or Kali, the FAQ suggests installing the gmpy2 build dependencies first:
sudo apt install python3-pip libgmp-dev libmpc-dev libmpfr-dev
pip install pycryptodome gmpy2 pwntools
On recent Debian-based systems, pip may refuse to install into the system Python. If it does, create a virtual environment first with python3 -m venv ~/cryptohack and activate it with source ~/cryptohack/bin/activate.
- Check that it works. The FAQ gives a one-line test. Open Python and run it:
$ python3
>>> from Crypto.Util import *; strxor.strxor(b"C", b"H")
b'\x0b'
If you see b'\x0b', PyCryptodome is installed correctly. Any error here means the package is missing or you are in the wrong environment.
Prefer not to install anything?
CryptoHack publishes an official Docker image with every recommended tool, including Sage. One command starts it:
docker run -p 127.0.0.1:8888:8888 -it hyperreality/cryptohack:latest
In practice, a plain Python install is enough for the first three courses. Reach for the Docker image when a challenge tells you it needs Sage.
Your First Hour on CryptoHack
Here is what a realistic first session looks like, using the Introduction to CryptoHack course.
- Register. To save progress you create an account, and the sign-up form asks you to solve a simple cipher. Consider it challenge zero.
- Finding Flags (2 points). The challenge gives you a flag and asks you to submit it. It teaches the format: flags look like
crypto{y0ur_f1rst_fl4g}. - Great Snakes (3 points). Download a Python file, run it, and it prints your flag. If this works, your Python is fine.
- Network Attacks (5 points). Connect to
socket.cryptohack.orgon port 11112 and send a JSON object with the keybuyand the valueflag. CryptoHack gives you a pwntools example script to modify. This is the step where most people stall, so take your time here. - The Encoding challenges. ASCII, Hex, Base64 and Bytes and Big Integers. Each one teaches a conversion you will use in every later challenge.
The ASCII challenge gives you a list of integers and points you to Python's chr() function. Here is the same idea on a different list, so you can see the pattern without a spoiler:
>>> ''.join(chr(c) for c in [104, 101, 108, 108, 111])
'hello'
>>> bytes.fromhex('6861636b6572646e61')
b'hackerdna'
Then come the XOR challenges, which are the real heart of this course. XOR returns 1 when two bits differ and 0 when they match, and its most useful property is that applying the same key twice gives you back the original. Try it yourself:
>>> ''.join(chr(ord(c) ^ 13) for c in 'cipher')
'nd}eh'
>>> ''.join(chr(ord(c) ^ 13) for c in 'nd}eh')
'cipher'
That reversibility is why XOR sits inside stream ciphers and AES modes, and why reusing an XOR key is such a classic mistake. The course ends with "You either know, XOR you don't" (30 points), where a little guesswork about the flag format cracks the key. The three Introduction challenges alone earn your first gold trophy, and the full ten lessons bank 110 points.
If you would rather see each transformation visually before scripting it, CyberChef's From Hex, From Base64 and XOR operations do the same jobs in a browser. Our CyberChef guide for beginners shows the recipes. Just do not stop there. The General category itself says solving these in a programming language "will pay off later", and it is right: by the AES challenges, no online converter will save you.
Which CryptoHack Courses to Do, in Order
The five courses form a sensible path. Here is how we would tackle them, and where to take detours.
- Introduction to CryptoHack (110 points). Encoding and XOR. Do all of it, including the Encoding Challenge (40 points) in the General category, which asks you to automate 100 levels of decoding over a socket. It is the best pwntools practice on the site.
- Modular Arithmetic (395 points). GCD, modular inverses, quadratic residues and the Chinese Remainder Theorem. This is the maths every public-key system is built on. Skip it and RSA will feel like magic instead of arithmetic.
- Public-Key Cryptography (550 points). RSA from first principles, then classic RSA mistakes, then Diffie-Hellman and two man-in-the-middle attacks. We would do this before Symmetric Cryptography because RSA bugs are the most common crypto challenge in beginner CTFs.
- Symmetric Cryptography (505 points). You build AES decryption yourself, then attack misused modes: ECB oracles, CBC bit-flipping and stream cipher reuse. "ECB Oracle" is a rite of passage.
- Elliptic Curves (620 points). Rated hard, and only 1,570 players had completed it when we checked. Come back to this after you have played a few live CTFs.
After the courses, open the categories. RSA and Symmetric Ciphers have plenty of challenges beyond the course material, and Crypto on the Web covers real-world topics like JSON Web Tokens, TLS and cloud setups. The CTF Archive is the final step before playing crypto in a live event, because those challenges were written for competitions, not for teaching. If you have never played a live CTF, our CTF for beginners guide has a four-week plan to get you there.
How to Get Unstuck on CryptoHack
Crypto challenges have a particular way of being stuck: you understand the idea and your script still prints garbage. A few habits help.
- Reread the challenge text. CryptoHack descriptions are short lessons, and the hint is often a single function name like
bytes_to_long()orpow(). Follow the linked resources too. - Print every intermediate value. Most failed solves are type bugs: a hex string where you needed bytes, or bytes where you needed an integer. Print the type and length at each step.
- Ask on Discord. Name the challenge, show what you tried and what came out. The community is helpful when you have clearly done the work.
- Read solutions after you solve. Once a challenge is done, a Solutions link appears next to it with other players' scripts. Reading three other approaches to a challenge you just solved is one of the fastest ways to improve.
About AI assistants: the CryptoHack team now openly worries that LLMs are replacing the learning. An AI can explain what a Legendre symbol is. If it writes the exploit for you, you have a flag and none of the skill, and live CTFs increasingly expect you to understand what you submit. Use it like a textbook, not a teammate.
CryptoHack vs Cryptopals, picoCTF and HackerDNA
These are the four options beginners ask us about most often for learning crypto. They overlap less than you might think.
| Platform | Price | Format | Teaching | Best for |
|---|---|---|---|---|
| CryptoHack | Free | Gamified challenges, starter code provided | Short lessons in every challenge, ordered courses | Going deep on modern crypto: AES, RSA, ECC |
| Cryptopals | Free | Eight problem sets, no scoring | Problem descriptions only | Implementing every attack yourself, in any language |
| picoCTF | Free | Browser-based CTF practice | Hints, external resources | Sampling crypto alongside every other CTF category |
| HackerDNA | Free tier, Pro plan | Courses plus browser-based labs | Full chapters with tools and worked examples | Crypto as part of wider hacking skills, from encoding to RSA attacks |
Cryptopals is the classic. The CryptoHack FAQ says some of its own challenges are adaptations of Cryptopals ones, and that the main difference is a more gamified environment "where you don't have to code everything from the ground up." Cryptopals expects you to code proficiently in any language. Our advice: do CryptoHack first, then do Cryptopals set 1 and 2 as a test of whether you can write it all without scaffolding.
picoCTF is wider and shallower. Its crypto problems lean on classical ciphers and quick RSA tricks, mixed with web, forensics and reversing. If you are not sure crypto is your category yet, our picoCTF guide is the better first stop. If you already know you love it, CryptoHack goes much further.
HackerDNA covers the parts CryptoHack deliberately skips. CryptoHack focuses on modern cryptography, so you will find little about Caesar, Vigenère or substitution ciphers there, yet those still show up in beginner CTFs. HackerDNA's Cryptography course runs from encoding and classical ciphers through XOR, hashes, AES modes and RSA attacks, with CyberChef and RsaCtfTool as well as Python. And labs like XOR Reuse let you apply it on a target instead of a worksheet.
Legal and Ethical Considerations
Critical reminder: CryptoHack's servers and challenge files exist to be attacked. Nothing you learn there gives you permission to attack anything else. Always get explicit written authorization before testing any system you do not own.
- Attack the challenge, not the platform. The sockets and web oracles are the puzzle. Hammering them with traffic, or poking at the CryptoHack site itself, is not. Report real bugs through Discord or by email.
- Do not reuse challenge code in real software. The FAQ warns that its provided source code "deliberately contains terrible errors" and should never be used as a reference for production cryptography.
- Real-world crypto bugs need disclosure, not exploitation. If you spot ECB mode or a reused nonce in an application you use, that is a finding to report through the vendor's disclosure process or bug bounty program, not a flag to grab.
- Write up responsibly. Blog writeups are now allowed, but think about the next beginner. Explaining your reasoning teaches more than pasting a flag.
Frequently Asked Questions
Is CryptoHack free?
Yes. Every course and challenge on CryptoHack is free to play. The platform covers its running costs through Patreon donations and job postings from companies hiring cryptographers. You only need an account to save your progress.
Who runs CryptoHack?
CryptoHack was started as a passion project by two people from the UK, known on the site as hyperreality and Jack. The platform is built on a fork of the ColdCore CTF framework, and community members contribute new challenges.
Do I need to know Python for CryptoHack?
Basic Python helps a lot. Almost all challenges are written in Python 3 and expect a short script as a solution, though CryptoHack provides starter snippets. You can use another language, but the FAQ says it will be harder.
How much maths do I need for CryptoHack?
Very little to begin. The introduction course covers encoding and XOR only. The Modular Arithmetic course then teaches the number theory you need for RSA and Diffie-Hellman, one idea per challenge. Lattices and isogenies are advanced and can wait.
Is CryptoHack better than Cryptopals?
For beginners, usually yes. CryptoHack explains each concept, gives starter code and tracks progress. Cryptopals offers less guidance and expects you to implement everything from scratch, which makes it a great second step once CryptoHack's early courses feel comfortable.
Can I post CryptoHack solutions online?
Since September 2026, yes. CryptoHack relaxed its policy and now welcomes personal blog posts about how you solved a challenge. Inside the platform, you can also share solution scripts as GitHub Gists after solving a challenge.
Last verified: October 2026. Course contents, player counts and challenge solve counts checked on cryptohack.org course and challenge pages. User and challenge totals from CryptoHack's public site-stats API. Policy changes from the CryptoHack blog post dated September 29, 2026.
Your Next Steps
CryptoHack is the free platform to pick when you want crypto challenges to stop feeling like magic. Get Python and pwntools working tonight, clear the Introduction to CryptoHack course this week, and start Modular Arithmetic next. If you can solve "Network Attacks" on your first evening, you are already past the point where most people quit.
Then put those skills to work outside the worksheet. HackerDNA's Cryptography course fills in the classical ciphers and tooling CryptoHack skips, and the XOR Reuse lab is a quick test of what the XOR lessons taught you. Everything runs in your browser, and you can start with HackerDNA's free tier - no credit card required.