CryptoHackPlatform·RSA Starter 1·10pts

RSA Starter 1 — CryptoHack

Compute 101^17 mod 22663 — the foundational primitive that powers every later RSA challenge.

May 16, 2026

Challenge

The most important operation in RSA is modular exponentiation: compute abmodna^b \mod n. Submit the result of 10117mod22663101^{17} \mod 22663.

Math

By definition, modular exponentiation is just repeated multiplication reduced after each step:

abmodn=(aaa)b timesmodna^b \bmod n = \underbrace{(a \cdot a \cdots a)}_{b\ \text{times}} \bmod n

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)
# 19906

Python'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 c=memodnc = m^e \bmod n
  • Decrypt m=cdmodnm = c^d \bmod n
  • 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 ee, shared nn, reused nonces, low dd, partial known plaintext, …).


Comments

Comments are not configured yet.