<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Exercises on Benjamin Italiaander</title><link>https://tlnd.org/genre/exercises/</link><description>Recent content in Exercises on Benjamin Italiaander</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 29 Nov 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://tlnd.org/genre/exercises/index.xml" rel="self" type="application/rss+xml"/><item><title>Clock arithmetic — exercises</title><link>https://tlnd.org/math/public_key_cryptography/01a_clock_arithmetic/</link><pubDate>Sun, 29 Nov 2026 00:00:00 +0000</pubDate><guid>https://tlnd.org/math/public_key_cryptography/01a_clock_arithmetic/</guid><description>&lt;h1 id="-clock-arithmetic-exercises"&gt;✏️ Clock arithmetic: exercises&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://tlnd.org/math/public_key_cryptography/"&gt;Overview&lt;/a&gt; · Belongs to &lt;a href="https://tlnd.org/math/public_key_cryptography/01_the_math/#1-clock-arithmetic"&gt;1. The mathematics, section 1&lt;/a&gt; · Next: &lt;a href="https://tlnd.org/math/public_key_cryptography/01b_easy_forward_hard_backward/"&gt;Easy forward, hard backward →&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Everything in public-key cryptography happens on a clock. If this page feels easy, the rest of the series will too. Every exercise has its answer hidden below it: work it out on paper first, then click &lt;strong&gt;Answer&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="1-the-remainder"&gt;1. The remainder&lt;/h2&gt;
&lt;p&gt;$a \bmod n$ is the &lt;strong&gt;remainder&lt;/strong&gt; after dividing $a$ by $n$. It is always one of $0, 1, \dots, n-1$.&lt;/p&gt;</description></item><item><title>Diffie–Hellman — exercises and in depth</title><link>https://tlnd.org/math/public_key_cryptography/01e_diffie_hellman/</link><pubDate>Sun, 29 Nov 2026 00:00:00 +0000</pubDate><guid>https://tlnd.org/math/public_key_cryptography/01e_diffie_hellman/</guid><description>&lt;h1 id="-diffiehellman-exercises-and-in-depth"&gt;✏️ Diffie–Hellman: exercises and in depth&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://tlnd.org/math/public_key_cryptography/"&gt;Overview&lt;/a&gt; · Belongs to &lt;a href="https://tlnd.org/math/public_key_cryptography/01_the_math/#4-diffiehellman-key-exchange-1976"&gt;1. The mathematics, section 4&lt;/a&gt; · Previous: &lt;a href="https://tlnd.org/math/public_key_cryptography/01d_rsa/"&gt;← RSA&lt;/a&gt; · Next: &lt;a href="https://tlnd.org/math/public_key_cryptography/01f_elliptic_curves/"&gt;Elliptic curves in depth →&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Diffie–Hellman is the idea that both SSH and TLS rely on for every connection. The formula is one line; the subtle part is &lt;strong&gt;which numbers you may use&lt;/strong&gt;. This page lets you play the exchange, then attack it in three ways, each of which happened to real software. You need &lt;a href="https://tlnd.org/math/public_key_cryptography/01a_clock_arithmetic/"&gt;clock arithmetic&lt;/a&gt; and &lt;a href="https://tlnd.org/math/public_key_cryptography/01b_easy_forward_hard_backward/#3-generators-and-the-order-of-a-number"&gt;generators&lt;/a&gt;. Answers are hidden under &lt;strong&gt;Answer&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Digital signatures — exercises and in depth</title><link>https://tlnd.org/math/public_key_cryptography/01g_signatures/</link><pubDate>Sun, 29 Nov 2026 00:00:00 +0000</pubDate><guid>https://tlnd.org/math/public_key_cryptography/01g_signatures/</guid><description>&lt;h1 id="-digital-signatures-exercises-and-in-depth"&gt;✏️ Digital signatures: exercises and in depth&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://tlnd.org/math/public_key_cryptography/"&gt;Overview&lt;/a&gt; · Belongs to &lt;a href="https://tlnd.org/math/public_key_cryptography/01_the_math/#6-digital-signatures-on-a-curve-schnorr--eddsa"&gt;1. The mathematics, section 6&lt;/a&gt; · Previous: &lt;a href="https://tlnd.org/math/public_key_cryptography/01f_elliptic_curves/"&gt;← Elliptic curves&lt;/a&gt; · Back to &lt;a href="https://tlnd.org/math/public_key_cryptography/01_the_math/"&gt;1. The mathematics&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Everything here uses part 1&amp;rsquo;s small curve $y^2 = x^3 + 2x + 2 \pmod{17}$ with $G = (5, 1)$ and group order $n = 19$. All &amp;ldquo;signature numbers&amp;rdquo; ($k$, $s$, $e$, $x$) count &lt;strong&gt;modulo 19&lt;/strong&gt;; point coordinates count modulo 17. The table of multiples $kG$ is in &lt;a href="https://tlnd.org/math/public_key_cryptography/01_the_math/#53-multiplying-a-point-by-a-number"&gt;part 1&lt;/a&gt;; &lt;a href="https://tlnd.org/math/public_key_cryptography/01f_elliptic_curves/"&gt;Elliptic curves in depth&lt;/a&gt; explains it. Answers are hidden under &lt;strong&gt;Answer&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Easy forward, hard backward — exercises</title><link>https://tlnd.org/math/public_key_cryptography/01b_easy_forward_hard_backward/</link><pubDate>Sun, 29 Nov 2026 00:00:00 +0000</pubDate><guid>https://tlnd.org/math/public_key_cryptography/01b_easy_forward_hard_backward/</guid><description>&lt;h1 id="-easy-forward-hard-backward-exercises"&gt;✏️ Easy forward, hard backward: exercises&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://tlnd.org/math/public_key_cryptography/"&gt;Overview&lt;/a&gt; · Belongs to &lt;a href="https://tlnd.org/math/public_key_cryptography/01_the_math/#2-easy-forward-hard-backward"&gt;1. The mathematics, section 2&lt;/a&gt; · Previous: &lt;a href="https://tlnd.org/math/public_key_cryptography/01a_clock_arithmetic/"&gt;← Clock arithmetic&lt;/a&gt; · Next: &lt;a href="https://tlnd.org/math/public_key_cryptography/01c_prime_numbers/"&gt;Prime numbers →&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Public-key cryptography needs a calculation that is &lt;strong&gt;fast one way and hopeless the other way&lt;/strong&gt;. This page lets you feel both directions with your own hands: first how quick the forward direction is, then how slow going back gets, and finally the clever shortcuts attackers use (and why real keys are big enough to survive them). Answers are hidden under &lt;strong&gt;Answer&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>RSA — exercises and in depth</title><link>https://tlnd.org/math/public_key_cryptography/01d_rsa/</link><pubDate>Sun, 29 Nov 2026 00:00:00 +0000</pubDate><guid>https://tlnd.org/math/public_key_cryptography/01d_rsa/</guid><description>&lt;h1 id="-rsa-exercises-and-in-depth"&gt;✏️ RSA: exercises and in depth&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://tlnd.org/math/public_key_cryptography/"&gt;Overview&lt;/a&gt; · Belongs to &lt;a href="https://tlnd.org/math/public_key_cryptography/01_the_math/#3-rsa-1977"&gt;1. The mathematics, section 3&lt;/a&gt; · Previous: &lt;a href="https://tlnd.org/math/public_key_cryptography/01c_prime_numbers/"&gt;← Prime numbers&lt;/a&gt; · Next: &lt;a href="https://tlnd.org/math/public_key_cryptography/01e_diffie_hellman/"&gt;Diffie–Hellman in depth →&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Part 1 made one RSA key with $p = 47$ and $q = 59$. Here you make several yourself, prove why it works, see how real software makes it four times faster, and break it in the ways real attackers have. You need &lt;a href="https://tlnd.org/math/public_key_cryptography/01a_clock_arithmetic/"&gt;clock arithmetic&lt;/a&gt; (inverses) and &lt;a href="https://tlnd.org/math/public_key_cryptography/01c_prime_numbers/"&gt;prime numbers&lt;/a&gt; (Euler&amp;rsquo;s φ). Answers are hidden under &lt;strong&gt;Answer&lt;/strong&gt;.&lt;/p&gt;</description></item></channel></rss>