Blog

# Evaluating a rational function at a divisor

To evaluate the pairings that we need in pairing-based cryptography, we need to evaluate the rational function that we get from a divisor at another divisor. To understand how to do this, we need to understand what it means to evaluate a rational function at a divisor. This turns out to actually be fairly straightforward.

Suppose that we have a divisor

D = S ni(Pi)

and want to evaluate a rational function f at D to get f(D). We do this by calculating

f(D) = P f(Pi)^(ni)

In the case of the divisors that we’re interested in, we’ll get a rational function of two variables x and y, and we’ll need to think of a point on an elliptic curve as being a point P = (x, y) to evaluate the rational function at the point.

For example, suppose that

P1 = (-1, 0)

P2 = (1,1)

D = 2(P1) – 2(P2)

and

f(x, y) = (x + y – 1) / (y – 2).

Then we can find

f(D) = f(P1)2 f(P2)-2

= f(P1)2 / f(P2)2

Using P1 = (-1, 0) we find that

f(P1) = (-1 + 0 -1) / (0 – 2)

= 1

Using P2 = (1, 1) we find that

f(P2) = (1 + 1 – 1) / (1 – 2)

= -1

Combining these, we find that

f(D) = f(P1)2 / f(P2)2

= 12 / (-1)2

= 1