Skip to content

College+ · Number Theory

RSA, Diffie-Hellman & analytic number theory

40 problems in this skill, each with a solver-verified answer key. Answers are checked the moment you submit — with a hint if you want one and a worked solution afterwards.

What the problems look like

A few statements from this skill. Answers, hints and worked solutions live in the practice session.

  1. Standard

    In Diffie-Hellman key exchange with public prime p=13p=13 and base g=3g=3, Alice's secret exponent is a=4a=4 and Bob's is b=5b=5. The shared secret is gab  pg^{ab}\bmod p. Compute its least nonnegative value.

  2. Standard

    In Diffie-Hellman key exchange with public prime p=23p=23 and base g=2g=2, Alice's secret exponent is a=2a=2 and Bob's is b=5b=5. The shared secret is gab  pg^{ab}\bmod p. Compute its least nonnegative value.

  3. Standard

    In Diffie-Hellman key exchange with public prime p=17p=17 and base g=3g=3, Alice's secret exponent is a=3a=3 and Bob's is b=5b=5. The shared secret is gab  pg^{ab}\bmod p. Compute its least nonnegative value.

Problems shown under their original terms: Generated (template, solver-computed).

Practice this free, right now

Unlimited math practice is on the free plan — no card, no trial clock.

See every Number Theory skill for college+