SHARE
TWEET

MOV

a guest Jan 24th, 2013 78 Never
  1. F.<x> = GF(8111)[]
  2. K.<x> = GF(8111^3, name='x', modulus=x^3 + 4*x - 11)
  3. E  = EllipticCurve(GF(8111), [1,300])
  4. E_ = EllipticCurve(K, [1,300])
  5.  
  6. n = E.order()
  7. P = E.random_element()
  8. Q = ZZ.random_element(n) * P
  9.  
  10. P_ = E_(P)
  11. Q_ = E_(Q)
  12.  
  13. R = E_.random_element() * (E_.order() // E.order()^2)
  14.  
  15.  
  16. W1 = P_.weil_pairing(R, n)
  17. W2 = Q_.weil_pairing(R, n)
  18. u = log(W2, W1)
  19.  
  20. assert(P*u == Q)
RAW Paste Data
Top