Anzo's Mathematics

Background

I first came across this opportunity in December 2016, when I saw a poster about the Spring 2017 Research Assistantship in the Combinatorics and Optimization department. Though I was not qualified to apply as a first year student back then, I kept this in mind and started applying in November 2017 for the Spring 2018 opportunity, in the hope that I can work with Professor David Jao in the area of cryptography and number theory. I submitted my application in December, and got the offer letter from the department the working day after the application closed.

The First Weeks

I moved into my research office knowing only the RSA algorithm, and picked up the following algorithms under Jao's guidance:
The SIDH scheme was co-invented by Jao himself in 2011, which is based on the following background knowledge:

The Diffie Hellman algorithm involves two parties encrypting their own secret key and exchange with each other, and the encryption of the exchanged message will be the shared secret between the two parties.

Another metric vital in cryptography is the security level, where a security level of $n$ implies that an average of $2^n$ operations are required to decrypt an encryption using the most efficient known decryption algorithm. As a rule of thumb, any cryptography algorithm with at least 128 bits of security level is considered secure. (There is a fun avtivity below, where you can enter a number and it will show the number of digits it has).

Security level:

The security level you entered has {{securityLevel/3.32192809489 + 0.5| number:0}} digits!

Exploring Recent Works

There have been several papers that is based on the work of SIDH, including the key compression in isogeny and the newly minted CSIDH (it is not clear what does 'C' stand for, but it is conjectured that it means 'Commutative'). We also started looking into various signature schemes, which involves protocols like hashing (using the theory of random oracle), Fiat Shamir and Unruh transformations.

A Detour Into Class Group and Binary Quadratic Form

The commutativity of the CSIDH scheme is based on the fact that the endomorphism ring of ordinary elliptic curve is an order of the quadratic field. It therefore uses the theory of class group extensively (since the elliptic curve and its isogeny are modelled in terms of class group action). This necessitates the need of studying class group of imaginary quadratic fields. It is interesting to note the bijection between a class group and a reduced binary quadratic form of the same discriminant $D$ (to be precise, it is the bijection between $ax^2+bxy+cy^2$ and $(a, \frac{-b+\sqrt{D}}{2})$), with $D$ being negative.

Diving into Quaternion Algebra

It is difficult to imagine, but in understanding the endomorphism ring structure of a supersingular curve we landed on an abstract algebra object where multiplication is non commutative. It consists of vectors $1, i, j, k$ over a field $\mathbb{F}$, and two element $a, b$ in $\mathbb{F}$ with multiplication defined as $i^2=a, j^2=b$ and $ij=-ji=k$ (anticommutative). Below are the related things I have studied:

Focusing on the case where the prime $p$ is congruent to 3 modulo 4, the unique quaternion algebra (up to isomorphism) that is ramified exactly at infinity and $p$ is the one when $i^2=-1$ and $k^2=-p$. It turns out that any supersingular curve over any extension of $\mathbb{F}_p$ is an order of this quaternion algebra.

Finding Focus and Contribution

Jao shared to me a paper by Galbraith et al on a signature scheme based on endomorphism ring computation, which relies on properties of quaternion algebra to find a new isogeny path that fulfills the signature requirement without revealing the secret to the prover (that is, the path of isogeny that brings the starting curve to the ending curve). While I tried to think of ways to incorporate this scheme into other existing signature schemes to make it more secure, Jao recommended me to implement the scheme in SageMath.org instead. This starts my journey of experimenting some auxillary functions to make them work, with the following auxillary functions required.

Sum of Two Squares

This works for all primes in the form $4k+1$ and this prime number multiplied by any power of two (e.g. 1, 2, 4, 5, 8, 10, 13, 16, 17, etc). I followed the algorithm given in Wikipedia for my implementation in Sage (there are other examples of numbers that can be written as sum of two squares, but these set of numbers make it computaitonally practical to actually determine the sum of two squares).

Norm Fitting

Finding an element of suitable norm involves solving equation like $a^2+b^2+p(c^2+d^2)=N$, which reduces to randomly finding $c, d$ such that $N-p(c^2+d^2)$ is in the desirable form for the sum-of-two-squares algorithm.

Point Multiplication

Although it is straightforward to multiply a point on the elliptic curve by an integer, this is not true in the case of multiplication of points with elements in quaternion algebra. To visualize what the multiplication of $i$ and $j$ actually means (and using the fact that $ij=k$ for multiplication by $k$), we need to first realize that $i^2=-1$ and $j^2=-p$. This necessitates the finding of endomorphisms $\phi$ and $\pi$ such that $\phi^2=-1$ and $\pi^2=-p$. It is well-known that we can take $\pi$ as the Frobenius endomorphism; the case for $\phi$ is less obvious. Luckily, we start at a curve $y^2=x^3+x$ where it is straightforward that we can let $\phi$ to map $(x, y)$ to $(-x, iy)$.

The Process of Writing the Code

(To be continued)