On this page
If you enjoy the moment a number theory problem clicks, there is a whole field built on that feeling. The number theory and algebra you meet in olympiad practice and first-year college maths are the same tools cryptographers use, with much bigger numbers.
What maths does cryptography actually use?
Modular arithmetic: working only with remainders, or clock arithmetic.
Primes and factoring: multiplying two primes is easy; recovering them from a large product is hard.
Groups and algebra: sets with an operation, the language used to design and break ciphers.
Linear algebra: the basis of the newest lattice-based standards.
Modern public-key cryptography took off with Whitfield Diffie and Martin Hellman's 1976 paper New directions in cryptography. Their key exchange lets two people agree on a shared secret key over a public channel, and a fast way to solve the discrete logarithm problem would break it: computing g raised to a secret power mod p is easy, but recovering the power is believed to be hard for large primes.
In 1978, Ron Rivest, Adi Shamir and Leonard Adleman described RSA, an encryption method where "publicly revealing an encryption key does not thereby reveal the corresponding decryption key" (Communications of the ACM). Their abstract says the system's security "rests in part on the difficulty of factoring the published divisor, n."
The field is still moving. In August 2024, NIST finalised its first three post-quantum standards: FIPS 203 (general encryption) and FIPS 204 (digital signatures) are based on lattice mathematics, and FIPS 205 (digital signatures) on hash functions (NIST).
How does RSA work? A toy example you can check by hand
Pick two primes: p = 5 and q = 11. The public modulus is n = 5 × 11 = 55.
Compute (p − 1)(q − 1) = 4 × 10 = 40.
Choose a public exponent e = 3, which shares no factor with 40.
Find the private exponent d with 3d ≡ 1 (mod 40). Here d = 27, because 3 × 27 = 81 = 2 × 40 + 1.
Encrypt the message M = 7: 7³ = 343, and 343 = 6 × 55 + 13, so the ciphertext is C = 13.
Decrypt: compute 13²⁷ mod 55. Mod 5, 13 ≡ 3, and by Fermat's little theorem 3²⁷ ≡ 3³ = 27 ≡ 2. Mod 11, 13 ≡ 2, and 2²⁷ ≡ 2⁷ = 128 ≡ 7. The only number below 55 that leaves remainder 2 on division by 5 and 7 on division by 11 is 7. The message is back.
Anyone who factors 55 into 5 × 11 can redo step 4 and find d. With the very large primes in real keys, that factoring is the hard part.
What are the routes into cryptography in India?
There are two broad jobs. Cryptographers design and analyse schemes, which leans on proofs and often a PhD; if that appeals, read how to start a computer science research career in college. Security engineers build, test and attack real systems, which leans on programming.
A maths-heavy degree. Chennai Mathematical Institute offers four-year B.S. (Hons.) programmes in Mathematics, Mathematics and Computer Science, and Mathematics and Physics, with direct admission for students who qualify for the national maths, physics or informatics olympiad training camps in Class 11 or 12 (CMI admissions). If olympiads appeal, here is how to prepare for olympiads alongside JEE.
A computing degree. B.Tech in computer science or electronics works well if you add number theory and abstract algebra electives.
A specialist master's. The Indian Statistical Institute's two-year M.Tech in Cryptology and Security starts with a "basic background in mathematics, statistics and computer science followed by specialized instructions", and the same centre offers full-time PhDs in Cryptology and Security (ISI R C Bose Centre). Check the current ISI admissions page for eligibility and dates.
How can you start cryptography in Class 11 or 12?
A 12-week plan, a few hours a week, alongside your syllabus:
Weeks 1-3, remainders and primes. Learn gcd and Euclid's algorithm. Solve 3d ≡ 1 (mod 40) without looking above.
Weeks 4-6, code it. Write Python for gcd, the extended Euclidean algorithm and fast powering. Redo the toy RSA with 61 and 53.
Weeks 7-9, break things. The free Cryptopals challenges run in eight sets, from basics through Diffie-Hellman and RSA to abstract algebra. They need no prior cryptography, but you must code proficiently.
Weeks 10-12, explain it. Write a one-page explainer of why RSA decryption works.
If modular arithmetic is the gap, the Fermi Concept Library has a lesson for every concept in mathematics and computing, so you can fill one hole without restarting a textbook.
Pick two primes tonight and encrypt your initials.



