F.<x> = GF(8111)[]
K.<x> = GF(8111^3, name='x', modulus=x^3 + 4*x - 11)
E = EllipticCurve(GF(8111), [1,300])
E_ = EllipticCurve(K, [1,300])
n = E.order()
P = E.random_element()
Q = ZZ.random_element(n) * P
P_ = E_(P)
Q_ = E_(Q)
R = E_.random_element() * (E_.order() // E.order()^2)
W1 = P_.weil_pairing(R, n)
W2 = Q_.weil_pairing(R, n)
u = log(W2, W1)
assert(P*u == Q)