Public Key Cryptography
About that shared key we’ve been assuming…
No mayonnaise jokes, please.
What if discrete log was on a curve?
\[ \begin{aligned} &\textbf{double-and-add}(P,\; n):\\ &\quad \text{write } n \text{ in binary as } (b_{k-1}\, b_{k-2}\, \ldots\, b_0)_2,\; b_{k-1} = 1 \\ &\quad R \leftarrow P \\ &\quad \textbf{for } i = k-2 \textbf{ down to } 0 \textbf{ do:} \\ &\quad\quad R \leftarrow 2R \quad \text{(double)} \\ &\quad\quad \textbf{if } b_i = 1 \textbf{ then } R \leftarrow R + P \quad \text{(add)} \\ &\quad \textbf{return } R \end{aligned} \]
One-way, except for Alice.
The one trapdoor permutation we know about.
1 0000 0000 0000 0001. Only two bits are set.Spoiler: textbook RSA isn’t it.
reject symbol0x00 0x02)RS256 is the default in most JWT libraries and most OIDC providers)What if your key leaks five years from now?
Memento mori.
MACs you can’t take back.
What did we learn?
Ask now, catch me after class, or email eoin@eoin.ai