šŸ–Šļø
Crypto
  • Crypto
  • Fundamentals
    • Divisibility, Factors and Euclid's Algorithms
    • Modular Arithmetic
    • Rings, Fields and Euler's Totient Function
  • Further Maths
    • Continued Fractions
  • RSA
    • Overview
    • Public Exponent Attacks
      • e=1
      • Small e
      • Multi-party RSA with Small e
      • Wiener's Attack
    • Choice of Primes
      • N is prime
      • Mersenne Primes
      • P=Q
      • Fermat Factorisation
    • Factorisation Methods
      • Pollard's p-1
  • Diffie-Hellman Key Exchange
    • Overview
    • Solving the DLP
      • Baby Step, Giant Step
Powered by GitBook
On this page

Was this helpful?

  1. RSA
  2. Choice of Primes

Mersenne Primes

PreviousN is primeNextP=Q

Last updated 3 years ago

Was this helpful?

take the form p=2kāˆ’1p = 2^k - 1p=2kāˆ’1. Often we just loop through all possible Mersenne primes and check if either ppp or qqq are that.

This is very easy to do in Sage:

from sage.combinat.sloane_functions import A000668

mersenne = A000668()

Then we can grab the nnnth Mersenne prime using mersenne(n).

Mersenne Primes