Understand Miller's algorithm for elliptic curves

30 Views Asked by At

I am trying to understand Miller's algorithm for Weil pairing. My goal is to build a rational function $f$ by it's divisor $div(f) = \sum n_P(P).$ I know that if we have divisors $D_1, D_2$ and rational functions $f_1, f_2$ that satisfy this relations $$D_1 = (P_1) - (\mathcal O) + div(f_1) $$ $$D_2 = (P_1) - (\mathcal O) + div(f_2) $$ Then we can easy get function $f_1f_2f_3$ and point $P_3 = -(P_1 + P_2)$ that satisfy relation of the same form $$D_1 + D_2 = (P_3) - (\mathcal O) + div(f_1f_2f_3) $$ So rewriting $div(f) = \sum\limits_{P \ne \mathcal O} n_P((P)-(\mathcal O))$ and using double-and-sum algorithm,
we can build $f$ if we for any $P$, such that $n_P \ne 0$, know $f_P$ and $Q_P$ that satisfy $$(P)-(\mathcal O) = (Q_P) - (\mathcal O) + div(f_P) $$ My question is how could I get this $f_P$ and $Q_P$?