Letting Go Of The Mersenne Twister?

--

Recently I was interviewed by a crypto team from an international company, and at the end of the interview I was asked what my favouriate prime number was, and I said, that the ones I use for testing are 97, 997, 2¹⁹-1 and 2²⁵⁵-19. The first two are very simple ones I use for quick testing with simple numbers, the last one is used for complex method that require a 256-bit prime number (and is used in Curve 25519), and the other one is a Mersenne prime, and which is easy for me to remember, as in Python it is:

>>> 2**19–1
524287

So, for me, I just remember 19, and I have my two larger prime numbers, that I can test with. With 2¹⁹-1 only has 19 bits, it is often large enough to test. But, if I really wanted to find a large prime number, I would remember the vaue of 19,937, as 2¹⁹⁹³⁷−1 is a prime with 19,937 bits! It is likely though that this prime number would be too large for most of the applications I would use, and so I’m comfortable with 2²⁵⁵-19:

>>> 2**255–19
57896044618658097711785492504343953926634992332820282019728792003956564819949L

And a fast elliptic curve name FourQ uses a prime of 2¹²⁷-1:

--

--

Prof Bill Buchanan OBE FRSE
ASecuritySite: When Bob Met Alice

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.