RSA Starter 1 — CryptoHack
Compute 101^17 mod 22663 — the foundational primitive that powers every later RSA challenge.
Challenge
The most important operation in RSA is modular exponentiation: compute . Submit the result of .
Math
By definition, modular exponentiation is just repeated multiplication reduced after each step:
In practice we use square-and-multiply so even huge exponents stay tractable. For this challenge the numbers are small enough that any direct method works.
Solve
pow(101, 17, 22663)
# 19906Python's three-argument pow(base, exp, mod) is the canonical primitive — it's the same one you'll reach for in every later RSA challenge.
Why this is the starting line
Every subsequent CryptoHack RSA challenge composes this primitive:
- Encrypt
- Decrypt
- Sign / verify are the same operations with different keys
If you can call pow(a, b, n) you can already do all of those — the rest of the series is about discovering when the math leaks (small , shared , reused nonces, low , partial known plaintext, …).