SHARE
TWEET

Untitled

a guest Jan 2nd, 2018 141 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. p = nextprime(random(10^30))
  2. q = nextprime(random(10^25))
  3. n = q * p
  4. e = random(n)
  5. phin = (p - 1) * (q - 1)
  6. while(gcd(e, phin) != 1, e = e + 1)
  7. d = lift(Mod(e, phin) ^ (-1))
  8. log(n) / log(27)
  9.  
  10. m = 12 + 21 * 27 + 11 * 27 ^ 2 + 27 ^ 3 + 19 * 27 ^ 4 + 26 * 27 ^ 5
  11.  
  12. E(x) = lift(Mod(x, n) ^ e)
  13. D(x) = lift(Mod(x, n) ^ d)
  14.  
  15. H(x) = x
  16. S(x) = lift(Mod(x, n) ^ d)
  17.  
  18. M(x) = lift(Mod(x, n) ^ e)
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