SHARE
TWEET

Untitled

a guest Jan 2nd, 2017 173 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. p = nextprime (random(10^20))
  2. alpha = znprimroot(p)
  3. a = random(p - 3) + 1
  4.  
  5. m = 24 + 1*35 + 9*35^2 + 1*35^3 + 16*35^4 +4*35^5
  6.  
  7. k = random (p-3) + 1
  8. y = modexp (alpha, k, p)
  9. a2 = (alpha^a)^k
  10. d = Mod(m * a2, p )
  11.  
  12.  
  13. m2 = lift(Mod (y^(-a)*d,p))
  14.  
  15. if (m2 == m,print(Test_zaliczony),print(Test_obalony))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top