Skip to main content

Section 4.5 Elliptic curve Diffie-Hellman key exchange and El Gamal

We are now prepared to give the elliptic curve versions of Diffie-Helman key exchange and the related Elgamal-type cryptosystem. These can be thought of as “positive” applications of elliptic curves in cryptography. It should be noted that the early use of elliptic curves in this setting was “negative” in the sense that several powerful factoring algorithms to attack problems in \(\F_p\) use elliptic curve methods.

Diffie-Hellman key exchance over \(E(\F_p)\) looks very similar to the algorithm presented in Algorithm 3.3.2, but with the operations shifted into the additive notation.

As in the case over \(\F_p\text{,}\) an attacker Eve can break the system if the can solve the ECDLP. But this isn't the problem that she actually needs to solve.

Definition 4.5.2.
The elliptic curve Diffie-Hellman problem (ECDHP) is to find, given \(E(\F_p)\) and \(P \in E(\F_p)\text{,}\) the value of \(n_a n_b P\) from known values of \(n_a P\) and \(n_b P\text{.}\)

We've at least hinted at the appeal of elliptic curves: storage required for security is growing as computers continue to increase in speed. With that in mind, we point out another place where elliptic curves can be made more efficient. The point \(A\) that Alice sends Bob has two coordinates, but she really only needs to send Bob the \(x\)-coordinate, since Bob can compute the value of \(y^2\) from the knowledge of the elliptic curve \(E\text{.}\) A complication arises where Bob might compute the wrong square root of \(y^2\text{,}\) but in that case he can flip the sign on the \(y\)-coordinate to get the inverse. Of course, this leaves open the important question of how Bob can compute square roots in \(E(\F_p)\text{,}\) a question that we leave open for now.

How are square roots computed in elliptic curves over cryptographically scaled finite fields?

The trade-off is computation for storage, which is going to end up a running theme in the second half of the course. The issues start to arise because of the way that key sizes have scaled with CPU power and mathematical advances. Currently, the high security standard for the symmetric AES cryptosystem is 256-bit keys (\(n \sim 2^{256}\)). To get equivalent security in elliptic curves, key sizes are on the order of 521-bit (\(n \sim 2^{521}\)) and RSA/Elgamal keys are on the order of 15360-bit (\(n \sim 2^{15360})\) due to the existence of a method called the index calculus.

Now we introduce a direct generalization of the Elgamal system from Algorithm 3.4.1. There is a major flaw in the utility of this implementation which we'll point out after presentation. See if you can find it.

Did you spot the problem? In Elgamal in \(\F_p\text{,}\) Bob can choose an arbitrary integer \(m\) to form his plaintext, which allows him to use encoding to change any text into a corresponding integer to encrypt. However, in the EC Elgamal version, Bob has to choose a point in \(E(\F_p)\text{,}\) and there isn't an obvious way to correspond those to messages. (The issue, of course, is that not every value of \(x \in \F_p\) corresponds to a point \((x, y) \in E(\F_p)\text{.}\))

A scheme by founders of the Certicom corporation (now owned by RIM) for working around this involves choosing two plaintext integers \(m_1, m_2\) and then “twisting” them into an elliptic curve point.

Exercises Exercises

1.
\(m_1, m_2\)
2.
\(e: M \in E(\F_p) \mapsto (c_1, c_2)\)\(d: (c_1, c_2) \mapsto M\)
3.